Emulator Issues #1540
closedsegmentation fault linux
0%
Description
./Dolphin
31:32:139 N[BOOT]: Loading Settings from ./User/Config/Dolphin.ini
31:32:223 N[BOOT]: Starting application
31:32:223 N[BOOT]: Loading Settings from ./User/Config/Dolphin.ini
31:32:458 W[COMMON]: IsDirectory: stat failed on
./User/Wii/title/00000001/00000002/content:
Fallo de segmentación
What steps will reproduce the problem?
- i do the steps to xinitthread() fix
later of a svn up revision 4421
2.
3.
What is the expected output? What do you see instead?
What version of the product are you using? On what operating system?
Please provide any additional information below.
Updated by unmacaque about 15 years ago
Now that the fix has been incorporated in the svn repository, the problem occurs even
without having applied any patches to the sources. Using 64 bit Linux, by the way.
Updated by durin42 about 15 years ago
I'm seeing this on i686 Linux (Ubuntu Jaunty, although planning an upgrade to Karmic
this week). I did a bisect on commits and came down to the problem being introduced
in r4479. I'm not sure if that's helpful or not.
Updated by nakeee about 15 years ago
Can someone run it in gdb and provide a back trace?
Updated by unmacaque about 15 years ago
This is r4493 on 64 bit.
(gdb) run
Starting program:
/home/andy/Anwendungen/dolphin-emu-read-only/Binary/Linux-x86_64/Dolphin
[Thread debugging using libthread_db enabled]
18:42:433 N[BOOT]: Loading Settings from ./User/Config/Dolphin.ini
18:42:463 N[BOOT]: Starting application
18:42:463 N[BOOT]: Loading Settings from ./User/Config/Dolphin.ini
18:42:546 W[COMMON]: IsDirectory: stat failed on
./User/Wii/title/00000001/00000002/content:
Program received signal SIGSEGV, Segmentation fault.
0x00007ffff7516081 in pthread_mutex_lock () from /lib/libpthread.so.0
(gdb) backtrace full
See attached log
Updated by karamu.da.yo about 15 years ago
Still occurs as of r4541
Weirdly it sometimes doesn't occur on first run and Dolphin starts and runs, but then
every time afterwards it does the error
See attachments for gdb and catchsegv backtraces
Updated by bhs2007 about 15 years ago
Still occurring in 4552. Ubuntu 9.10, x86-64, similar backtrace to those who posted
before me.
Updated by roman.reibnagel about 15 years ago
I also get this error in revision 4586 on ubuntu 9.10.. is there any fix available?
Updated by descartavel.1 about 15 years ago
revison 4595.
Linux 2.6.31-14-generic #48-Ubuntu SMP Fri Oct 16 14:04:26 UTC 2009 i686 GNU/Linux
gdb:
44:17:820 W[COMMON]: IsDirectory: stat failed on ./User/Wii/title/00000001/00000002/
content:
Program received signal SIGSEGV, Segmentation fault.
0x0051bd1d in pthread_mutex_lock () from /lib/tls/i686/cmov/libpthread.so.0
Updated by gabriel.barros about 15 years ago
isn't initialization missing? couldn't find it.
pthread_mutex_t mutex = PTHREAD_MUTEX_INITIALIZER;
Updated by gabriel.barros about 15 years ago
(gdb) backtrace
#0 0x006d5d1d in pthread_mutex_lock () from /lib/tls/i686/cmov/libpthread.so.0
#1 0x00d9716f in ?? () from /usr/lib/libX11.so.6
#2 0x00dad6b4 in XrmQGetResource () from /usr/lib/libX11.so.6
#3 0x00d8d63b in XGetDefault () from /usr/lib/libX11.so.6
#4 0x01245d68 in get_boolean_default (dpy=0x73002a6d, option=,
value=0xbfffda34)
at /build/buildd/cairo-1.8.8/src/cairo-xlib-screen.c:92
#5 0x01246069 in _cairo_xlib_init_screen_font_options (display=0x885eca0,
screen=0x8719fb0)
at /build/buildd/cairo-1.8.8/src/cairo-xlib-screen.c:159
#6 _cairo_xlib_screen_info_get (display=0x885eca0, screen=0x8719fb0)
at /build/buildd/cairo-1.8.8/src/cairo-xlib-screen.c:397
#7 0x0124687c in _cairo_xlib_surface_create_internal (dpy=,
drawable=,
screen=0x8719fb0, visual=0x8724c60, xrender_format=0x0, width=800, height=600,
depth=0)
at /build/buildd/cairo-1.8.8/src/cairo-xlib-surface.c:2535
#8 0x0124700f in cairo_xlib_surface_create (dpy=0x871a978, drawable=69206366,
visual=0x87405cc, width=800,
height=600) at /build/buildd/cairo-1.8.8/src/cairo-xlib-surface.c:2709
#9 0x004b3526 in ?? () from /usr/lib/libgdk-x11-2.0.so.0
#10 0x0048c2ae in ?? () from /usr/lib/libgdk-x11-2.0.so.0
#11 0x0047db72 in ?? () from /usr/lib/libgdk-x11-2.0.so.0
#12 0x0049ab2b in gdk_window_begin_paint_region () from /usr/lib/libgdk-x11-2.0.so.0
#13 0x05deb184 in gtk_main_do_event () from /usr/lib/libgtk-x11-2.0.so.0
#14 0x004a41d4 in ?? () from /usr/lib/libgdk-x11-2.0.so.0
#15 0x004a4183 in ?? () from /usr/lib/libgdk-x11-2.0.so.0
#16 0x004a4183 in ?? () from /usr/lib/libgdk-x11-2.0.so.0
#17 0x004a4183 in ?? () from /usr/lib/libgdk-x11-2.0.so.0
#18 0x004a4183 in ?? () from /usr/lib/libgdk-x11-2.0.so.0
#19 0x004a4183 in ?? () from /usr/lib/libgdk-x11-2.0.so.0
#20 0x004c7734 in ?? () from /usr/lib/libgdk-x11-2.0.so.0
#21 0x0049b87f in ?? () from /usr/lib/libgdk-x11-2.0.so.0
#22 0x0049fa50 in gdk_window_process_updates () from /usr/lib/libgdk-x11-2.0.so.0
#23 0x00fe6ed8 in wxWindow::GtkUpdate() () from /usr/lib/libwx_gtk2u_core-2.8.so.0
#24 0x00fe6f3d in wxWindow::Update() () from /usr/lib/libwx_gtk2u_core-2.8.so.0
#25 0x0020224b in wxAuiToolBar::OnSize(wxSizeEvent&) () from /usr/lib/
libwx_gtk2u_aui-2.8.so.0
#26 0x0085fa9f in wxAppConsole::HandleEvent(wxEvtHandler*, void (wxEvtHandler::)
(wxEvent&), wxEvent&) const ()
from /usr/lib/libwx_baseu-2.8.so.0
#27 0x008fe379 in wxEvtHandler::ProcessEventIfMatches(wxEventTableEntryBase const&,
wxEvtHandler, wxEvent&) ()
from /usr/lib/libwx_baseu-2.8.so.0
#28 0x008ff424 in wxEventHashTable::HandleEvent(wxEvent&, wxEvtHandler*) () from /
usr/lib/libwx_baseu-2.8.so.0
#29 0x008ff523 in wxEvtHandler::ProcessEvent(wxEvent&) () from /usr/lib/
libwx_baseu-2.8.so.0
#30 0x00fec276 in wxWindow::DoSetSize(int, int, int, int, int) () from /usr/lib/
libwx_gtk2u_core-2.8.so.0
#31 0x002039ce in wxAuiToolBar::DoSetSize(int, int, int, int, int) () from /usr/lib/
libwx_gtk2u_aui-2.8.so.0
#32 0x010dfe9c in wxSizerItem::SetDimension(wxPoint const&, wxSize const&) () from /
usr/lib/libwx_gtk2u_core-2.8.so.0
#33 0x010e0e32 in wxBoxSizer::RecalcSizes() () from /usr/lib/
libwx_gtk2u_core-2.8.so.0
#34 0x010dfbe4 in wxSizer::Layout() () from /usr/lib/libwx_gtk2u_core-2.8.so.0
#35 0x010dfd19 in wxSizer::SetDimension(int, int, int, int) () from /usr/lib/
libwx_gtk2u_core-2.8.so.0
#36 0x010dfed9 in wxSizerItem::SetDimension(wxPoint const&, wxSize const&) () from /
usr/lib/libwx_gtk2u_core-2.8.so.0
#37 0x010e0dab in wxBoxSizer::RecalcSizes() () from /usr/lib/
libwx_gtk2u_core-2.8.so.0
#38 0x010dfbe4 in wxSizer::Layout() () from /usr/lib/libwx_gtk2u_core-2.8.so.0
#39 0x010dfd19 in wxSizer::SetDimension(int, int, int, int) () from /usr/lib/
libwx_gtk2u_core-2.8.so.0
#40 0x010dfed9 in wxSizerItem::SetDimension(wxPoint const&, wxSize const&) () from /
usr/lib/libwx_gtk2u_core-2.8.so.0
#41 0x010e0dab in wxBoxSizer::RecalcSizes() () from /usr/lib/
libwx_gtk2u_core-2.8.so.0
#42 0x010dfbe4 in wxSizer::Layout() () from /usr/lib/libwx_gtk2u_core-2.8.so.0
#43 0x010dfd19 in wxSizer::SetDimension(int, int, int, int) () from /usr/lib/
libwx_gtk2u_core-2.8.so.0
#44 0x010dfed9 in wxSizerItem::SetDimension(wxPoint const&, wxSize const&) () from /
usr/lib/libwx_gtk2u_core-2.8.so.0
#45 0x010e0e32 in wxBoxSizer::RecalcSizes() () from /usr/lib/
libwx_gtk2u_core-2.8.so.0
#46 0x010dfbe4 in wxSizer::Layout() () from /usr/lib/libwx_gtk2u_core-2.8.so.0
#47 0x010dfd19 in wxSizer::SetDimension(int, int, int, int) () from /usr/lib/
libwx_gtk2u_core-2.8.so.0
#48 0x010dfed9 in wxSizerItem::SetDimension(wxPoint const&, wxSize const&) () from /
usr/lib/libwx_gtk2u_core-2.8.so.0
#49 0x010e0e32 in wxBoxSizer::RecalcSizes() () from /usr/lib/
libwx_gtk2u_core-2.8.so.0
#50 0x010dfbe4 in wxSizer::Layout() () from /usr/lib/libwx_gtk2u_core-2.8.so.0
#51 0x010dfd19 in wxSizer::SetDimension(int, int, int, int) () from /usr/lib/
libwx_gtk2u_core-2.8.so.0
#52 0x010f3ec5 in wxWindowBase::Layout() () from /usr/lib/libwx_gtk2u_core-2.8.so.0
#53 0x001ccf89 in wxAuiManager::DoFrameLayout() () from /usr/lib/
libwx_gtk2u_aui-2.8.so.0
#54 0x001d4f04 in wxAuiManager::Update() () from /usr/lib/libwx_gtk2u_aui-2.8.so.0
#55 0x08075027 in CFrame::CFrame(wxFrame*, int, wxString const&, wxPoint const&,
wxSize const&, bool, bool, long) ()
#56 0x080c0c26 in DolphinApp::OnInit() ()
#57 0x00899780 in wxEntry(int&, wchar_t**) () from /usr/lib/libwx_baseu-2.8.so.0
#58 0x00899987 in wxEntry(int&, char**) () from /usr/lib/libwx_baseu-2.8.so.0
#59 0x080bf7eb in main ()
Updated by gabriel.barros about 15 years ago
At revision 4599.
$ valgrind ./Dolphin
==3388== Memcheck, a memory error detector
==3388== Copyright (C) 2002-2009, and GNU GPL'd, by Julian Seward et al.
==3388== Using Valgrind-3.5.0-Debian and LibVEX; rerun with -h for copyright info
==3388== Command: ./Dolphin
==3388==
07:47:935 N[BOOT]: Loading Settings from ./User/Config/Dolphin.ini
07:54:428 N[BOOT]: Starting application
07:54:497 N[BOOT]: Loading Settings from ./User/Config/Dolphin.ini
--3388-- WARNING: unhandled syscall: 332
--3388-- You may be able to write your own handler.
--3388-- Read the file README_MISSING_SYSCALL_OR_IOCTL.
--3388-- Nevertheless we consider this a bug. Please report
--3388-- it at http://valgrind.org/support/bug_reports.html.
==3388== Warning: noted but unhandled ioctl 0x5331 with no size/direction hints
==3388== This could cause spurious value errors to appear.
==3388== See README_MISSING_SYSCALL_OR_IOCTL for guidance on writing a proper
wrapper.
==3388== Warning: noted but unhandled ioctl 0x5331 with no size/direction hints
==3388== This could cause spurious value errors to appear.
==3388== See README_MISSING_SYSCALL_OR_IOCTL for guidance on writing a proper
wrapper.
==3388== Warning: noted but unhandled ioctl 0x5331 with no size/direction hints
==3388== This could cause spurious value errors to appear.
==3388== See README_MISSING_SYSCALL_OR_IOCTL for guidance on writing a proper
wrapper.
08:05:619 W[COMMON]: IsDirectory: stat failed on ./User/Wii/title/00000001/00000002/
content:
==3388== Use of uninitialised value of size 4
==3388== at 0x40FCD1D: pthread_mutex_lock (pthread_mutex_lock.c:50)
==3388== by 0x420016E: ??? (in /usr/lib/libX11.so.6.2.0)
==3388== by 0x42166B3: XrmQGetResource (in /usr/lib/libX11.so.6.2.0)
==3388== by 0x41F663A: XGetDefault (in /usr/lib/libX11.so.6.2.0)
==3388== by 0x5496D67: get_boolean_default (cairo-xlib-screen.c:92)
==3388== by 0x5497068: _cairo_xlib_screen_info_get (cairo-xlib-screen.c:159)
==3388== by 0x549787B: _cairo_xlib_surface_create_internal (cairo-xlib-
surface.c:2535)
==3388== by 0x549800E: cairo_xlib_surface_create (cairo-xlib-surface.c:2709)
==3388== by 0x504A525: ??? (in /usr/lib/libgdk-x11-2.0.so.0.1800.3)
==3388== by 0x50232AD: ??? (in /usr/lib/libgdk-x11-2.0.so.0.1800.3)
==3388== by 0x5014B71: ??? (in /usr/lib/libgdk-x11-2.0.so.0.1800.3)
==3388== by 0x5031B2A: gdk_window_begin_paint_region (in /usr/lib/libgdk-
x11-2.0.so.0.1800.3)
==3388==
==3388== Invalid read of size 4
==3388== at 0x40FCD1D: pthread_mutex_lock (pthread_mutex_lock.c:50)
==3388== by 0x420016E: ??? (in /usr/lib/libX11.so.6.2.0)
==3388== by 0x42166B3: XrmQGetResource (in /usr/lib/libX11.so.6.2.0)
==3388== by 0x41F663A: XGetDefault (in /usr/lib/libX11.so.6.2.0)
==3388== by 0x5496D67: get_boolean_default (cairo-xlib-screen.c:92)
==3388== by 0x5497068: _cairo_xlib_screen_info_get (cairo-xlib-screen.c:159)
==3388== by 0x549787B: _cairo_xlib_surface_create_internal (cairo-xlib-
surface.c:2535)
==3388== by 0x549800E: cairo_xlib_surface_create (cairo-xlib-surface.c:2709)
==3388== by 0x504A525: ??? (in /usr/lib/libgdk-x11-2.0.so.0.1800.3)
==3388== by 0x50232AD: ??? (in /usr/lib/libgdk-x11-2.0.so.0.1800.3)
==3388== by 0x5014B71: ??? (in /usr/lib/libgdk-x11-2.0.so.0.1800.3)
==3388== by 0x5031B2A: gdk_window_begin_paint_region (in /usr/lib/libgdk-
x11-2.0.so.0.1800.3)
==3388== Address 0xc is not stack'd, malloc'd or (recently) free'd
==3388==
==3388==
==3388== Process terminating with default action of signal 11 (SIGSEGV)
==3388== Access not within mapped region at address 0xC
==3388== at 0x40FCD1D: pthread_mutex_lock (pthread_mutex_lock.c:50)
==3388== by 0x420016E: ??? (in /usr/lib/libX11.so.6.2.0)
==3388== by 0x42166B3: XrmQGetResource (in /usr/lib/libX11.so.6.2.0)
==3388== by 0x41F663A: XGetDefault (in /usr/lib/libX11.so.6.2.0)
==3388== by 0x5496D67: get_boolean_default (cairo-xlib-screen.c:92)
==3388== by 0x5497068: _cairo_xlib_screen_info_get (cairo-xlib-screen.c:159)
==3388== by 0x549787B: _cairo_xlib_surface_create_internal (cairo-xlib-
surface.c:2535)
==3388== by 0x549800E: cairo_xlib_surface_create (cairo-xlib-surface.c:2709)
==3388== by 0x504A525: ??? (in /usr/lib/libgdk-x11-2.0.so.0.1800.3)
==3388== by 0x50232AD: ??? (in /usr/lib/libgdk-x11-2.0.so.0.1800.3)
==3388== by 0x5014B71: ??? (in /usr/lib/libgdk-x11-2.0.so.0.1800.3)
==3388== by 0x5031B2A: gdk_window_begin_paint_region (in /usr/lib/libgdk-
x11-2.0.so.0.1800.3)
==3388== If you believe this happened as a result of a stack
==3388== overflow in your program's main thread (unlikely but
==3388== possible), you can try to increase the size of the
==3388== main thread stack using the --main-stacksize= flag.
==3388== The main thread stack size used in this run was 8388608.
==3388==
==3388== HEAP SUMMARY:
==3388== in use at exit: 2,651,113 bytes in 19,747 blocks
==3388== total heap usage: 78,347 allocs, 58,600 frees, 8,878,707 bytes allocated
==3388==
==3388== LEAK SUMMARY:
==3388== definitely lost: 4,224 bytes in 14 blocks
==3388== indirectly lost: 13,987 bytes in 354 blocks
==3388== possibly lost: 889,674 bytes in 9,972 blocks
==3388== still reachable: 1,743,228 bytes in 9,407 blocks
==3388== suppressed: 0 bytes in 0 blocks
==3388== Rerun with --leak-check=full to see details of leaked memory
==3388==
==3388== For counts of detected and suppressed errors, rerun with: -v
==3388== Use --track-origins=yes to see where uninitialised values come from
==3388== ERROR SUMMARY: 2 errors from 2 contexts (suppressed: 354 from 15)
Segmentation fault
Updated by nakeee about 15 years ago
Just to make sure, does this happen also without the xinitthreads?
Updated by unmacaque about 15 years ago
Without the XInitThreads() call, Dolphin starts and runs emulation fine.
Updated by nakeee about 15 years ago
That is interesting, some people have crashes without it:
- Does it happen both with njoy and simple pad plugins
- Does it happen also on i386 (32bit)
- do you have libcairo using xcb or glitz buggy backends?
Updated by emuxperts about 15 years ago
Moving XInitThreads() call to after SetTopWindow(main_frame); appears to resolve the
issue.
If the XInitThreads() is removed entirely, X locking crashes occur during gameplay.
While it remains where it is, there is random crashing at somepoint before the WX
Interface is (fully) drawn.
After it is moved, both issues appear to be resolved.
Updated by nakeee almost 15 years ago
- Status changed from New to Fixed
Good find!
I committed it, please verify it solved the problem.
Updated by belegdol almost 15 years ago
revision 4604 no longer crashes on startup for me (Fedora 12 x86_64). It still
crashes on emulation stop, though (issue 1318).
Updated by descartavel.1 almost 15 years ago
Ok, now i can get to the main window. But here it still crashes starting the
emulation.
If i enable dual core in the options, it crashes 100% of the time STARTING the
emulation.
With dual core option disabled, it does nothing for some images, and for others it
simply opens another window, with black background, and hardware info on yellow. and
that's it. one of my cores keeps with 100% of usage.
Updated by tomman almost 15 years ago
It still segfaults for me at exit, BUT ONLY after running a game. If i start Dolphin,
do anything except gaming, and exit, everything ends fine.
Sometimes it crashes as soon as i stop the emulation, but most of the times it dies
after exiting the emulator. It's no big deal, but still it's annoying.
Here is a backtrace, after running Wii System Menu, stopping the emulation, and
exiting the emulator:
18:45:228 W[CONSOLE]: Stop [Main Thread] ---- Shutting down ----
18:45:228 W[CONSOLE]: Stop [Main Thread 0] Stop CPU
18:45:229 N[CONSOLE]: Stop [Main Thread 0] Wait for Video Loop to exit ...
18:45:229 W[CONSOLE]: Stop [Main Thread 0] Shutting down core
18:45:229 N[CONSOLE]: Stop [Video Thread 0] Stop() and Video Loop Ended
18:45:229 W[CONSOLE]: Stop [Main Thread 0] Stopping Emu thread ...
18:45:229 W[CONSOLE]: Stop [Video Thread 0] Shutting down HW
[Thread 1100900672 (LWP 7744) exited]
[Thread 1108355392 (LWP 7742) exited]
18:45:261 N[CONSOLE]: Stop [Video Thread 0] HW shutdown
18:45:261 W[CONSOLE]: Stop [Video Thread 0] Shutting down plugins
18:45:295 N[DSPHLE]: Shutting down sound stream
[Thread 1088096576 (LWP 7743) exited]
18:45:376 N[DSPHLE]: Stopping Audio logging
18:45:377 W[CONSOLE]: Stop [Video Thread 0] Will unload audio DLL
18:45:394 N[CONSOLE]: Stop [Video Thread 0] Audio shutdown
18:45:394 N[CONSOLE]: Stop [Video Thread 0] Plugins shutdown
18:45:439 W[CONSOLE]: Stop [Video Thread 0] Will unload video DLL
18:45:458 N[CONSOLE]: Stop [Video Thread 0] Video shutdown
18:45:458 W[CONSOLE]: Stop [Main Thread 0] Stopping CPU thread ...
18:45:458 N[CONSOLE]: Stop [Main Thread 0] Main thread stopped
18:45:458 N[CONSOLE]: Stop [Main Thread] ---- Shutdown complete ----
[Thread 1090779456 (LWP 7741) exited]
18:47:753 N[BOOT]: Saving Settings to ./User/Config/Dolphin.ini
Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 140679110977264 (LWP 7738)]
0x0000000000000131 in ?? ()
(gdb) bt
#0 0x0000000000000131 in ?? ()
#1 0x000000000049a51d in CPluginManager::~CPluginManager ()
#2 0x0000003d59232eb5 in exit () from /lib64/libc.so.6
#3 0x0000003d5921d8ab in __libc_start_main () from /lib64/libc.so.6
#4 0x000000000041d199 in _start ()
It still happens as of r4605...
Updated by nakeee almost 15 years ago
descartavel. Can you give more information about the crash? What are you trying to
run? and a backtrace? (and better yet open another bug report about it)
tommen: that's another issue, I think we already have it open somewhere, anyhow we
are working on it
Updated by descartavel.1 almost 15 years ago
nakeee, can you please direct me to a page explaining how to create a bug report
with a decent amount of info?
I only know gdb (and even then just a little)
Also, is there any "safe" config files i must use?
thanks
Updated by Brian.Broll almost 14 years ago
I am running Arch linux and also run into segmentation fault. I am quite unfamiliar with linux, so could someone explain where to find the code and how exactly it should be fixed? Any help would be appreciated.