snes9x-gtk: Crash at startup

If you're having problems with Snes9x, or think you've found a bug, this is the place to be.
Post Reply
YuGiOhJCJ
Snes9x White Belt
Posts: 2
Joined: Sat Feb 28, 2015 6:36 am

snes9x-gtk: Crash at startup

Post by YuGiOhJCJ »

Hello,

After I built snes9x-gtk from snes9x-1.53 on Slackware 14.1, I try to launch it:

Code: Select all

$ snes9x-gtk 
Sound buffer size: 4096 (1024 samples)
OSS sound driver initializing...
    --> (Device: /dev/dsp)...failed
Attempt to unlock mutex that was not locked
Aborted
So, I check with my debugger:

Code: Select all

$ gdb snes9x-gtk 
GNU gdb (GDB) 7.6.1
Copyright (C) 2013 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "i486-slackware-linux".
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>...
Reading symbols from /usr/bin/snes9x-gtk...done.
(gdb) run
Starting program: /usr/bin/snes9x-gtk 
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/libthread_db.so.1".
[New Thread 0xb4202b40 (LWP 3071)]
[New Thread 0xb38ffb40 (LWP 3072)]
[New Thread 0xb2effb40 (LWP 3073)]
[New Thread 0xb26ffb40 (LWP 3074)]
[New Thread 0xb1effb40 (LWP 3075)]
[New Thread 0xb16ffb40 (LWP 3076)]
[New Thread 0xb0effb40 (LWP 3077)]
Sound buffer size: 4096 (1024 samples)
OSS sound driver initializing...
    --> (Device: /dev/dsp)...failed
Attempt to unlock mutex that was not locked

Program received signal SIGABRT, Aborted.
0xb6ca0cdc in raise () from /lib/libc.so.6
(gdb) bt
#0  0xb6ca0cdc in raise () from /lib/libc.so.6
#1  0xb6ca24f3 in abort () from /lib/libc.so.6
#2  0xb7345b29 in g_mutex_unlock_slowpath (mutex=<optimized out>, 
    prev=<optimized out>) at gthread-posix.c:1321
#3  0xb73c3602 in g_mutex_unlock (mutex=<optimized out>)
    at gthread-posix.c:1344
#4  0xb78eaa73 in gdk_threads_impl_unlock () at gdk.c:437
#5  0xb7aba0c4 in IA__gtk_main () at gtkmain.c:1256
#6  0x0805175d in main ()
(gdb) quit
A debugging session is active.

	Inferior 1 [process 3067] will be killed.

Quit anyway? (y or n) y
Do you know why I got this error?

Thank you.
Best regards.
YuGiOhJCJ
Snes9x White Belt
Posts: 2
Joined: Sat Feb 28, 2015 6:36 am

Re: snes9x-gtk: Crash at startup

Post by YuGiOhJCJ »

After some researches, I found that it is a problem with the strict mutex behavior in glib 2.42 [1].
Maybe I should try to downgrade to glib 2.40 to see if it solves the problem.
Anyway it should be a good idea to see how to hack correctly the snes9x-gtk source code to be compatible with the new glib 2.42 stable release, isn't it?

[1] https://bugs.webkit.org/show_bug.cgi?id=136073
Post Reply