Emulator Issues #2401
closed
[stable-rc1] x86_64 Linux - Segfault on Stop
Added by benpicco almost 15 years ago.
Relates to performance:
No
Relates to maintainability:
No
Description
What steps will reproduce the problem?
- Play some game
- Hit the Stop button
- Segmentation fault
What is the expected output? What do you see instead?
A clean shutdown of the emulation with the main application still running.
Instead, the whole emulator crashes.
What version of the product are you using? On what operating system?
2.0rc1 (5171-release)
Please provide any additional information below.
Ubuntu 9.10, 64bit
NVIDIA Driver Version: 190.53
Dual Core enabled:
26:19:933 Source/Core/Core/Src/Core.cpp:215 W[CONSOLE]: Stop [Main
Thread] ---- Shutting down ----
26:19:933 Source/Core/Core/Src/Core.cpp:227 W[CONSOLE]: Stop [Main
Thread 0] Stop CPU
26:19:933 Source/Core/Core/Src/Core.cpp:236 N[CONSOLE]: Stop [Main
Thread 0] Wait for Video Loop to exit ...
26:19:935 Source/Core/Core/Src/Core.cpp:249 W[CONSOLE]: Stop [Main
Thread 0] Stopping Emu thread ...
26:19:935 Source/Core/Core/Src/Core.cpp:526 N[CONSOLE]: Stop [Video
Thread 0] Stop() and Video Loop Ended
26:19:935 Source/Core/Core/Src/Core.cpp:548 N[CONSOLE]: Stop [Video
Thread 0] Shutting down HW
26:19:960 Source/Core/Core/Src/Core.cpp:550 N[CONSOLE]: Stop [Video
Thread 0] HW shutdown
26:19:960 Source/Core/Core/Src/Core.cpp:552 W[CONSOLE]: Stop [Video
Thread 0] Shutting down plugins
26:19:969 Source/Core/Core/Src/PluginManager.cpp:460 W[CONSOLE]: Stop
[Video Thread 0] Will unload video DLL
26:19:989 Source/Core/Core/Src/PluginManager.cpp:215 N[CONSOLE]: Stop
[Video Thread 0] Video shutdown
26:20:055 Source/Core/AudioCommon/Src/SoundStream.h:66 W[DSPHLE]: Audio
logging already stopped
26:20:055 Source/Core/Core/Src/PluginManager.cpp:468 W[CONSOLE]: Stop
[Video Thread 0] Will unload audio DLL
26:20:056 Source/Core/Core/Src/PluginManager.cpp:205 N[CONSOLE]: Stop
[Video Thread 0] Audio shutdown
26:20:056 Source/Core/Core/Src/Core.cpp:558 N[CONSOLE]: Stop [Video
Thread 0] Plugins shutdown
26:20:056 Source/Core/Core/Src/Core.cpp:560 N[CONSOLE]: Stop [Main
Thread 0] Main thread stopped
26:20:056 Source/Core/Core/Src/Core.cpp:561 N[CONSOLE]: Stop [Main
Thread] ---- Shutdown complete ----
Segmentation fault
Dual Core disabled:
27:09:576 Source/Core/Core/Src/Core.cpp:215 W[CONSOLE]: Stop [Main
Thread] ---- Shutting down ----
27:09:576 Source/Core/Core/Src/Core.cpp:227 W[CONSOLE]: Stop [Main
Thread 0] Stop CPU
27:09:576 Source/Core/Core/Src/Core.cpp:249 W[CONSOLE]: Stop [Main
Thread 0] Stopping Emu thread ...
27:09:583 Source/Core/Core/Src/PluginManager.cpp:460 W[CONSOLE]: Stop
[Video Thread 0] Will unload video DLL
27:09:603 Source/Core/Core/Src/Core.cpp:516 N[CONSOLE]: Stop [Main
Thread 0] Stopping CPU-GPU thread ...
27:09:632 Source/Core/Core/Src/PluginManager.cpp:215 N[CONSOLE]: Stop
[Video Thread 0] Video shutdown
Segmentation fault
Now this is weird. The ppa works fine, when I check out r5137 (which is the current
ppa version) and compile that (just running scons) under ubuntu 9.10, I get the
described segfault.
Were there changes you made compared to the vanilla svn version?
Yes, of course there are changes. Download the source from my ppa and you will see
there are some patches that are applied. Basically I remove the dependency on the
"Externals" from the build. Instead depending on the the shared system libraries.
That is with the exception of lua and the bochs disassembler. I package wiiuse
separately in my ppa. I think there are linkage conflicts with the externals.
would it be possible to get such linking/scons changes into trunk? (or do they need to
be disto-dependent?)
to be merged to trunk we need to add some flag to scons allowing you to chose if you
want external or local libs. Not all distros got a version for all those libs in
their repository. Or at least fall back to the externals if lib dirs do not exists.
Anyhow, it can be easily checked if that is the reason by using ldd and LD_LIBRARY_PAtH
to switch between the libraries and see if it still crashes.
nakeee: The problem with the segfault on stop is somehow being caused by libsoil.
If I compile the soil in the externals statically the segfault happens. If I compile
linking against the system shared library of soil it doesn't. The LD_LIBRARY_PATH
thing won't work for comparison purposes because we are statically compiling these
libraries in. LD_LIBRARY_PATH will only work with a shared library.
making soil compile as dynamic lib is easy.
we should try to figure out how we compile it wrong
nakeee: I agree. I have attempted to do so, but I can't see what is going on yet.
gdb gives no useful information.
By the way, is there a reason that we compile soil, lzo, and sfml in statically
instead of creating shared libraries like we do with wiiuse?
No, it just looking simpler without the need to worry about rpath or ld path
we can make them dynamic if you think it's better.
I don't know which is better. I was just curious why we do it one way with wiiuse,
and another with the rest.
For those of you having the problem with segmentation faults on stop try adding the
scons option "shared_soil=true" and see if that fixes the problem. You will have to
have libsoil-dev installed for that to work. If your distribution doesn't have a
port of libsoil you are out of luck for now.
nakeee: I can't figure out what is going on with the linkage with our external
version of sfml. I have tried building it as a shared library. I have tried
overwriting it with the source files from the Ubuntu source package. I have tried
adding some things that are done in the Ubuntu build. In any case our externals
cause a segmentation fault on stop. The Ubuntu system shared libraries don't.
- Status changed from New to Fixed
- Milestone deleted (
2.0)
I think your scons fix is good enough.
Marking it as fixed if you think we should fix the crash also on static feel free to
reopen:)
Oh I just noticed the commit was only for trunk and not to stable.
Can you please also commit it to stable then?
Also available in: Atom
PDF