Google-Code-Fork / snes9x-gtk

Automatically exported from code.google.com/p/snes9x-gtk
0 stars 0 forks source link

Opening preferences and clicking apply crashes the app #61

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Start snes9x-gtk
2. Options->Preferences
3. Click Apply

What is the expected output? What do you see instead?
Expected: Preferences should be saved and application should be working.
Got: Preferences are not saved and application ends with Segmentation fault.

What version of the product are you using? On what operating system?
Product: snes9x-gtk 1.52 (package: games-emulation/snes9x-1.52-r1)
Operating system: Gentoo Linux, kernel: 2.6.37-tuxonice x86_64

Please provide any additional information below.
I have run this program under gdb:

Starting program: /usr/games/bin/snes9x-gtk 
[Thread debugging using libthread_db enabled]
Xlib:  extension "RANDR" missing on display ":0".
Sound buffer size: 8192 (2048 samples)
ALSA sound driver initializing...
    --> (Device: default)...OK
    --> (16-bit, Stereo, 32000hz, 64 ms)...OK

Program received signal SIGSEGV, Segmentation fault.
0x000000000049b777 in Snes9xPreferences::get_settings_from_dialog() ()
(gdb) bt
#0  0x000000000049b777 in Snes9xPreferences::get_settings_from_dialog() ()
#1  0x000000000049c9b8 in Snes9xPreferences::show() ()
#2  0x000000000049d595 in snes9x_preferences_open(_GtkWidget*, void*) ()
#3  0x0000003995c102aa in g_closure_invoke () from 
/usr/lib64/libgobject-2.0.so.0
#4  0x0000003995c26720 in signal_emit_unlocked_R () from 
/usr/lib64/libgobject-2.0.so.0
#5  0x0000003995c27c18 in g_signal_emit_valist () from 
/usr/lib64/libgobject-2.0.so.0
#6  0x0000003995c281a3 in g_signal_emit () from /usr/lib64/libgobject-2.0.so.0
#7  0x000000392b05b54e in gtk_widget_activate () from 
/usr/lib64/libgtk-x11-2.0.so.0
#8  0x000000392af4f76d in gtk_menu_shell_activate_item () from 
/usr/lib64/libgtk-x11-2.0.so.0
#9  0x000000392af50ff7 in gtk_menu_shell_button_release () from 
/usr/lib64/libgtk-x11-2.0.so.0
#10 0x000000392af41518 in _gtk_marshal_BOOLEAN__BOXED () from 
/usr/lib64/libgtk-x11-2.0.so.0
#11 0x0000003995c102aa in g_closure_invoke () from 
/usr/lib64/libgobject-2.0.so.0
#12 0x0000003995c26363 in signal_emit_unlocked_R () from 
/usr/lib64/libgobject-2.0.so.0
#13 0x0000003995c27a2c in g_signal_emit_valist () from 
/usr/lib64/libgobject-2.0.so.0
#14 0x0000003995c281a3 in g_signal_emit () from /usr/lib64/libgobject-2.0.so.0
#15 0x000000392b057bff in gtk_widget_event_internal () from 
/usr/lib64/libgtk-x11-2.0.so.0
#16 0x000000392af39983 in gtk_propagate_event () from 
/usr/lib64/libgtk-x11-2.0.so.0
#17 0x000000392af3aa3b in gtk_main_do_event () from 
/usr/lib64/libgtk-x11-2.0.so.0
#18 0x000000392ba5fb4c in gdk_event_dispatch () from 
/usr/lib64/libgdk-x11-2.0.so.0
#19 0x0000003993c42bc1 in g_main_context_dispatch () from 
/usr/lib64/libglib-2.0.so.0
#20 0x0000003993c47258 in g_main_context_iterate () from 
/usr/lib64/libglib-2.0.so.0
#21 0x0000003993c47765 in g_main_loop_run () from /usr/lib64/libglib-2.0.so.0
#22 0x000000392af3aed7 in gtk_main () from /usr/lib64/libgtk-x11-2.0.so.0
#23 0x000000000049e9a5 in main ()

Original issue reported on code.google.com by szy...@adres.pl on 17 Aug 2011 at 6:58

GoogleCodeExporter commented 9 years ago
This also occurs on v1.53 as of September 3rd, 2011. OpenSUSE 11.4 x86-64 here. 
Both the pre-compiled binary and the source exhibit this.

Original comment by jeremy.f...@gmail.com on 3 Sep 2011 at 11:29

GoogleCodeExporter commented 9 years ago
I did a little debugging. The seg fault occurs on line 777 of 
gtk_preferences.cpp. config->xrr_index = 255 and by disabling USE_XRANDR in my 
makefile I was able to compile a version that doesn't seg fault.

Original comment by jeremy.f...@gmail.com on 4 Sep 2011 at 12:42

GoogleCodeExporter commented 9 years ago
I'll take a look at this. As you've already noticed, it is caused by a lack of 
an XRANDR extension loaded in the server and failure to handle that case.

Original comment by bear...@gmail.com on 2 Nov 2011 at 5:42