Author Topic: v3.6.0.2: Segfault after successful techtree validation  (Read 1101 times)

tomreyn

  • MegaGlest Team
  • Airship
  • ********
  • Posts: 2,764
    • View Profile
    • MegaGlest - the free and open source cross platform 3D real-time strategy game
v3.6.0.2: Segfault after successful techtree validation
« on: 14 January 2012, 11:43:41 »
Code: [Select]
tomreyn@atibox:~/megaglest-3.6.0.2$ ./start_megaglest --validate-techtrees=annex_base_battle
gamedir [/home/tomreyn/megaglest-3.6.0.2]
Looking for LDCONFIG []...
LDCONFIG environment variable is not set...
Found LDCONFIG using which [/sbin/ldconfig]...
default library [/home/tomreyn/megaglest-3.6.0.2/lib/libopenal.so.1] was found in [/usr/lib/libopenal.so.1]
default library [/home/tomreyn/megaglest-3.6.0.2/lib/libdirectfb-1.2.so.0] is missing, attempting to find and link to a newer version if available...
new library link [/usr/lib/libdirectfb-1.2.so.9] pointed to from [/home/tomreyn/megaglest-3.6.0.2/lib/libdirectfb-1.2.so.0]
default library [/home/tomreyn/megaglest-3.6.0.2/lib/libfusion-1.2.so.0] is missing, attempting to find and link to a newer version if available...
new library link [/usr/lib/libfusion-1.2.so.9] pointed to from [/home/tomreyn/megaglest-3.6.0.2/lib/libfusion-1.2.so.0]
default library [/home/tomreyn/megaglest-3.6.0.2/lib/libdirect-1.2.so.0] is missing, attempting to find and link to a newer version if available...
new library link [/usr/lib/libdirect-1.2.so.9] pointed to from [/home/tomreyn/megaglest-3.6.0.2/lib/libdirect-1.2.so.0]
default library [/home/tomreyn/megaglest-3.6.0.2/lib/libjpeg.so.62] was found in [/usr/lib/x86_64-linux-gnu/libjpeg.so.62]
default library [/home/tomreyn/megaglest-3.6.0.2/lib/libpng15.so.15] is missing, attempting to find and link to a newer version if available...
new library link [/lib/x86_64-linux-gnu/libpng12.so.0] pointed to from [/home/tomreyn/megaglest-3.6.0.2/lib/libpng15.so.15]
default library [/home/tomreyn/megaglest-3.6.0.2/lib/libcurl.so.4] was found in [/usr/lib/x86_64-linux-gnu/libcurl.so.4]
default library [/home/tomreyn/megaglest-3.6.0.2/lib/libxerces-c-3.1.so] was found in [/usr/lib/libxerces-c-3.1.so]
default library [/home/tomreyn/megaglest-3.6.0.2/lib/libicudata.so.40] is missing, attempting to find and link to a newer version if available...
new library link [/usr/lib/libicudata.so.44] pointed to from [/home/tomreyn/megaglest-3.6.0.2/lib/libicudata.so.40]
default library [/home/tomreyn/megaglest-3.6.0.2/lib/libicuuc.so.40] is missing, attempting to find and link to a newer version if available...
new library link [/usr/lib/libicuuc.so.44] pointed to from [/home/tomreyn/megaglest-3.6.0.2/lib/libicuuc.so.40]
default library [/home/tomreyn/megaglest-3.6.0.2/lib/libGLEW.so.1.5] was found in [/usr/lib/libGLEW.so.1.5]
default library [/home/tomreyn/megaglest-3.6.0.2/lib/libGLEW.so.1.5] was found in [/usr/lib/libGLEW.so.1.5]
default library [/home/tomreyn/megaglest-3.6.0.2/lib/libogg.so.0] was found in [/usr/lib/x86_64-linux-gnu/libogg.so.0]
default library [/home/tomreyn/megaglest-3.6.0.2/lib/libvorbis.so.0] was found in [/usr/lib/x86_64-linux-gnu/libvorbis.so.0]
default library [/home/tomreyn/megaglest-3.6.0.2/lib/libvorbisfile.so.3] was found in [/usr/lib/x86_64-linux-gnu/libvorbisfile.so.3]
default library [/home/tomreyn/megaglest-3.6.0.2/lib/libfontconfig.so.1] was found in [/usr/lib/x86_64-linux-gnu/libfontconfig.so.1]
default library [/home/tomreyn/megaglest-3.6.0.2/lib/libfreetype.so.6] was found in [/usr/lib/x86_64-linux-gnu/libfreetype.so.6]
default library [/home/tomreyn/megaglest-3.6.0.2/lib/libgnutls.so.26] was found in [/usr/lib/x86_64-linux-gnu/libgnutls.so.26]
default library [/home/tomreyn/megaglest-3.6.0.2/lib/libldap_r-2.4.so.2] was found in [/usr/lib/x86_64-linux-gnu/libldap_r-2.4.so.2]
default library [/home/tomreyn/megaglest-3.6.0.2/lib/libresolv.so.2] was found in [/lib/x86_64-linux-gnu/libresolv.so.2]
default library [/home/tomreyn/megaglest-3.6.0.2/lib/liblua5.1.so.0] was found in [/usr/lib/x86_64-linux-gnu/liblua5.1.so.0]
default library [/home/tomreyn/megaglest-3.6.0.2/lib/libftgl.so.2] was found in [/usr/lib/libftgl.so.2]
default library [/home/tomreyn/megaglest-3.6.0.2/lib/libircclient.so.1] was found in [/usr/lib/libircclient.so.1]
default library [/home/tomreyn/megaglest-3.6.0.2/lib/libdl.so.2] was found in [/lib/x86_64-linux-gnu/libdl.so.2]
ATTENTION: default value of option vblank_mode overridden by environment.
ATTENTION: default value of option vblank_mode overridden by environment.
ATTENTION: option value of option vblank_mode ignored.
====== Started Validation ======
Filtering techtrees and only looking for the following:
annex_base_battle

---------------- Loading factions inside world ----------------
----------------------------------------------------------------
Checking techPath [/home/tomreyn/.megaglest/techs/] techName [annex_base_battle] total faction count = 1
Using faction [alliance]

Checking resources, count = 3
Found techtree resource [credit]
Found techtree resource [supplies]
Found techtree resource [unit]
Found techtree filecount = 637, used = 411

Warning, unused files were detected - START:
=====================
[/home/tomreyn/.megaglest/techs/annex_base_battle/icons/icons/advmech.bmp]
[many more lines like this removed off this output]
[/home/tomreyn/.megaglest/techs/annex_base_battle/voice/complete.wav]

Warning, unused files were detected - END:

Validation found NO ERRORS for techPath [/home/tomreyn/.megaglest/techs/] techName [annex_base_battle] factions checked (count = 1):
Faction [alliance]
----------------------------------------------------------------
====== Finished Validation ======
In [/home/softcoder/Code/megaglest/trunk/source/glest_game/main/main.cpp::handleSIGSEGV Line: 652] Error detected: signal 11:
Error saved to logfile [/home/tomreyn/.megaglest/error.log]
[2012-01-14 12:36:41] *ERROR* In [/home/softcoder/Code/megaglest/trunk/source/glest_game/main/main.cpp::handleRuntimeError Line: 416] [In [/home/softcoder/Code/megaglest/trunk/source/glest_game/main/main.cpp::handleSIGSEGV Line: 652] Error detected: signal 11:
] gameInitialized = 0, program = 0x2c6b190
Segmentation fault (core dumped)

error.log and stacktrace:
Code: [Select]
tomreyn@atibox:~/megaglest-3.6.0.2$ cat /home/tomreyn/.megaglest/error.log
[2012-01-14 12:36:41] Runtime Error information:
======================================================
In [/home/softcoder/Code/megaglest/trunk/source/glest_game/main/main.cpp::handleSIGSEGV Line: 652] Error detected: signal 11:

tomreyn@atibox:~/megaglest-3.6.0.2$ gdb -q -n -ex bt -batch megaglest core
[New LWP 29161]
[New LWP 29165]
[New LWP 29168]
[New LWP 29166]
[New LWP 29164]
[New LWP 29169]
[New LWP 29170]
[New LWP 29163]

warning: Can't read pathname for load map: input/output error.
[Thread debugging using libthread_db enabled]
Core was generated by `./megaglest --validate-techtrees=annex_base_battle'.
Program terminated with signal 11, Segmentation fault.
#0  0x00007f5299c6b046 in ?? () from /lib/x86_64-linux-gnu/libgcc_s.so.1
#0  0x00007f5299c6b046 in ?? () from /lib/x86_64-linux-gnu/libgcc_s.so.1
#1  0x00007f5299c6bd5d in _Unwind_Backtrace () from /lib/x86_64-linux-gnu/libgcc_s.so.1
#2  0x00007f52999b5950 in __GI___backtrace (array=<optimized out>, size=15) at ../sysdeps/x86_64/../ia64/backtrace.c:91
#3  0x00000000006ed630 in Glest::Game::ExceptionHandler::handleRuntimeError(char const*) ()
#4  0x00000000006d3492 in Glest::Game::handleSIGSEGV (sig=<optimized out>) at /home/softcoder/Code/megaglest/trunk/source/glest_game/main/main.cpp:656
#5  <signal handler called>
#6  0x00000000000000f1 in ?? ()
#7  0x00000000008ef90f in Glest::Game::ResourceType::~ResourceType (this=0x3527030, __in_chrg=<optimized out>) at /home/softcoder/Code/megaglest/trunk/source/glest_game/types/resource_type.cpp:45
#8  0x00000000008f4868 in _Destroy<Glest::Game::ResourceType> (__pointer=<optimized out>) at /usr/include/c++/4.4/bits/stl_construct.h:83
#9  __destroy<Glest::Game::ResourceType*> (__last=<optimized out>, __first=<optimized out>) at /usr/include/c++/4.4/bits/stl_construct.h:93
#10 _Destroy<Glest::Game::ResourceType*> (__last=<optimized out>, __first=0x3527030) at /usr/include/c++/4.4/bits/stl_construct.h:116
#11 _Destroy<Glest::Game::ResourceType*, Glest::Game::ResourceType> (__last=<optimized out>, __first=<optimized out>) at /usr/include/c++/4.4/bits/stl_construct.h:142
#12 ~vector (this=<optimized out>, __in_chrg=<optimized out>) at /usr/include/c++/4.4/bits/stl_vector.h:313
#13 Glest::Game::TechTree::~TechTree (this=0x3234790, __in_chrg=<optimized out>) at /home/softcoder/Code/megaglest/trunk/source/glest_game/types/tech_tree.cpp:219
#14 0x0000000000906ae9 in Glest::Game::World::cleanup (this=0x7fff91b1fe00) at /home/softcoder/Code/megaglest/trunk/source/glest_game/world/world.cpp:115
#15 0x000000000090ad50 in Glest::Game::World::~World (this=0x7fff91b1fe00, __in_chrg=<optimized out>) at /home/softcoder/Code/megaglest/trunk/source/glest_game/world/world.cpp:145
#16 0x00000000006dfd69 in Glest::Game::runTechValidationReport (argc=-1850602288, argv=0x7fff91b20ff8) at /home/softcoder/Code/megaglest/trunk/source/glest_game/main/main.cpp:2040
#17 0x00000000006e7610 in Glest::Game::glestMain (argc=2, argv=0x7fff91b22be8) at /home/softcoder/Code/megaglest/trunk/source/glest_game/main/main.cpp:3458
#18 0x00000000006ea1d3 in Glest::Game::glestMainWrapper (argc=2, argv=0x7fff91b22be8) at /home/softcoder/Code/megaglest/trunk/source/glest_game/main/main.cpp:3762
#19 0x00007f52998de30d in __libc_start_main (main=0x6ea2d0 <main(int, char**)>, argc=2, ubp_av=0x7fff91b22be8, init=<optimized out>, fini=<optimized out>, rtld_fini=<optimized out>, stack_end=0x7fff91b22bd8) at libc-start.c:226
#20 0x00000000005bf869 in _start () at ../sysdeps/x86_64/elf/start.S:113

In fact I think it is also an error to make the game segfault when techtree validation fails. It should error out, but handle this situation gracefully and not run into a segmentation fault.
atibox: Ryzen 1800X (8 cores @3.6GHz), 32 GB RAM, MSI Radeon RX 580 Gaming X 8G, PCI subsystem ID [1462:3417], (Radeon RX 580 chipset, POLARIS10) @3440x1440; latest stable Ubuntu release, (open source) radeon (amdgpu) / mesa video driver
atibox (old): Core2Quad Q9400 (4 cores @2.66GHz), 8 GB RAM, XFX HD-467X-DDF2, PCI subsystem ID [1682:2931], (Radeon HD 4670, RV730 XT) @1680x1050; latest stable Ubuntu release, (open source) radeon / mesa video driver
notebook: HP envy13d020ng
internet access: VDSL2+

· · · How YOU can contribute to MG · Latest development snapshot · How to build yourself · Megapack techtree · Currently hosted MG games · · ·