megaglest-source icon indicating copy to clipboard operation
megaglest-source copied to clipboard

Crash after the battle

Open filux opened this issue 7 years ago • 6 comments

Sometimes after the battle I see a crash. No idea how to reproduce this and this doesn't happen very often.

Sun Dec 18 21:55:57 CET 2016

$ ./megaglest
megaglest v3.12-dev
Compiled using: GNUC: 60200 [64bit] platform: Linux-X64 endianness: little
GIT: [Rev: 5543.c741c67] - using STREFLOP [SSE] - [no-denormals]
*ERROR* [2016-12-18 23:09:07] In [source/glest_game/network/client_interface.cpp::updateFrame Line: 1223] error retrieving nmtQuit returned false!

terminate called after throwing an instance of 'Shared::Platform::megaglest_runtime_error'
  what():  In [thread.cpp::removeThreadFromList Line: 164] iterFind == Thread::threadList.end() Thread::threadList.size() = 1
Stack Trace:
./megaglest:Shared::Platform::megaglest_runtime_error::megaglest_runtime_error(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, bool)address [0x564dc15e7bfc] line: 0
./megaglest:Shared::Platform::Thread::removeThreadFromList()address [0x564dc15e8a10] line: 0
./megaglest:Shared::Platform::Thread::~Thread()address [0x564dc15e965c] line: 0
./megaglest:Shared::PlatformCommon::BaseThread::~BaseThread()address [0x564dc1593e5e] line: 0
./megaglest:Shared::Platform::Thread::shutdownThreads()address [0x564dc15e8e40] line: 0
./megaglest:()address [0x564dc11bb448] line: 0
./megaglest:Glest::Game::glestMainSEHWrapper(int, char**)address [0x564dc11d804b] line: 0
/lib/x86_64-linux-gnu/libc.so.6:__libc_start_main()address [0x7f6ac400f2b1] line: 0
./megaglest:_start()address [0x564dc0fff68a] line: 0
Aborted (core dumped)
$ gdb -q -n -ex "bt" -batch ./megaglest ./core
[New LWP 25586]
[New LWP 25587]
[New LWP 25588]
[New LWP 25630]
[New LWP 25593]
[New LWP 25592]
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
Core was generated by `mk/l'.
Program terminated with signal SIGABRT, Aborted.
#0  __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:58
58	../sysdeps/unix/sysv/linux/raise.c: No such file or directory.
[Current thread is 1 (Thread 0x7f6ac86e16c0 (LWP 25586))]
#0  __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:58
#1  0x00007f6ac402340a in __GI_abort () at abort.c:89
#2  0x00007f6ac463504d in __gnu_cxx::__verbose_terminate_handler() () from /usr/lib/x86_64-linux-gnu/libstdc++.so.6
#3  0x00007f6ac4633016 in ?? () from /usr/lib/x86_64-linux-gnu/libstdc++.so.6
#4  0x00007f6ac4632049 in ?? () from /usr/lib/x86_64-linux-gnu/libstdc++.so.6
#5  0x00007f6ac463299d in __gxx_personality_v0 () from /usr/lib/x86_64-linux-gnu/libstdc++.so.6
#6  0x00007f6ac439cf43 in ?? () from /lib/x86_64-linux-gnu/libgcc_s.so.1
#7  0x00007f6ac439d447 in _Unwind_Resume () from /lib/x86_64-linux-gnu/libgcc_s.so.1
#8  0x0000564dc15e88fd in __gnu_cxx::new_allocator<char>::deallocate (this=<optimized out>, __p=<optimized out>) at /usr/include/c++/6/ext/new_allocator.h:110
#9  std::allocator_traits<std::allocator<char> >::deallocate (__a=..., __n=<optimized out>, __p=<optimized out>) at /usr/include/c++/6/bits/alloc_traits.h:442
#10 std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::_M_destroy (__size=<optimized out>, this=<optimized out>) at /usr/include/c++/6/bits/basic_string.h:186
#11 std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::_M_dispose (this=<optimized out>) at /usr/include/c++/6/bits/basic_string.h:181
#12 Shared::Platform::Thread::removeThreadFromList (this=this@entry=0x7f6a80001b00) at /usr/include/c++/6/bits/basic_string.h:558
#13 0x0000564dc15e965c in Shared::Platform::Thread::~Thread (this=0x7f6a80001b00, __in_chrg=<optimized out>) at source/shared_lib/sources/platform/sdl/thread.cpp:249
#14 0x0000564dc1593e5e in Shared::PlatformCommon::BaseThread::~BaseThread (this=0x7f6a80001b00, __in_chrg=<optimized out>) at source/shared_lib/sources/platform/common/base_thread.cpp:62
#15 0x0000564dc15e8e40 in Shared::Platform::ThreadGarbageCollector::~ThreadGarbageCollector (this=0x7f6a80001b00, __in_chrg=<optimized out>) at source/shared_lib/sources/platform/sdl/thread.cpp:66
#16 Shared::Platform::ThreadGarbageCollector::~ThreadGarbageCollector (this=0x7f6a80001b00, __in_chrg=<optimized out>) at source/shared_lib/sources/platform/sdl/thread.cpp:72
#17 std::default_delete<Shared::Platform::ThreadGarbageCollector>::operator() (this=<optimized out>, __ptr=0x7f6a80001b00) at /usr/include/c++/6/bits/unique_ptr.h:76
#18 std::unique_ptr<Shared::Platform::ThreadGarbageCollector, std::default_delete<Shared::Platform::ThreadGarbageCollector> >::reset (__p=0x7f6a80001b00, this=0x564dc1c47640 <Shared::Platform::cleanupThread>) at /usr/include/c++/6/bits/unique_ptr.h:347
#19 Shared::Platform::Thread::shutdownThreads () at source/shared_lib/sources/platform/sdl/thread.cpp:201
#20 0x0000564dc11bb448 in Glest::Game::cleanupProcessObjects () at source/glest_game/main/main.cpp:242
#21 0x0000564dc11d804b in Glest::Game::glestMainSEHWrapper (argc=1, argv=0x7ffd6e7427d8) at source/glest_game/main/main.cpp:5975
#22 0x00007f6ac400f2b1 in __libc_start_main (main=0x564dc0ffc810 <main(int, char**)>, argc=1, argv=0x7ffd6e7427d8, init=<optimized out>, fini=<optimized out>, rtld_fini=<optimized out>, stack_end=0x7ffd6e7427c8) at ../csu/libc-start.c:291
#23 0x0000564dc0fff68a in _start () at source/glest_game/main/main.cpp:6061

OS info. [Debian GNU/Linux testing (stretch)], Arch.[x86_64], Dir.[mk/linux]

filux avatar Dec 19 '16 18:12 filux

If this condition happens again hopefully it will not crash.. it will only output the condition to console and continue quitting the game.

softcoder avatar Feb 05 '17 02:02 softcoder

This output appears to be the same as what's shown in #149

andy5995 avatar Feb 21 '17 17:02 andy5995

I get this almost every time on my self-build of 3.13.0, just as I did with 3.13-dev.

But I don't see it reproducing when I run the MG installation from the Linux installer.

CPU cores detected: 4
CPU cores to be used: 4
We have detected the following system:
 [ Debian ] [ 9.0 ] [ stretch ] [ x86_64 ]
Turning ON dynamic FTGL, LUA, PNG ... and forcing use the embedded IRCCLIENT
Calling cmake with EXTRA_CMAKE_OPTIONS =  -DSTATIC_FontConfig=OFF -DWANT_USE_OpenSSL=OFF -DSTATIC_FTGL=OFF -DSTATIC_LUA=OFF -DSTATIC_PNG=OFF -DSTATIC_OGG=OFF -DFORCE_USE_EMBEDDED_Ircclient=ON
-- CMAKE_SOURCE_DIR = /home/andy/megaglest-3.13-self-build
-- Build type for this compile will be: RelWithDebInfo
-- Determining version number system type to use:
-- ** Trying 3 part versioning 
-- Detected MegaGlest Version is [v3.13.0] 
-- Detected GNUC Compiler...
-- *NOTE: Checking for max SSE LEVEL [1]
-- Max SSE desired: [1]
-- Performing Test HAS_SSE3_EXTENSIONS
-- Performing Test HAS_SSE3_EXTENSIONS - Success
-- Performing Test HAS_SSE2_EXTENSIONS
-- Performing Test HAS_SSE2_EXTENSIONS - Success
-- Performing Test HAS_SSE_EXTENSIONS
-- Performing Test HAS_SSE_EXTENSIONS - Success
-- Found SSE extensions, using flags: -msse -mfpmath=sse
-- *NOTE: using SSE for STREFLOP.
-- Performing Test HAS_GCC_BACKTRACE
-- Performing Test HAS_GCC_BACKTRACE - Success
-- Found GCC backtrace lib, will support backtraces
-- Found Git: /usr/bin/git (found version "2.11.0") 
-- *NOTE: NOT USING a Custom Data Install Path...
-- CMAKE_CXX_FLAGS_RELWITHDEBINFO: -O3 -O2 -g -DNDEBUG -g -O3  
-- **Found game source code.
-- Found PkgConfig: /usr/bin/pkg-config (found version "0.29") 
-- Checking for one of the modules 'streflop-sse'
-- Checking for one of the modules 'streflop'
-- Search for Library STREFLOP result =  libs:  include dirs: 
-- Will try to build MegaGlest shared library
-- Found CURL: /usr/lib/x86_64-linux-gnu/libcurl.so (found version "7.52.1") 
-- CURL RET = 0 libs: [-Wl,-Bstatic -lcurl -Wl,-Bdynamic -Wl,-z,relro -Wl,-z,now -Wl,--as-needed -lnghttp2 -lidn2 -lrtmp -lssh2 -lpsl -lnettle -lgnutls -L/usr/lib/x86_64-linux-gnu/mit-krb5 -Wl,-z,relro -lgssapi_krb5 -lkrb5 -lk5crypto -lcom_err -llber -llber -lldap -lz]
-- #2 CURL RET = 0, using CURL static libs
-- Looking for pthread.h
-- Looking for pthread.h - found
-- Looking for pthread_create
-- Looking for pthread_create - not found
-- Looking for pthread_create in pthreads
-- Looking for pthread_create in pthreads - not found
-- Looking for pthread_create in pthread
-- Looking for pthread_create in pthread - found
-- Found Threads: TRUE  
-- Found SDL2: /usr/lib/x86_64-linux-gnu/libSDL2main.a;/usr/lib/x86_64-linux-gnu/libSDL2.so;-lpthread  
-- Found OpenGL: /usr/lib/x86_64-linux-gnu/libGL.so  
-- Looking for XOpenDisplay in /usr/lib/x86_64-linux-gnu/libX11.so;/usr/lib/x86_64-linux-gnu/libXext.so
-- Looking for XOpenDisplay in /usr/lib/x86_64-linux-gnu/libX11.so;/usr/lib/x86_64-linux-gnu/libXext.so - found
-- Looking for gethostbyname
-- Looking for gethostbyname - found
-- Looking for connect
-- Looking for connect - found
-- Looking for remove
-- Looking for remove - found
-- Looking for shmat
-- Looking for shmat - found
-- Looking for IceConnectionNumber in ICE
-- Looking for IceConnectionNumber in ICE - found
-- Found X11: /usr/lib/x86_64-linux-gnu/libX11.so
-- Found OpenAL: /usr/lib/x86_64-linux-gnu/libopenal.so  
-- Found Lua: /usr/lib/x86_64-linux-gnu/liblua5.2.so;/usr/lib/x86_64-linux-gnu/libm.so (found version "5.2.4") 
-- Found JPEG: /usr/lib/x86_64-linux-gnu/libjpeg.a  
-- Found ZLIB: /usr/lib/x86_64-linux-gnu/libz.so (found version "1.2.8") 
-- Found PNG: /usr/lib/x86_64-linux-gnu/libpng.so (found version "1.6.28") 
-- **NOTE: FontConfig support was detected and enabled.
-- Found Freetype: /usr/lib/x86_64-linux-gnu/libfreetype.so (found version "2.6.3") 
-- Found FTGL libraries at /usr/lib/x86_64-linux-gnu/libftgl.so and includes at /usr/include
-- **NOTE: FTGL font support was detected and enabled.
-- Found GLEW: /usr/include  
-- GLEW_LIBRARY: /usr/lib/x86_64-linux-gnu/libGLEW.so
-- Checking for module 'libvlc'
--   Found libvlc, version 2.2.4
-- Found LibVLC include-dir path: [/usr/include]
-- Found LibVLC library path: [/usr/lib/x86_64-linux-gnu/libvlc.so]
-- Found LibVLCcore library path: [/usr/lib/x86_64-linux-gnu/libvlccore.so]
-- Found LibVLC version: 2.2.4 (searched for: 1.1.0)
-- LIBVLC version: 2.2.4
-- **NOTE: LIBVLC found so videos are supported.
-- ** Searching for library: FriBiDi...
-- Checking for one of the modules 'glib-2.0'
-- Found GLib2: glib-2.0 /usr/include/glib-2.0;/usr/lib/x86_64-linux-gnu/glib-2.0/include
-- Looking for include file glib/gregex.h
-- Looking for include file glib/gregex.h - not found
-- Looking for fribidi_utf8_to_unicode in fribidi
-- Looking for fribidi_utf8_to_unicode in fribidi - found
-- Looking for fribidi_charset_to_unicode in fribidi
-- Looking for fribidi_charset_to_unicode in fribidi - found
-- Using FriBiDi: /usr/lib/x86_64-linux-gnu/libfribidi.so
-- BREAKPAD_ROOT=/home/andy/megaglest-3.13-self-build/mk/linux/../../google-breakpad/ Operating system: linux
-- BREAKPAD_INCLUDE_DIR=BREAKPAD_INCLUDE_DIR-NOTFOUND
-- ** WARNING: Could not find GoogleBreakpad. Disabling GoogleBreakpad support.
-- Looking for miniupnpc...
-- Found MINIUPNP: /usr/lib/x86_64-linux-gnu/libminiupnpc.a  
-- Found the miniupnpc headers at /usr/include/miniupnpc
-- Performing Test MINIUPNPC_VERSION_1_7_OR_HIGHER
-- Performing Test MINIUPNPC_VERSION_1_7_OR_HIGHER - Success
-- Found miniupnpc version is v1.7 or higher
-- *** Using miniupnpc lib found in [/usr/include/miniupnpc] MINIUPNP_FOUND [TRUE] MINIUPNP_LIBRARY [/usr/lib/x86_64-linux-gnu/libminiupnpc.a]
-- **No macros required for miniupnpc version
-- *** Using EMBEDDED libircclient because it was forced by option
-- Performing Test HAS_LIBIRCCLIENT_1_6
-- Performing Test HAS_LIBIRCCLIENT_1_6 - Failed
-- EXTERNAL_LIBS = [-Bstatic -Wl,-Bstatic -lcurl -Wl,-Bdynamic -Wl,-z,relro -Wl,-z,now -Wl,--as-needed -lnghttp2 -lidn2 -lrtmp -lssh2 -lpsl -lnettle -lgnutls -L/usr/lib/x86_64-linux-gnu/mit-krb5 -Wl,-z,relro -lgssapi_krb5 -lkrb5 -lk5crypto -lcom_err -llber -llber -lldap -lz;/usr/lib/x86_64-linux-gnu/libSDL2main.a;/usr/lib/x86_64-linux-gnu/libSDL2.so;-lpthread;/usr/lib/x86_64-linux-gnu/libGLU.so;/usr/lib/x86_64-linux-gnu/libGL.so;/usr/lib/x86_64-linux-gnu/libSM.so;/usr/lib/x86_64-linux-gnu/libICE.so;/usr/lib/x86_64-linux-gnu/libX11.so;/usr/lib/x86_64-linux-gnu/libXext.so;/usr/lib/x86_64-linux-gnu/libopenal.so;/usr/lib/x86_64-linux-gnu/liblua5.2.so;/usr/lib/x86_64-linux-gnu/libm.so;dl;/usr/lib/x86_64-linux-gnu/libjpeg.a;/usr/lib/x86_64-linux-gnu/libpng.so;/usr/lib/x86_64-linux-gnu/libfontconfig.so;/usr/lib/x86_64-linux-gnu/libftgl.so;/usr/lib/x86_64-linux-gnu/libfreetype.so;/usr/lib/x86_64-linux-gnu/libGLEW.so;/usr/lib/x86_64-linux-gnu/libvlccore.so;/usr/lib/x86_64-linux-gnu/libvlc.so;/usr/lib/x86_64-linux-gnu/libfribidi.so;glib-2.0;/usr/lib/x86_64-linux-gnu/libminiupnpc.a]
-- Will try to build MegaGlest game
-- OGG/Vorbis includes: /usr/include
-- OGG library        : /usr/lib/x86_64-linux-gnu/libogg.so
-- Vorbis library     : /usr/lib/x86_64-linux-gnu/libvorbis.so
-- Vorbis file library: /usr/lib/x86_64-linux-gnu/libvorbisfile.so
-- CURL RET = 0 libs: [-Wl,-Bstatic -lcurl -Wl,-Bdynamic -Wl,-z,relro -Wl,-z,now -Wl,--as-needed -lnghttp2 -lidn2 -lrtmp -lssh2 -lpsl -lnettle -lgnutls -L/usr/lib/x86_64-linux-gnu/mit-krb5 -Wl,-z,relro -lgssapi_krb5 -lkrb5 -lk5crypto -lcom_err -llber -llber -lldap -lz]
-- #2 CURL RET = 0, using CURL static libs
-- GLEW_LIBRARY: /usr/lib/x86_64-linux-gnu/libGLEW.so
-- Found LibVLC include-dir path: [/usr/include]
-- Found LibVLC library path: [/usr/lib/x86_64-linux-gnu/libvlc.so]
-- Found LibVLCcore library path: [/usr/lib/x86_64-linux-gnu/libvlccore.so]
-- Found LibVLC version: 2.2.4 (searched for: 1.1.0)
-- **NOTE: LIBVLC found so intro videos are supported.
-- Checking for one of the modules 'streflop-sse'
-- Checking for one of the modules 'streflop'
-- Search for Library STREFLOP result =  libs:  include dirs: 
-- ***Note: The final output path for the MegaGlest engine will be [/home/andy/megaglest-3.13-self-build/mk/linux/]
-- BREAKPAD_ROOT=/home/andy/megaglest-3.13-self-build/mk/linux/../../google-breakpad/ Operating system: linux
-- BREAKPAD_INCLUDE_DIR=BREAKPAD_INCLUDE_DIR-NOTFOUND
-- ** WARNING: Could not find GoogleBreakpad. Disabling GoogleBreakpad support.
-- Will try to build MegaGlest map editor
-- Found wxWidgets: -L/usr/lib/x86_64-linux-gnu;-pthread;;;-lwx_gtk2u_gl-3.0;-lwx_gtk2u_core-3.0;-lwx_baseu-3.0 (found version "3.0.2") 
--  wxWidgets: /usr/lib/x86_64-linux-gnu/wx/include/gtk2-unicode-3.0;/usr/include/wx-3.0 ;/;  -L/usr/lib/x86_64-linux-gnu;-pthread;;;-lwx_gtk2u_gl-3.0;-lwx_gtk2u_core-3.0;-lwx_baseu-3.0
-- Checking for one of the modules 'streflop-sse'
-- Checking for one of the modules 'streflop'
-- Search for Library STREFLOP result =  libs:  include dirs: 
-- ***Note: The final output path for MegaGlest Map Editor will be [/home/andy/megaglest-3.13-self-build/mk/linux/]
-- Will try to build MegaGlest model viewer
-- GLEW_LIBRARY: /usr/lib/x86_64-linux-gnu/libGLEW.so
--  wxWidgets: /usr/lib/x86_64-linux-gnu/wx/include/gtk2-unicode-3.0;/usr/include/wx-3.0 ;/;  -L/usr/lib/x86_64-linux-gnu;-pthread;;;-lwx_gtk2u_gl-3.0;-lwx_gtk2u_core-3.0;-lwx_baseu-3.0
-- Checking for one of the modules 'streflop-sse'
-- Checking for one of the modules 'streflop'
-- Search for Library STREFLOP result =  libs:  include dirs: 
-- ***Note: The final output path for MegaGlest G3d Viewer will be [/home/andy/megaglest-3.13-self-build/mk/linux/]
-- Will try to build MegaGlest model import/export tools
-- Found LibXml2: /usr/lib/x86_64-linux-gnu/libxml2.so (found version "2.9.4") 
-- Will try to build MegaGlest unit tests
-- Found CPPUNIT: /usr/lib/x86_64-linux-gnu/libcppunit.so  
-- ** Searching for library: FriBiDi...
-- Using FriBiDi: /usr/lib/x86_64-linux-gnu/libfribidi.so
-- Checking for one of the modules 'streflop-sse'
-- Checking for one of the modules 'streflop'
-- Search for Library STREFLOP result =  libs:  include dirs: 
-- EXTERNAL_LIBS = [/usr/lib/x86_64-linux-gnu/libcppunit.so;/usr/lib/x86_64-linux-gnu/libSDL2main.a;/usr/lib/x86_64-linux-gnu/libSDL2.so;-lpthread;/usr/lib/x86_64-linux-gnu/libfribidi.so;glib-2.0]
-- ***Note: The final output path for the MegaGlest engine will be [/home/andy/megaglest-3.13-self-build/mk/linux/]
-- =====> Found Define: CURL_STATICLIB
-- =====> Found Define: STREFLOP_SSE
-- =====> Found Define: HAS_GCC_BACKTRACE
-- Configuring done
-- Generating done
-- Build files have been written to: /home/andy/megaglest-3.13-self-build/mk/linux/build
==================> About to call make with 4 cores... <==================
[  1%] Built target xml2g
[  1%] Built target g2xml
[ 27%] Built target streflop
[ 60%] Built target libmegaglest
[ 63%] Built target megaglest_tests
[ 65%] Built target megaglest_editor
[ 67%] Built target megaglest_g3dviewer
[100%] Built target megaglest

BUILD COMPLETE.

andy5995 avatar Mar 10 '17 00:03 andy5995

Is this still reproducible using develop?

softcoder avatar Sep 23 '17 06:09 softcoder

  • OS: Debian buster

I reproduced this the first time just by opening MG, going to the lobby, and then exiting MG through the menus:

megaglest v3.13-dev
Compiled using: GNUC: 80300 [64bit] platform: Linux-X64 endianness: little
GIT: [Rev: 5717.41e7ca0] - using STREFLOP [SSE] - [no-denormals]
terminate called after throwing an instance of 'Shared::Platform::megaglest_runtime_error'
  what():  In [thread.cpp::removeThreadFromList Line: 164] iterFind == Thread::threadList.end() Thread::threadList.size() = 1
Stack Trace:
./megaglest:Shared::Platform::megaglest_runtime_error::megaglest_runtime_error(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, bool)address [0x556706c0e1cc] line: 0
./megaglest:Shared::Platform::Thread::removeThreadFromList()address [0x556706c0fbd9] line: 0
./megaglest:Shared::Platform::Thread::~Thread()address [0x556706c0fed9] line: 0
./megaglest:Shared::PlatformCommon::BaseThread::~BaseThread()address [0x556706bc3aaa] line: 0
./megaglest:Shared::Platform::Thread::shutdownThreads()address [0x556706c10674] line: 0
./megaglest:()address [0x5567068a0729] line: 0
./megaglest:Glest::Game::glestMainSEHWrapper(int, char**)address [0x5567068b2e81] line: 0
./megaglest:Glest::Game::glestMainWrapper(int, char**)address [0x5567068b30bb] line: 0
/lib/x86_64-linux-gnu/libc.so.6:__libc_start_main()address [0x7f692c41a09b] line: 0
./megaglest:_start()address [0x556706718dba] line: 0

Aborted

andy5995 avatar May 05 '19 07:05 andy5995

Noticed my build was bit out of date. rebuilt and tried again with GIT: [Rev: 5710.aec1e6d].

The first 4 times I couldn't reproduce, but the fifth time it did. Which has about the same type of randomness as 3.13.0 I would guess.

andy5995 avatar May 05 '19 08:05 andy5995