What's new

Mupen64-amd64 current (svn trunk) version bugs

mike_k

New member
It would be nice to gather general problems with current development versions in one place. Some kind of bug-tracking?

My current minor problem with gui in revision 169: clicking on rom in rom-browser issues a warning:
Code:
(mupen64:12344): GLib-GObject-WARNING **: invalid cast from `GtkTreeView' to `GtkCList'
(mupen64:12344): Gtk-CRITICAL **: gtk_clist_select_row: assertion `GTK_IS_CLIST (clist)' failed

Trying to play it gives another message:
Code:
file not found or wrong path

However roms are playable from "open rom" menu.
 

nmn

Mupen64Plus Dev.
Strange. The file not found bug should be fixed at this point, make absolute sure your code is up to date. In the mean time, i'll regrab the code and check it out.

edit: Woah, I should commit more often. Appears I broke code when commiting last.

edit2: With a fresh update of all the code, there are some strange warnings in the terminal i should fix (its back from old depricated code :p), but the rom browser does in fact work right.

edit3:...revision 169 appears to be latest. Please help me fix the problem your having with the rom browser not working. I can not reproduce it with the little given data.
 
Last edited:
OP
M

mike_k

New member
edit3:...revision 169 appears to be latest. Please help me fix the problem your having with the rom browser not working. I can not reproduce it with the little given data.
To be clear: by the rom browser I mean the biggest part of the main window (with flags, Good names, paths).
Apart from console messages I also get "[X] Couldn't load rom" window followed by " There is no rom loaded. Do you want to load one?" Loading from file browser works.
I've just disabled ccache, checked out again & rebuild to be sure.
gtk is 2.12.2-1
Code:
# make VER=fooobar bin-32
# echo $CFLAGS
-O2 -march=i686 -pipe
# gcc -v
Using built-in specs.
Target: i686-pc-linux-gnu
Configured with: ../gcc-4.2.2/configure --prefix=/usr --libexecdir=/usr/lib --enable-languages=c,c++,objc --enable-threads=posix --enable-__cxa_atexit --enable-clocale=gnu --enable-shared --disable-nls --with-x=no
Thread model: posix
gcc version 4.2.2 (CRUX)
# ldd mupen64 
        linux-gate.so.1 =>  (0xffffe000)
        libz.so.1 => /usr/lib/libz.so.1 (0xb7f5b000)
        libm.so.6 => /lib/libm.so.6 (0xb7f1f000)
        libpng12.so.0 => /usr/lib/libpng12.so.0 (0xb7efc000)
        libSDL-1.2.so.0 => /usr/lib/libSDL-1.2.so.0 (0xb7e6a000)
        libpthread.so.0 => /lib/libpthread.so.0 (0xb7e53000)
        libGL.so.1 => /usr/lib/libGL.so.1 (0xb7df3000)
        libgtk-x11-2.0.so.0 => /usr/lib/libgtk-x11-2.0.so.0 (0xb7a8f000)
        libgdk-x11-2.0.so.0 => /usr/lib/libgdk-x11-2.0.so.0 (0xb7a0f000)
        libatk-1.0.so.0 => /usr/lib/libatk-1.0.so.0 (0xb79f6000)
        libgdk_pixbuf-2.0.so.0 => /usr/lib/libgdk_pixbuf-2.0.so.0 (0xb79df000)
        libpangocairo-1.0.so.0 => /usr/lib/libpangocairo-1.0.so.0 (0xb79d6000)
        libpango-1.0.so.0 => /usr/lib/libpango-1.0.so.0 (0xb799b000)
        libcairo.so.2 => /usr/lib/libcairo.so.2 (0xb7921000)
        libgobject-2.0.so.0 => /usr/lib/libgobject-2.0.so.0 (0xb78e8000)
        libgmodule-2.0.so.0 => /usr/lib/libgmodule-2.0.so.0 (0xb78e5000)
        libdl.so.2 => /lib/libdl.so.2 (0xb78e1000)
        libglib-2.0.so.0 => /usr/lib/libglib-2.0.so.0 (0xb7826000)
        libc.so.6 => /lib/libc.so.6 (0xb76f8000)
        /lib/ld-linux.so.2 (0xb7f6e000)
        libX11.so.6 => /usr/lib/libX11.so.6 (0xb7610000)
        libXext.so.6 => /usr/lib/libXext.so.6 (0xb7602000)
        libXxf86vm.so.1 => /usr/lib/libXxf86vm.so.1 (0xb75fd000)
        libXdamage.so.1 => /usr/lib/libXdamage.so.1 (0xb75fa000)
        libXfixes.so.3 => /usr/lib/libXfixes.so.3 (0xb75f5000)
        libdrm.so.2 => /usr/lib/libdrm.so.2 (0xb75eb000)
        libXcomposite.so.1 => /usr/lib/libXcomposite.so.1 (0xb75e8000)
        libfontconfig.so.1 => /usr/lib/libfontconfig.so.1 (0xb75bf000)
        libXrender.so.1 => /usr/lib/libXrender.so.1 (0xb75b7000)
        libXinerama.so.1 => /usr/lib/libXinerama.so.1 (0xb75b4000)
        libXrandr.so.2 => /usr/lib/libXrandr.so.2 (0xb75ad000)
        libXcursor.so.1 => /usr/lib/libXcursor.so.1 (0xb75a4000)
        libpangoft2-1.0.so.0 => /usr/lib/libpangoft2-1.0.so.0 (0xb7577000)
        libfreetype.so.6 => /usr/lib/libfreetype.so.6 (0xb7509000)
        libglitz.so.1 => /usr/lib/libglitz.so.1 (0xb74e4000)
        libxcb-xlib.so.0 => /usr/lib/libxcb-xlib.so.0 (0xb74e1000)
        libxcb.so.1 => /usr/lib/libxcb.so.1 (0xb74c9000)
        libXau.so.6 => /usr/lib/libXau.so.6 (0xb74c6000)
        libexpat.so.1 => /usr/lib/libexpat.so.1 (0xb74a6000)
        libXdmcp.so.6 => /usr/lib/libXdmcp.so.6 (0xb74a1000)

Please tell what else can I do. Should I try gdb?
 

Richard42

Emulator Developer
This should be fairly easy to find. Mike, are you comfortable with editing code, compiling, etc? I assume if you're okay with GDB then you should be able to compile and hack code a little too. If not, NMN or myself can do it. I would start by finding the source of the error message: search/grep through the source files to find out where this message ("file not found or wrong path") is coming from. Then modify the code to make it print out the path that it's using. Recompile, test again, and take a look at the path that it's using. There is probably something wrong with it, and by seeing how the path is incorrect you'll be able to trace back to the source of the bug.
 

nmn

Mupen64Plus Dev.
Use GDB. I don't know how experienced you are so I'm just gonna detail every step assuming you don't know how. Instead of just typing "run", type "run --g-fatal-warnings" and then it will crash at the warnings. Then at the gdb prompt which re appears, type "bt" and send the output.
 
OP
M

mike_k

New member
backtrace:
Code:
GLib-GObject-WARNING **: invalid cast from `GtkTreeView' to `GtkCList'
aborting...

Program received signal SIGABRT, Aborted.
[Switching to Thread 0xb74ca6c0 (LWP 3287)]
0xffffe410 in __kernel_vsyscall ()
(gdb) bt
#0  0xffffe410 in __kernel_vsyscall ()
#1  0xb774d495 in raise () from /lib/libc.so.6
#2  0xb774ecb1 in abort () from /lib/libc.so.6
#3  0xb7887941 in g_logv () from /usr/lib/libglib-2.0.so.0
#4  0xb7887979 in g_log () from /usr/lib/libglib-2.0.so.0
#5  0xb793a4b5 in g_type_check_instance_cast () from /usr/lib/libgobject-2.0.so.0
#6  0x080b732f in callback_buttonPressed (widget=0x9c6d0f8, event=0x9d51338, data=0x9c32670)
    at main/gui_gtk/rombrowser.c:570
#7  0xb7bfea74 in ?? () from /usr/lib/libgtk-x11-2.0.so.0
#8  0x09c6d0f8 in ?? ()
#9  0x09d51338 in ?? ()
#10 0x09c32670 in ?? ()
#11 0xb794c670 in ?? () from /usr/lib/libgobject-2.0.so.0
#12 0xb7bfea10 in ?? () from /usr/lib/libgtk-x11-2.0.so.0
#13 0x09c77fc8 in ?? ()
#14 0xbf8cc478 in ?? ()
#15 0xb791cd99 in g_closure_invoke () from /usr/lib/libgobject-2.0.so.0
Backtrace stopped: frame did not save the PC

I've also added a few printf's to rom.c: fill_header(), which is actually printing a
"file not found or wrong path" after Gtk warnings. Now it looks like this:
Code:
int fill_header(const char *argv)                                                                       
{                                                                                                       
   char arg[1024];                                                                                      
   printf ("fill_header(): [initial state]\n *argv=%s\n arg=%s\n", argv, arg);                          
   strncpy(arg, argv, 1000);                                                                            
   if (find_file(arg))                                                                                  
   {                                                                                                  
     printf ("file not found or wrong path\n");                                                          
     printf ("fill_header():\n *argv=%s\n arg=%s\n", argv, arg);                                         
     return 0;                                                                                           
   }
...
which gives an stdout log like:
Code:
./mupen64

(mupen64:4307): GLib-GObject-WARNING **: invalid cast from `GtkTreeView' to `GtkCList'

(mupen64:4307): Gtk-CRITICAL **: gtk_clist_select_row: assertion `GTK_IS_CLIST (clist)' failed
fill_header(): [initial state]
 *argv=
 arg=
file not found or wrong path
fill_header():
 *argv=
 arg=.gz.GZ
Looks to me like "gtk_clist_select_row( GTK_CLIST(widget), row, col );" in rombrowser.c:570 results in an empty path given to rom.c: find_file(), as the last arg value is ".gz.GZ". (This is happens at the end of find_file(), and looks little bit weird, as argv ends up having two extensions concatenated.)

I've also tried putting a rom unzipped, in /tmp/SM.v64 to be sure it has no problems with decompression or long file names.

Strange thing is that nobody else experience a trouble like this.
I hope this information will help to resolve the problem.
 

Richard42

Emulator Developer
Mike,

I've fixed a number of bugs in the new rom browser, so the problems that you have described here should be fixed in SVN. Double-cliking on a rom and right-clicking and selecting 'play rom' should both work.
 
OP
M

mike_k

New member
Richard, looks something is still broken (at least in my setup).
double-clicking: OK

right-clicking, 'refresh':
Code:
(mupen64:3842): Gtk-CRITICAL **: gtk_list_store_remove: assertion `VALID_ITER (iter, list_store)' failed

right-clicking, 'play rom' OR 'rom properties':
Code:
(mupen64:3837): GLib-GObject-WARNING **: gvalue.c:89: cannot initialize GValue with type `gpointer', the value has already been initialized as `GtkMenuItem'
(mupen64:3837): GLib-GObject-CRITICAL **: g_value_set_pointer: assertion `G_VALUE_HOLDS_POINTER (value)' failed
(mupen64:3837): GLib-GObject-CRITICAL **: g_value_get_pointer: assertion `G_VALUE_HOLDS_POINTER (value)' failed
Segmentation fault
and a backtrace:
Code:
GLib-GObject-WARNING **: gvalue.c:89: cannot initialize GValue with type `gpointer', the value has already been initialized as `GtkMenuItem'
aborting...

Program received signal SIGABRT, Aborted.
[Switching to Thread 0xb74bc6c0 (LWP 5028)]
0xffffe410 in __kernel_vsyscall ()
(gdb) bt
#0  0xffffe410 in __kernel_vsyscall ()
#1  0xb773f495 in raise () from /lib/libc.so.6
#2  0xb7740cb1 in abort () from /lib/libc.so.6
#3  0xb78799e1 in g_logv () from /usr/lib/libglib-2.0.so.0
#4  0xb7879a19 in g_log () from /usr/lib/libglib-2.0.so.0
#5  0xb79321a5 in g_value_init () from /usr/lib/libgobject-2.0.so.0
#6  0xb7ccc3cc in ?? () from /usr/lib/libgtk-x11-2.0.so.0
#7  0xbf809cb8 in ?? ()
#8  0x00000044 in ?? ()
#9  0xbf809c48 in ?? ()
#10 0xb7889cdb in g_sequence_get () from /usr/lib/libglib-2.0.so.0
#11 0xb7bea9ee in ?? () from /usr/lib/libgtk-x11-2.0.so.0
#12 0x09c88120 in ?? ()
#13 0x00000044 in ?? ()
#14 0xbf809cb8 in ?? ()
#15 0xb7e0dd74 in ?? () from /usr/lib/libgtk-x11-2.0.so.0
#16 0x09c61f80 in ?? ()
#17 0x09aed918 in ?? ()
#18 0xbf809c98 in ?? ()
#19 0xb7cd0e7f in gtk_tree_model_get_value () from /usr/lib/libgtk-x11-2.0.so.0

Apart from this, my other gtk-based apps are perfectly working. Anyway, tell me if I can do something else to investigate the issue.

P.S.
Not related to gui: stoping one game and loading the same or another game (in any way) gives "Signal number 11 caught: errno = 0 (Success)"
 

Günther1

New member
Richard, looks something is still broken (at least in my setup).
double-clicking: OK

right-clicking, 'refresh':
Code:
(mupen64:3842): Gtk-CRITICAL **: gtk_list_store_remove: assertion `VALID_ITER (iter, list_store)' failed

I have a patch fixing this by simply removing unnecessary use of GValue - the gtk_tree_model wrapper works just fine. Hopefully I can attach that file after I post this...

If not, here it is:
http://rafb.net/p/9P6FuX61.txt
 
Last edited:
OP
M

mike_k

New member
Günther, with your patch 'rom properties' and 'play rom' silently works.
'refresh' refreshes, but still generates
Code:
(mupen64:3702): Gtk-CRITICAL **: gtk_list_store_remove: assertion `VALID_ITER (iter, list_store)' failed

Thanks for the fix.
Do you have any idea why others do not get that errors?
 

Richard42

Emulator Developer
I have a patch fixing this by simply removing unnecessary use of GValue - the gtk_tree_model wrapper works just fine. Hopefully I can attach that file after I post this...

Günther, thanks for the patch - I'll merge it into the SVN repository. It looks like you made a GIT repository from my SVN tree. That's great, I'm using GIT while working on the intel graphics drivers, and it is quite a nice source control system.
 

Günther1

New member
Do you have any idea why others do not get that errors?

Different GTK+ versions or configurations might be an explanation. I use 2.12.5 from Debian Unstable.

To fix that warning, simply remove the stuff clearing the list at the beginning of rombrowser_refresh with this:
Code:
	GtkTreeModel *model = gtk_tree_view_get_model(GTK_TREE_VIEW ( g_MainWindow.romTreeView ));
	gtk_list_store_clear(GTK_LIST_STORE(model));

The problem probably was that removing something from the list invalidates paths.

One can find the cause of such warnings quite efficiently by setting the environment variable G_DEBUG=fatal_warnings and using gdb.

It looks like you made a GIT repository from my SVN tree. That's great, I'm using GIT while working on the intel graphics drivers, and it is quite a nice source control system.

Yes, it is :)
 

Top