Springlobby crashes with "*** Caught unhandled unknown exception; terminating"

Springlobby crashes with "*** Caught unhandled unknown exception; terminating"

Moderators: Moderators, Lobby Developers

Post Reply
aleksey
Posts: 13
Joined: 29 Apr 2011, 07:44

Springlobby crashes with "*** Caught unhandled unknown exception; terminating"

Post by aleksey »

I recently upgraded from Ubuntu 15.04 to 15.10, and springlobby stopped working. It crashes with the message "*** Caught unhandled unknown exception; terminating" immediately after I run the command.

The version of the lobby does not seem to matter. I tried version 0.224, which comes with Ubuntu, and it crashes. I also compiled version 0.243 on my own, and it crashes with the same message.

I renamed the dirs "~/.spring", "~/.springlobby", and "~/.config/spring", because I thought something in them might cause the problem. This did not fix it.

Running "springlobby -cl -l 5" gives:
Message /home/aleksey/Downloads/springlobby-0.243/src/springlobbyapp.cpp:119 SpringLobby 0.243 started
*** Caught unhandled unknown exception; terminating

or, "/usr/games/springlobby -cl -l 5", gives:
Message: SpringLobby 0.224 started
*** Caught unhandled unknown exception; terminating


If I can assist in any way (by running some debugging commands, or listing the versions of the libraries I have installed, or whatever), I will be happy to do it. I will monitor this post frequently. Please help, I really miss my favourite game.

Thanks.
abma
Spring Developer
Posts: 3798
Joined: 01 Jun 2009, 00:08

Re: Springlobby crashes with "*** Caught unhandled unknown exception; terminating"

Post by abma »

can you start with springlobby -
aleksey wrote:I also compiled version 0.243 on my own, and it crashes with the same message.

can you please run your self-compiled version with:

Code: Select all

gdb springlobby
run
and after it crashes:

Code: Select all

bt
which should give a backtrace with source filenames / line numbers and copy/paste the output? (ideally at paste.springfiles.com or sth. similar)
aleksey
Posts: 13
Joined: 29 Apr 2011, 07:44

Re: Springlobby crashes with "*** Caught unhandled unknown exception; terminating"

Post by aleksey »

Reading symbols from /usr/local/bin/springlobby...done.
(gdb) run
Starting program: /usr/local/bin/springlobby
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
[New Thread 0x7fffe4028700 (LWP 21453)]
[New Thread 0x7fffe3827700 (LWP 21454)]
[New Thread 0x7fffe3026700 (LWP 21455)]
*** Caught unhandled unknown exception; terminating
[Thread 0x7fffe3026700 (LWP 21455) exited]
[Thread 0x7fffe3827700 (LWP 21454) exited]
[Thread 0x7ffff7f99a00 (LWP 21449) exited]
[Inferior 1 (process 21449) exited with code 0377]
(gdb) bt
No stack.
(gdb)
aleksey
Posts: 13
Joined: 29 Apr 2011, 07:44

Re: Springlobby crashes with "*** Caught unhandled unknown exception; terminating"

Post by aleksey »

To follow up on that, is there a way to re-compile spring lobby with debugging symbols on? Or are they on by default? Or, is it not the issue?
abma
Spring Developer
Posts: 3798
Joined: 01 Jun 2009, 00:08

Re: Springlobby crashes with "*** Caught unhandled unknown exception; terminating"

Post by abma »

aleksey wrote:To follow up on that, is there a way to re-compile spring lobby with debugging symbols on? Or are they on by default? Or, is it not the issue?
it shows no issue because springlobby doesn't crash, it quits because of the unhandled exception.

to get a stacktrace

Code: Select all

gdb springlobby
catch throw
run
this will stop on all exceptions. possible there are some exceptions before the unhandled exception, sorry can't give very good instructions.
maybe "catch exception unhandled" works as excepted. you can verify by running multiple times, just type "cont" to make the program continue / or run when it quit.

when gdb stopped at the correct place, type "bt" to get a backtrace.


to change the buildtype edit CMakeCache.txt and set CMAKE_BUILD_TYPE to DEBUG
aleksey
Posts: 13
Joined: 29 Apr 2011, 07:44

Re: Springlobby crashes with "*** Caught unhandled unknown exception; terminating"

Post by aleksey »

I recompiled with CMAKE_BUILD_TYPE=DEBUG.

(gdb) catch throw
Catchpoint 1 (throw)
(gdb) run
Starting program: /home/aleksey/Downloads/springlobby-0.243/src/springlobby
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
[New Thread 0x7fffe4028700 (LWP 29097)]
[New Thread 0x7fffe3827700 (LWP 29098)]
[Debug] /home/aleksey/Downloads/springlobby-0.243/src/downloader/lib/src/FileSystem/FileSystem.cpp:237:createSubdirs(): Checking /home
[Debug] /home/aleksey/Downloads/springlobby-0.243/src/downloader/lib/src/FileSystem/FileSystem.cpp:237:createSubdirs(): Checking /home/aleksey
[New Thread 0x7fffe3026700 (LWP 29099)]
[Debug] /home/aleksey/Downloads/springlobby-0.243/src/downloader/lib/src/FileSystem/FileSystem.cpp:237:createSubdirs(): Checking /home
[Debug] /home/aleksey/Downloads/springlobby-0.243/src/downloader/lib/src/FileSystem/FileSystem.cpp:237:createSubdirs(): Checking /home/aleksey
[Debug] /home/aleksey/Downloads/springlobby-0.243/src/downloader/lib/src/FileSystem/FileSystem.cpp:237:createSubdirs(): Checking /home/aleksey/.springlobby
Catchpoint 1 (exception thrown), 0x00007ffff4199bcd in __cxa_throw () from /usr/lib/x86_64-linux-gnu/libstdc++.so.6
(gdb) bt
#0 0x00007ffff4199bcd in __cxa_throw () from /usr/lib/x86_64-linux-gnu/libstdc++.so.6
#1 0x0000000000aadcaa in LSL::_LoadLibrary (libpath="/usr/local/lib/libunitsync.so") at /home/aleksey/Downloads/springlobby-0.243/src/lsl/src/lslunitsync/sharedlib.cpp:47
#2 0x0000000000a9051c in LSL::SpringBundle::GetBundleVersion (this=0x7fffffffd860) at /home/aleksey/Downloads/springlobby-0.243/src/lsl/src/lslunitsync/springbundle.cpp:20
#3 0x0000000000a90d52 in LSL::SpringBundle::AutoComplete (this=0x7fffffffd860, searchpath="/usr/local/lib")
at /home/aleksey/Downloads/springlobby-0.243/src/lsl/src/lslunitsync/springbundle.cpp:107
#4 0x0000000000a91b29 in LSL::SpringBundle::LocateSystemInstalledSpring (bundle=...)
at /home/aleksey/Downloads/springlobby-0.243/src/lsl/src/lslunitsync/springbundle.cpp:170
#5 0x00000000009ffb17 in SlPaths::RefreshSpringVersionList (autosearch=true, additionalbundle=0x0) at /home/aleksey/Downloads/springlobby-0.243/src/utils/slpaths.cpp:169
#6 0x00000000007f33b3 in SpringLobbyApp::OnInit (this=0x12b5050) at /home/aleksey/Downloads/springlobby-0.243/src/springlobbyapp.cpp:163
#7 0x00000000007f47f3 in wxAppConsoleBase::CallOnInit (this=0x12b5050) at /usr/include/wx-3.0/wx/app.h:93
#8 0x00007ffff59b6ea2 in wxEntry (argc=<optimized out>, argv=<optimized out>) at ../src/common/init.cpp:479
#9 0x00000000007f2c00 in main (argc=1, argv=0x7fffffffde78) at /home/aleksey/Downloads/springlobby-0.243/src/springlobbyapp.cpp:70
(gdb) cont
Continuing.
*** Caught unhandled unknown exception; terminating
[Thread 0x7fffe3026700 (LWP 29099) exited]
[Thread 0x7fffe4028700 (LWP 29097) exited]
[Thread 0x7ffff7f98a00 (LWP 29093) exited]
[Inferior 1 (process 29093) exited with code 0377]


I noticed this: "#1 0x0000000000aadcaa in LSL::_LoadLibrary (libpath="/usr/local/lib/libunitsync.so")..."
There is indeed libunitsync.so file there. It's dated Nov. 29, 2014.

I removed that file, and the lobby launched ok.
Then I moved ~/.spring/ directory back (I renamed it earlier, because I thought it might be causing problems), and tried again:

(gdb) catch throw
Catchpoint 1 (throw)
(gdb) run
Starting program: /home/aleksey/Downloads/springlobby-0.243/src/springlobby
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
[New Thread 0x7fffe4028700 (LWP 31208)]
[Debug] /home/aleksey/Downloads/springlobby-0.243/src/downloader/lib/src/FileSystem/FileSystem.cpp:237:createSubdirs(): Checking /home
[Debug] /home/aleksey/Downloads/springlobby-0.243/src/downloader/lib/src/FileSystem/FileSystem.cpp:237:createSubdirs(): Checking /home/aleksey
[New Thread 0x7fffe3827700 (LWP 31209)]
[New Thread 0x7fffe3026700 (LWP 31210)]
[Debug] /home/aleksey/Downloads/springlobby-0.243/src/downloader/lib/src/FileSystem/FileSystem.cpp:237:createSubdirs(): Checking /home
[Debug] /home/aleksey/Downloads/springlobby-0.243/src/downloader/lib/src/FileSystem/FileSystem.cpp:237:createSubdirs(): Checking /home/aleksey
[Debug] /home/aleksey/Downloads/springlobby-0.243/src/downloader/lib/src/FileSystem/FileSystem.cpp:237:createSubdirs(): Checking /home/aleksey/.springlobby
*** Error in `/home/aleksey/Downloads/springlobby-0.243/src/springlobby': free(): invalid pointer: 0x00000000013b3af8 ***

Program received signal SIGABRT, Aborted.
0x00007ffff3858267 in __GI_raise (sig=sig@entry=6)
at ../sysdeps/unix/sysv/linux/raise.c:55
55 ../sysdeps/unix/sysv/linux/raise.c: No such file or directory.
(gdb) bt
#0 0x00007ffff3858267 in __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:55
#1 0x00007ffff3859eca in __GI_abort () at abort.c:89
#2 0x00007ffff389bbf3 in __libc_message (do_abort=do_abort@entry=1, fmt=fmt@entry=0x7ffff39b4168 "*** Error in `%s': %s: 0x%s ***\n") at ../sysdeps/posix/libc_fatal.c:175
#3 0x00007ffff38a3c09 in malloc_printerr (ptr=<optimized out>, str=0x7ffff39b02ba "free(): invalid pointer", action=1) at malloc.c:4965
#4 _int_free (av=<optimized out>, p=<optimized out>, have_lock=0) at malloc.c:3834
#5 0x00007ffff38a783c in __GI___libc_free (mem=<optimized out>) at malloc.c:2950
#6 0x0000000000a6bc4a in boost::filesystem::path::~path (this=0x7fffe04ba230, __in_chrg=<optimized out>) at /usr/include/boost/filesystem/path.hpp:55
#7 0x00007ffff385d0da in __cxa_finalize (d=0x7fffe0294560) at cxa_finalize.c:56
#8 0x00007fffe00b1f63 in ?? () from /home/aleksey/.spring/engine/100.0.1-1218-gdc0df52 develop/libunitsync.so
#9 0x00007fffffffd150 in ?? ()
#10 0x00007ffff7def11f in _dl_close_worker (map=<optimized out>) at dl-close.c:274
Backtrace stopped: frame did not save the PC

This time, I noticed this line:
#8 0x00007fffe00b1f63 in ?? () from /home/aleksey/.spring/engine/100.0.1-1218-gdc0df52 develop/libunitsync.so

I removed that engine dir from /home/aleksey/.spring/engine/. Then I tried again.

Without pasting the whole thing, the next offender was the 101.0 engine:
#8 0x00007fffe00b1f63 in ?? () from /home/aleksey/.spring/engine/101.0/libunitsync.so

Again, I removed that engine dir, and now springlobby launched ok.

When I joined a battleroom and pressed Start to spectate an ongoing battle, nothing happened.
In the terminal window, I saw that it was trying to use /usr/local/bin/spring, and could not find boost 1.55 libraries (I have 1.58 installed now).
I still had a very old version of the spring engine installed there, probably 94 or something, from the time before the lobby supported multiple engines, and spring stored them each in its own directory. So, I removed that old engine, and everything seems to work now!

Thank you for you help!
abma
Spring Developer
Posts: 3798
Joined: 01 Jun 2009, 00:08

Re: Springlobby crashes with "*** Caught unhandled unknown exception; terminating"

Post by abma »

very likely thats the same issue as https://springrts.com/mantis/view.php?id=5050

i was just confused by the "caught unhandled exception" as i got "free(): invalid pointer"
User avatar
Peet
Malcontent
Posts: 4383
Joined: 27 Feb 2006, 22:04

Re: Springlobby crashes with "*** Caught unhandled unknown exception; terminating"

Post by Peet »

I had this issue also when I installed 101 via SL. The glibc abi change does seem a viable explanation
Post Reply

Return to “SpringLobby Client”