Linux: Crash when building Mark I and designing ships

Questions, problems and discussion about compiling FreeOrion.

Moderator: Oberlus

Post Reply
Message
Author
User avatar
RgnadKzin
Space Squid
Posts: 67
Joined: Sun Aug 15, 2010 2:25 am

Linux: Crash when building Mark I and designing ships

#1 Post by RgnadKzin »

I finally figured out that my Ogre error related to the fact that I needed to add symbolic links to the ogre rendering plugins in the /usr/local/lib/OGRE from within the freeorion game directory.

Code: Select all

[bradbva@localhost freeorion]$ ls -la                                           
total 42972
drwxr-xr-x 3 root root     4096 2010-11-13 18:04 ./
drwxr-xr-x 5 root root     4096 2010-11-10 00:28 ../
drwxrwxr-x 5 root root     4096 2010-11-10 22:01 default/
-rwxr-xr-x 1 root root 17381589 2010-11-13 18:01 freeorion*
-rwxr-xr-x 1 root root 13881851 2010-11-13 17:43 freeorionca*
-rwxr-xr-x 1 root root 12651713 2010-11-13 17:34 freeoriond*
-rw-r--r-- 1 root root      188 2010-11-13 16:41 ogre_plugins.cfg
lrwxrwxrwx 1 root root       45 2010-11-13 16:23 Plugin_BSPSceneManager.so -> /usr/local/lib/OGRE/Plugin_BSPSceneManager.so*
lrwxrwxrwx 1 root root       46 2010-11-13 16:24 Plugin_CgProgramManager.so -> /usr/local/lib/OGRE/Plugin_CgProgramManager.so*
lrwxrwxrwx 1 root root       48 2010-11-13 16:24 Plugin_OctreeSceneManager.so -> /usr/local/lib/OGRE/Plugin_OctreeSceneManager.so*
lrwxrwxrwx 1 root root       40 2010-11-13 16:25 Plugin_OctreeZone.so -> /usr/local/lib/OGRE/Plugin_OctreeZone.so*
lrwxrwxrwx 1 root root       40 2010-11-13 16:25 Plugin_ParticleFX.so -> /usr/local/lib/OGRE/Plugin_ParticleFX.so*
lrwxrwxrwx 1 root root       45 2010-11-13 16:25 Plugin_PCZSceneManager.so -> /usr/local/lib/OGRE/Plugin_PCZSceneManager.so*
lrwxrwxrwx 1 root root       38 2010-11-13 16:32 RenderSystem_GL.so -> /usr/local/lib/OGRE/RenderSystem_GL.so*
When I run freeorion, it starts up, but when I try to either design a ship or build a Mark I.

Code: Select all

Error: Could not find/open font
main() caught exception(std::exception): bad lexical cast: source type value could not be interpreted as target
AL lib: ALc.c:1879: exit(): closing 1 Device
AL lib: ALc.c:1808: alcCloseDevice(): destroying 1 Context(s)
AL lib: ALc.c:1420: alcDestroyContext(): deleting 16 Source(s)
AL lib: ALc.c:1818: alcCloseDevice(): deleting 2 Buffer(s)
Attachments
freeorion.log.zip
freeorion.log compressed. This is when I tried to add a new ship design in the first turn.
(5.5 KiB) Downloaded 161 times

User avatar
Geoff the Medio
Programming, Design, Admin
Posts: 13603
Joined: Wed Oct 08, 2003 1:33 am
Location: Munich

Re: Linux: Crash when building Mark I and designing ships

#2 Post by Geoff the Medio »

What do you mean by "design a ship"? Specifically what do you click, and when does the crash happen? From the log, it looks like you opened the design screen, then waiting a second and a half, and then did something that caused a crash.

Also, is there a freeoriond.log? The crash might be due to something happening on the server.

Similarly, what do you do to get a crash when building a ship?

User avatar
OndrejR
Space Dragon
Posts: 339
Joined: Thu Oct 02, 2008 11:00 pm
Location: Slovakia

Re: Linux: Crash when building Mark I and designing ships

#3 Post by OndrejR »

Which version of boost do you have? If boost 1.40 as is standard in Ubuntu 10.04 Lucid, then you have to have 1.42 or later which is required by FreeOrion. Or upgrade to newer version of distribution.

User avatar
RgnadKzin
Space Squid
Posts: 67
Joined: Sun Aug 15, 2010 2:25 am

Re: Linux: Crash when building Mark I and designing ships

#4 Post by RgnadKzin »

boost: 1.42

xoanon
Space Krill
Posts: 2
Joined: Sun Nov 14, 2010 10:19 pm

Re: Linux: Crash when building Mark I and designing ships

#5 Post by xoanon »

I have postet the ticket - ID: 3109205 @ SF and would like to confirm the bug.

Boost Version is 1.44 - fresh from sources.

Linux homer 2.6.32-24-generic #41-Ubuntu SMP Thu Aug 19 01:38:40 UTC 2010 x86_64 GNU/Linux
Ubuntu lucid lynx 10.04

Just selecting a Ship within the production section causes the crash.


xenon@homer:~/src/freeorion/FreeOrion$ ldd freeorion
linux-vdso.so.1 => (0x00007fff463bf000)
libGiGi.so => /usr/local/lib/libGiGi.so (0x00007f5188d56000)
libGiGiOgre.so => /usr/local/lib/libGiGiOgre.so (0x00007f5188b47000)
libopenal.so.1 => /usr/lib/libopenal.so.1 (0x00007f51888bd000)
libalut.so.0 => /usr/lib/libalut.so.0 (0x00007f51886b5000)
libOgreMain-1.6.4.so => /usr/lib/libOgreMain-1.6.4.so (0x00007f5188052000)
libogg.so.0 => /usr/lib/libogg.so.0 (0x00007f5187e4a000)
libvorbis.so.0 => /usr/lib/libvorbis.so.0 (0x00007f5187c1d000)
libvorbisfile.so.3 => /usr/lib/libvorbisfile.so.3 (0x00007f5187a15000)
libBulletDynamics.so.2.75 => /usr/lib/libBulletDynamics.so.2.75 (0x00007f51877b0000)
libBulletCollision.so.2.75 => /usr/lib/libBulletCollision.so.2.75 (0x00007f51874d9000)
libLinearMath.so.2.75 => /usr/lib/libLinearMath.so.2.75 (0x00007f51872cd000)
libcdt.so.4 => /usr/lib/libcdt.so.4 (0x00007f51870c6000)
libgraph.so.4 => /usr/lib/libgraph.so.4 (0x00007f5186eb9000)
libgvc.so.4 => /usr/lib/libgvc.so.4 (0x00007f5186c37000)
libboost_date_time.so.1.44.0 => /usr/local/lib/libboost_date_time.so.1.44.0 (0x00007f5186a23000)
libboost_filesystem.so.1.44.0 => /usr/local/lib/libboost_filesystem.so.1.44.0 (0x00007f5186800000)
libboost_serialization.so.1.44.0 => /usr/local/lib/libboost_serialization.so.1.44.0 (0x00007f518658a000)
libboost_signals.so.1.44.0 => /usr/local/lib/libboost_signals.so.1.44.0 (0x00007f5186375000)
libboost_system.so.1.44.0 => /usr/local/lib/libboost_system.so.1.44.0 (0x00007f5186171000)
libboost_thread.so.1.44.0 => /usr/local/lib/libboost_thread.so.1.44.0 (0x00007f5185f58000)
libpthread.so.0 => /lib/libpthread.so.0 (0x00007f5185d3a000)
librt.so.1 => /lib/librt.so.1 (0x00007f5185b32000)
libstdc++.so.6 => /usr/lib/libstdc++.so.6 (0x00007f518581e000)
libm.so.6 => /lib/libm.so.6 (0x00007f518559a000)
libgcc_s.so.1 => /lib/libgcc_s.so.1 (0x00007f5185383000)
libc.so.6 => /lib/libc.so.6 (0x00007f5185000000)
libGLU.so.1 => /usr/lib/libGLU.so.1 (0x00007f5184d8e000)
libGL.so.1 => /usr/lib/libGL.so.1 (0x00007f5184a86000)
libz.so.1 => /lib/libz.so.1 (0x00007f518486f000)
libSM.so.6 => /usr/lib/libSM.so.6 (0x00007f5184665000)
libICE.so.6 => /usr/lib/libICE.so.6 (0x00007f518444a000)
libX11.so.6 => /usr/lib/libX11.so.6 (0x00007f5184114000)
libXext.so.6 => /usr/lib/libXext.so.6 (0x00007f5183f01000)
libfreetype.so.6 => /usr/lib/libfreetype.so.6 (0x00007f5183c7b000)
libjpeg.so.62 => /usr/lib/libjpeg.so.62 (0x00007f5183a57000)
libpng12.so.0 => /lib/libpng12.so.0 (0x00007f518382f000)
libtiff.so.4 => /usr/lib/libtiff.so.4 (0x00007f51835cd000)
libdl.so.2 => /lib/libdl.so.2 (0x00007f51833c8000)
libzzip-0.so.13 => /usr/lib/libzzip-0.so.13 (0x00007f51831c1000)
libXaw.so.7 => /usr/lib/libXaw.so.7 (0x00007f5182f52000)
libXt.so.6 => /usr/lib/libXt.so.6 (0x00007f5182cec000)
libfreeimage.so.3 => /usr/lib/libfreeimage.so.3 (0x00007f5182849000)
libpathplan.so.4 => /usr/lib/libpathplan.so.4 (0x00007f5182640000)
libexpat.so.1 => /lib/libexpat.so.1 (0x00007f5182417000)
libltdl.so.7 => /usr/lib/libltdl.so.7 (0x00007f518220d000)
/lib64/ld-linux-x86-64.so.2 (0x00007f51892e2000)
libnvidia-tls.so.256.25 => /usr/lib/tls/libnvidia-tls.so.256.25 (0x00007f518200a000)
libnvidia-glcore.so.256.25 => /usr/lib/libnvidia-glcore.so.256.25 (0x00007f5180624000)
libuuid.so.1 => /lib/libuuid.so.1 (0x00007f518041e000)
libxcb.so.1 => /usr/lib/libxcb.so.1 (0x00007f5180202000)
libXmu.so.6 => /usr/lib/libXmu.so.6 (0x00007f517ffe8000)
libXpm.so.4 => /usr/lib/libXpm.so.4 (0x00007f517fdd7000)
libXau.so.6 => /usr/lib/libXau.so.6 (0x00007f517fbd2000)
libXdmcp.so.6 => /usr/lib/libXdmcp.so.6 (0x00007f517f9cc000)
Attachments
freeorionlogs.tar.bz2
(21.67 KiB) Downloaded 182 times

User avatar
Geoff the Medio
Programming, Design, Admin
Posts: 13603
Joined: Wed Oct 08, 2003 1:33 am
Location: Munich

Re: Linux: Crash when building Mark I and designing ships

#6 Post by Geoff the Medio »

xoanon wrote:Just selecting a Ship within the production section causes the crash.
I'm also getting a crash doing that on Windows.

No idea why though... stepping through the code shows that a valid string (eg. "3") is being successfully cast to an integer (3), but there is still a bad cast exception being thrown...

I'm adding some safety checks / exception catching that should prevent crashes, but might just result in a broken production list rather than fixing it, at least until the real cause of the problem is found.

User avatar
RgnadKzin
Space Squid
Posts: 67
Joined: Sun Aug 15, 2010 2:25 am

Re: Linux: Crash when building Mark I and designing ships

#7 Post by RgnadKzin »

As clarification, it will let me build basic shipyard and orbital drydock, but nothing else.

User avatar
Geoff the Medio
Programming, Design, Admin
Posts: 13603
Joined: Wed Oct 08, 2003 1:33 am
Location: Munich

Re: Linux: Crash when building Mark I and designing ships

#8 Post by Geoff the Medio »

Investigating further, the problem seems to be with the recently added encyclopedia stuff. It seems to be assuming some iterators are valid when they aren't, or that they'll contain something that can be cast to an integer, which isn't necessarily the case. This may just require wrapping these attempted casts in try / catch blocks....

Edit: That seems to have worked, at least for the production list selection crash. Latest SVN should have this fixed.

xoanon
Space Krill
Posts: 2
Joined: Sun Nov 14, 2010 10:19 pm

Re: Linux: Crash when building Mark I and designing ships

#9 Post by xoanon »

that was fast ... :D

Works for me with revision 3831 ...

still some warnings from the compiler:

/home/xenon/src/freeorion/FreeOrion/UI/EncyclopediaDetailPanel.cpp: In member function ‘void EncyclopediaDetailPanel::Refresh()’:
/home/xenon/src/freeorion/FreeOrion/UI/EncyclopediaDetailPanel.cpp:514: warning: enumeration value ‘INVALID_UNLOCKABLE_ITEM_TYPE’ not handled in switch
/home/xenon/src/freeorion/FreeOrion/UI/EncyclopediaDetailPanel.cpp:514: warning: enumeration value ‘NUM_UNLOCKABLE_ITEM_TYPES’ not handled in switch
/home/xenon/src/freeorion/FreeOrion/UI/BuildDesignatorWnd.cpp: In constructor ‘BuildDesignatorWnd::BuildDesignatorWnd(GG::X, GG::Y)’:
/home/xenon/src/freeorion/FreeOrion/UI/BuildDesignatorWnd.cpp:707: warning: unused variable ‘MAX_PLANET_DIAMETER’
Linking CXX executable ../../freeorion
[100%] Built target freeorion

but works fine.

User avatar
RgnadKzin
Space Squid
Posts: 67
Joined: Sun Aug 15, 2010 2:25 am

Re: Linux: Crash when building Mark I and designing ships

#10 Post by RgnadKzin »

Code: Select all

[bradbva@localhost freeorion]$ svn update
Fetching external item into 'FreeOrion/GG'
External at revision 833.
At revision 3831.
I can't get GG to compile after svn update:

Code: Select all

/usr/local/src/freeorion/FreeOrion/GG/tutorial/adam.cpp:655:   instantiated from ‘GG::adam_parser<Iter>::adam_parser(const adobe::adam_callback_suite_t&) [with Iter = __gnu_cxx::__normal_iterator<const char*, std::basic_string<char, std::char_traits<char>, std::allocator<char> > >]’
/usr/local/src/freeorion/FreeOrion/GG/tutorial/adam.cpp:980:   instantiated from here
/usr/include/boost/fusion/container/list/cons.hpp:82: error: invalid conversion from ‘const std::vector<adobe::adam_callback_suite_t::relation_t, std::allocator<adobe::adam_callback_suite_t::relation_t> >* const’ to ‘std::vector<adobe::adam_callback_suite_t::relation_t, std::allocator<adobe::adam_callback_suite_t::relation_t> >*’
make[2]: *** [tutorial/CMakeFiles/adam.dir/adam.cpp.o] Error 1
make[1]: *** [tutorial/CMakeFiles/adam.dir/all] Error 2
make: *** [all] Error 2

User avatar
Geoff the Medio
Programming, Design, Admin
Posts: 13603
Joined: Wed Oct 08, 2003 1:33 am
Location: Munich

Re: Linux: Crash when building Mark I and designing ships

#11 Post by Geoff the Medio »

RgnadKzin wrote:I can't get GG to compile after svn update
Don't build the tutorials.

User avatar
RgnadKzin
Space Squid
Posts: 67
Joined: Sun Aug 15, 2010 2:25 am

Re: Linux: Crash when building Mark I and designing ships

#12 Post by RgnadKzin »

I suspect that excluding the tutorials is done within the CMakeList.txt.
It looks like I turn off an option within ccmake.

Yes, that seems to have allowed GG to compile.

Post Reply