ogmrip crash with "gtk_file_system_model_sort: assertion failed: (r == n_visible_rows)"

Bug #862665 reported by Magnus Ihse Bursie
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
ogmrip (Ubuntu)
New
Undecided
Unassigned

Bug Description

I'm getting this quite frequently; irritatingly enough often after a long rip, but right now I got it just a few minutes after I launched the program, hadn't even begun ripping anything.

Output:
Gtk:ERROR:/build/buildd/gtk+2.0-2.24.4/gtk/gtkfilesystemmodel.c:746:gtk_file_system_model_sort: assertion failed: (r == n_visible_rows)

and ogmrip dies.

I have tried running with --debug, but I get nothing more helpful.

I can help supplying more information, if you have any idea where to start digging. I don't :)

ProblemType: Bug
DistroRelease: Ubuntu 11.04
Package: ogmrip 0.13.6-0ubuntu2
ProcVersionSignature: Ubuntu 2.6.38-11.48-generic 2.6.38.8
Uname: Linux 2.6.38-11-generic x86_64
NonfreeKernelModules: fglrx
Architecture: amd64
Date: Thu Sep 29 20:43:34 2011
InstallationMedia: Ubuntu 11.04 "Natty Narwhal" - Release amd64 (20110427.1)
SourcePackage: ogmrip
UpgradeStatus: No upgrade log present (probably fresh install)

Revision history for this message
Magnus Ihse Bursie (ihse) wrote :
Revision history for this message
Magnus Ihse Bursie (ihse) wrote :

I ran ogmrip in gdb; this is the backtrace.

Gtk:ERROR:/build/buildd/gtk+2.0-2.24.4/gtk/gtkfilesystemmodel.c:746:gtk_file_system_model_sort: assertion failed: (r == n_visible_rows)

Program received signal SIGABRT, Aborted.
0x00007ffff4d5ed05 in raise () from /lib/x86_64-linux-gnu/libc.so.6
(gdb) bt
#0 0x00007ffff4d5ed05 in raise () from /lib/x86_64-linux-gnu/libc.so.6
#1 0x00007ffff4d62ab6 in abort () from /lib/x86_64-linux-gnu/libc.so.6
#2 0x00007ffff534551d in g_assertion_message ()
   from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#3 0x00007ffff5345ae0 in g_assertion_message_expr ()
   from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#4 0x00007ffff6bf4d6a in ?? () from /usr/lib/libgtk-x11-2.0.so.0
#5 0x00007ffff6bf6ab8 in ?? () from /usr/lib/libgtk-x11-2.0.so.0
#6 0x00007ffff6bf6bc0 in ?? () from /usr/lib/libgtk-x11-2.0.so.0
#7 0x00007ffff4a64cc8 in ?? () from /usr/lib/x86_64-linux-gnu/libgio-2.0.so.0
#8 0x00007ffff531fbcd in g_main_context_dispatch ()
   from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#9 0x00007ffff53203a8 in ?? () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#10 0x00007ffff53209f2 in g_main_loop_run ()
   from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#11 0x00007ffff6c38af7 in gtk_main () from /usr/lib/libgtk-x11-2.0.so.0
#12 0x00000000004187fb in main ()
(gdb)

libgtk doesn't seem to have any proper symbols, so this is probably of limited value. :(

Revision history for this message
Magnus Ihse Bursie (ihse) wrote :
Download full text (7.1 KiB)

I installed the dbg version of libgtk, and re-ran ogmrip in gdb. This time I got a slightly better looking backtrace:

[New Thread 0x7fffe7f06700 (LWP 11692)]
**
Gtk:ERROR:/build/buildd/gtk+2.0-2.24.4/gtk/gtkfilesystemmodel.c:746:gtk_file_system_model_sort: assertion failed: (r == n_visible_rows)

Program received signal SIGABRT, Aborted.
0x00007ffff4d5ed05 in raise () from /lib/x86_64-linux-gnu/libc.so.6
(gdb) bt
#0 0x00007ffff4d5ed05 in raise () from /lib/x86_64-linux-gnu/libc.so.6
#1 0x00007ffff4d62ab6 in abort () from /lib/x86_64-linux-gnu/libc.so.6
#2 0x00007ffff534551d in g_assertion_message ()
   from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#3 0x00007ffff5345ae0 in g_assertion_message_expr ()
   from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#4 0x00007ffff6bf4d6a in gtk_file_system_model_sort (model=0xa3e0d0)
    at /build/buildd/gtk+2.0-2.24.4/gtk/gtkfilesystemmodel.c:746
#5 0x00007ffff6bf6ab8 in _gtk_file_system_model_update_file (model=0xa3e0d0,
    file=0x1010b60, info=0x109aed0, requires_resort=1)
    at /build/buildd/gtk+2.0-2.24.4/gtk/gtkfilesystemmodel.c:1786
#6 0x00007ffff6bf6bc0 in gtk_file_system_model_query_done (
    object=<value optimized out>, res=<value optimized out>, data=0xa3e0d0)
    at /build/buildd/gtk+2.0-2.24.4/gtk/gtkfilesystemmodel.c:1154
#7 0x00007ffff4a64cc8 in ?? () from /usr/lib/x86_64-linux-gnu/libgio-2.0.so.0
#8 0x00007ffff531fbcd in g_main_context_dispatch ()
   from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#9 0x00007ffff53203a8 in ?? () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#10 0x00007ffff53209f2 in g_main_loop_run ()
   from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#11 0x00007ffff77b7546 in ?? () from /usr/lib/libogmjob.so.1
---Type <return> to continue, or q <return> to quit---
#12 0x00007ffff77b8284 in ogmjob_cclosure_marshal_INT__VOID ()
   from /usr/lib/libogmjob.so.1
#13 0x00007ffff55da765 in g_closure_invoke ()
   from /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0
#14 0x00007ffff55ebe1f in ?? ()
   from /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0
#15 0x00007ffff55f4fa9 in g_signal_emit_valist ()
   from /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0
#16 0x00007ffff55f541f in g_signal_emit ()
   from /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0
#17 0x00007ffff77b8d4c in ogmjob_spawn_run () from /usr/lib/libogmjob.so.1
#18 0x00007ffff77b89a5 in ?? () from /usr/lib/libogmjob.so.1
#19 0x00007ffff77b8284 in ogmjob_cclosure_marshal_INT__VOID ()
   from /usr/lib/libogmjob.so.1
#20 0x00007ffff55da765 in g_closure_invoke ()
   from /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0
#21 0x00007ffff55ebe1f in ?? ()
   from /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0
#22 0x00007ffff55f4fa9 in g_signal_emit_valist ()
   from /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0
#23 0x00007ffff55f541f in g_signal_emit ()
---Type <return> to continue, or q <return> to quit---
   from /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0
#24 0x00007ffff77b8d4c in ogmjob_spawn_run () from /usr/lib/libogmjob.so.1
#25 0x00007ffff77b67dc in ?? () from /usr/lib/libogmjob.so.1
#26 0x00007fffebfa183d in ?? ()
   from /usr/lib/ogmrip/video-plugins/libogmrip-xvid.so
#27 0x00007ffff77b8284 in ogmjob_cclosure_marshal_INT__VOID (...

Read more...

Revision history for this message
Magnus Ihse Bursie (ihse) wrote :
Revision history for this message
Magnus Ihse Bursie (ihse) wrote :
Revision history for this message
Magnus Ihse Bursie (ihse) wrote :

I added some more information I extracted from gdb.

Note the following:
$ grep -c "visible = 1" model-nodes-array.txt
41

That is the same number as n_visible_rows.

I'm not sure I understand 100% what gtk_file_system_model_sort() is trying to do, but it seems a bit fishy that r is incremented for each time in the loop, even if the node is not visible. My intuition is that r will end up being the total number of nodes, not the number of visible nodes, and that this might very well be larger than the number of visible nodes. (As I believe it in fact is in my crash.) But I'm not sure about the origin of the n_visible_rows; it comes from:
  n_visible_rows = node_get_tree_row (model, model->files->len - 1) + 1;
so depending on how the model data structure should look, it might very well be correct.

Also, I also noted that the call to this function reads:

  /* FIXME: improve */
  gtk_file_system_model_sort (model);

In my experience, finding a "FIXME" close to a place where a crash/assert happened is a prime suspect.

This is probably how far I can take this; I don't have anymore gtk experience and not much more time debugging it either, unfortunately. If you need more info, I can probably re-create the situation quite easily, though. (Happens far too often when i run ogmrip. :-()

Revision history for this message
Magnus Ihse Bursie (ihse) wrote :

Also, it seems to me now that this is a bug in libgtk, not in ogmrip. I'm not sure if it is possible to reassign the bug in launchpad..? I can't find a way to do it anyway, but perhaps someone can help.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.