So the problem is our video player.
Update to latest revision (“svn up”) and run:
vcmiclient --disable-video
So the problem is our video player.
Update to latest revision (“svn up”) and run:
vcmiclient --disable-video
I’ve already obtained new VCMI sources from svn and compiled it:
$ svn up
Updating '.':
At revision 2668.
After run vcmiclient without video player, program crashed and generate core-dump file:
$ vcmiclient --disable-video
Starting...
Creating console and logfile: 1
Loading settings: 16
VCMI 0.88b (client)
Warning: SDL says that 24bpp is wrong and suggests 32
New screen flags: 0
Initializing screen: 156
Initializing video: 0
Initializing minors: 0
Abort trap (core dumped)
After this I’ve run gdb74 with this options:
$ gdb74 --readnow --core=vcmiclient.core --directory=/home/admin/VCMI/SVN/trunk --args vcmiclient --disable-video
And run gdb74 without new options:
$ gdb74 --args vcmiclient --disable-video
Results attached.
gdb_–disable-video.txt (7.45 KB)
gdb_without_vid_play.txt (10.5 KB)
Wow. Bug in boost iostreams library? That’s the only explanation I can think of.
In file client/CSndHandler.cpp disable lines 39 & 41:
try //c-tor of mapped_file_source throws exception on failure
{
//mfile = new boost::iostreams::mapped_file_source(fname);
//if (!mfile->is_open()) //just in case
throw std::runtime_error("Cannot open " + fname + ": !mfile->is_open()");
This will disable usage of iostreams.
Meanwhile I’ll see what I can do with boost…
Thanks for help. I tried to recompile VCMI with edited 32 & 41 strings:
try //c-tor of mapped_file_source throws exception on failure
{
//mfile = new boost::iostreams::mapped_file_source(fname);
//if (!mfile->is_open()) //just in case
throw std::runtime_error("Cannot open " + fname + ": !mfile->is_open()");
I’ve run “vcmiclient --disable-video”, and program started like normal, but after started local game I received this message with error:
$ vcmiclient --disable-video
Starting...
Creating console and logfile: 1
Loading settings: 16
VCMI 0.88b (client)
Warning: SDL says that 24bpp is wrong and suggests 32
New screen flags: 0
Initializing screen: 155
Initializing video: 0
Initializing minors: 0
Cannot open /usr/local/share/vcmi/Data/Heroes3.snd: Cannot open /usr/local/share/vcmi/Data/Heroes3.snd: !mfile->is_open()
Cannot open /usr/local/share/vcmi/Data/H3ab_ahd.snd: Cannot open /usr/local/share/vcmi/Data/H3ab_ahd.snd: !mfile->is_open()
Initializing sound: 22
Initializing screen and sound handling: 22
Loading .lod files: 162
General text handler: 63
Hero handler: 45
Artifact handler: 13
Creature handler: 75
Town handler: 41
Object handler: 15
Def information handler: 39
Building handler: 9
Spell handler: 14
Initializing VCMI_Lib: 492
Screen handler: 2
Loading and transforming heroes' flags: 260
Main graphics: 543
Initializing game graphics: 0
Message handler: 5
Initialization of VCMI (together): 1240
Warning: evil map file: /usr/local/share/vcmi/Maps/4trans.h3m: Invalid map format!
Establishing connection...
Found endpoints:
0: 127.0.0.1:3030
Trying connection to 127.0.0.1:3030 (0)
Established connection with VCMI 0.88b (server)
Gamestate: 13
Server opened map properly.
Sending/Getting info to/from the server: 7
Using random seed: 1336462769
Opening map file: /usr/local/share/vcmi/Maps/Arrogance.h3m done.
Our map checksum: 1806069392
Reading header: 0
Reading rumors: 0
Reading predefined heroes: 0
Reading terrain: 0
Reading defs info: 3
Reading objects: 23
Reading events: 0
Calculating blocked/visitable tiles: 3
Map initialization done!
Map loaded!
Our checksum for the map: 1806069392
Seed after init is 810220800 (before was 1336462769)
Initializing GameState (together): 189
Creating mapHandler: 0
Unpacking and handling defs: 163
Preparing FoW, roads, rivers,borders: 27
Making object rects: 10
Initializing mapHandler (together): 201
Opening VCAI
Loaded VCAI
Player 1 will be lead by VCAI
Opening VCAI
Loaded VCAI
Player 5 will be lead by VCAI
Segmentation fault (core dumped)
$ terminate called after throwing an instance of 'boost::exception_detail::clone_impl<boost::exception_detail::error_info_injector<boost::system::system_error> >'
what(): End of file
I think it’s because we turned off boost iostreams.
Looks like crash on server. You should get vcmiserver.core file somewhere.
Post stack dump from it:
$ gdb74 --core=vcmiserver.core vcmiserver
(gdb) set logging on
(gdb) thread apply all backtrace full
(gdb) exit
BTW: you don’t have to use --disable-video as long as iostreams are disabled
Update:
Back on iostreams topic. Can you download test-iostreams.cpp and check if it works?
to compile:
g++46 -g -O2 -L/usr/local/lib/gcc46 -std=c++0x -Wall -Wextra test-iostreams.cpp -o test-iostreams -lboost_iostreams
to run:
./test-iostreams /path/to/VIDEO.VID
Run it and post console log. If I’m right this should compile but result in error\crash on start.
OK. I’ve run gdb74 for vcmiserver, results attached.
After this, I’ve run compiled test-iostreams:
$ ./test-iostreams /usr/local/share/vcmi/Data/VIDEO.VID
Used boost version is 104500
Trying to open file /usr/local/share/vcmi/Data/VIDEO.VID
Opened file is 32885728 bytes in size
File header is 0x2b
Closing file...
Exit: success!
Maybe problem in my boost?:
$ pkg_info -xI boost
boost-all-1.45.0 The "meta-port" for boost libraries
boost-docs-1.45.0 Documentation for libraries from boost.org
boost-jam-1.48.0 Build tool from the boost.org
boost-libs-1.45.0_2 Free portable C++ libraries (without Boost.Python)
boost-python-libs-1.45.0_1 Framework for interfacing Python and C++
If I’ve try to run campaign, I receive this message:
CStupidAI [0x814f115e0]: created
CStupidAI [0x814f115e0]: init called, saving ptr to IBattleCallback
[xcb] Unknown sequence number while processing queue
[xcb] Most likely this is a multi-threaded client and XInitThreads has not been called
[xcb] Aborting, sorry about that.
Assertion failed: (!xcb_xlib_threads_sequence_lost), function poll_for_event, file xcb_io.c, line 273.
Abort (core dumped)
%terminate called after throwing an instance of 'boost::exception_detail::clone_impl<boost::exception_detail::error_info_injector<boost::system::system_error> >'
what(): End of file
If it’s needed, - version of my xcb:
$ pkg_info -xI xcb
libxcb-1.7 The X protocol C-language Binding (XCB) library
xcb-proto-1.6 The X protocol C-language Binding (XCB) protocol
xcb-util-0.3.6_1 A module with libxcb/libX11 extension/replacement libraries
xcb-util-renderutil-0.3.8 Convenience functions for the Render extension
gdb_vcmiserver.txt (15.1 KB)
So server had started game completely but client have not. Can you create stacktraces for both vcmiclient and vcmiserver? You should have *.core files from both of them after crash.
Ok. Now I’m really clueless.
This may be due to fact that your boost libraries were compiled with g+±42 but you’re using g+±46 with c++0x flag for VCMI. But this is mostly guessing.
Hosting provided by DigitalOcean