After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 458688 - Crash when cancelling import, importing and closing down
Crash when cancelling import, importing and closing down
Status: RESOLVED NOTGNOME
Product: f-spot
Classification: Other
Component: Import
SVN
Other All
: Normal normal
: ---
Assigned To: F-spot maintainers
F-spot maintainers
Depends on:
Blocks:
 
 
Reported: 2007-07-20 15:39 UTC by Christoffer Sørensen
Modified: 2007-09-22 18:06 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Disable glXDestroyContext() to keep Savage-based machines from crashing (632 bytes, patch)
2007-09-18 09:49 UTC, Frank de Lange
none Details | Review

Description Christoffer Sørensen 2007-07-20 15:39:42 UTC
Please describe the problem:
I've had this crash before in f-spot 0.3.4.

This is on Ubuntu 6.10

mono           1.1.17.1-1
libgtk2.0-0    2.10.6-0
libgtk2.0-cil  2.10.0-0ubuntu

Steps to reproduce:
1. Import
2. Cancel

or
1. Import
2. Import

or

1. Start.
2. Close f-spot


Actual results:
It crashes

Expected results:
It doesn't crash

Does this happen every time?
Yes

Other information:
Stacktrace:

cleanup context

=================================================================
Got a SIGSEGV while executing native code. This usually indicates
a fatal error in the mono runtime or one of the native libraries 
used by your application.
=================================================================

Stacktrace:

  at (wrapper managed-to-native) GdkGlx.Context.glXDestroyContext (intptr,System.Runtime.InteropServices.HandleRef) <0x00004>
  at (wrapper managed-to-native) GdkGlx.Context.glXDestroyContext (intptr,System.Runtime.InteropServices.HandleRef) <0xffffffff>
  at GdkGlx.Context.Destroy () <0x0004e>
  at FSpot.PhotoImageView.HandleUnrealized (object,System.EventArgs) <0x00019>
  at (wrapper delegate-invoke) System.MulticastDelegate.invoke_void_object_EventArgs (object,System.EventArgs) <0xffffffff>
  at GLib.Signal.voidObjectCallback (intptr,intptr) <0x00093>
  at (wrapper native-to-managed) GLib.Signal.voidObjectCallback (intptr,intptr) <0xffffffff>
  at (wrapper managed-to-native) Gtk.Object.gtk_object_destroy (intptr) <0x00004>
  at (wrapper managed-to-native) Gtk.Object.gtk_object_destroy (intptr) <0xffffffff>
  at Gtk.Object.Destroy () <0x0001a>
  at Gtk.Widget.Destroy () <0x0000d>
  at ImportCommand.HandleDialogResponse (object,Gtk.ResponseArgs) <0x0006b>
  at (wrapper delegate-invoke) System.MulticastDelegate.invoke_void_object_ResponseArgs (object,Gtk.ResponseArgs) <0xffffffff>
  at Gtk.Dialog.ResponseSignalCallback (intptr,int,intptr) <0x000ff>
  at (wrapper native-to-managed) Gtk.Dialog.ResponseSignalCallback (intptr,int,intptr) <0xffffffff>
  at (wrapper managed-to-native) Gtk.Dialog.gtk_dialog_run (intptr) <0x00004>
  at (wrapper managed-to-native) Gtk.Dialog.gtk_dialog_run (intptr) <0xffffffff>
  at Gtk.Dialog.Run () <0x00024>
  at ImportCommand.ImportFromFile (PhotoStore,string) <0x00594>
  at MainWindow.HandleImportCommand (object,System.EventArgs) <0x00051>
  at (wrapper delegate-invoke) System.MulticastDelegate.invoke_void_object_EventArgs (object,System.EventArgs) <0xffffffff>
  at GLib.Signal.voidObjectCallback (intptr,intptr) <0x00093>
  at (wrapper native-to-managed) GLib.Signal.voidObjectCallback (intptr,intptr) <0xffffffff>
  at (wrapper managed-to-native) Gtk.Application.gtk_main () <0x00004>
  at (wrapper managed-to-native) Gtk.Application.gtk_main () <0xffffffff>
  at Gtk.Application.Run () <0x00007>
  at Gnome.Program.Run () <0x00007>
  at FSpot.Driver.Main (string[]) <0x00858>
  at (wrapper runtime-invoke) System.Object.runtime_invoke_void_string[] (object,intptr,intptr,intptr) <0xffffffff>

Native stacktrace:

        f-spot(mono_handle_native_sigsegv+0xde) [0x815644e]
        f-spot [0x8122c88]
        [0xffffe440]
        /usr/lib/dri/savage_dri.so(savageFlushCmdBuf+0xb3) [0xb1ff1ff3]
        /usr/lib/dri/savage_dri.so [0xb1fc5b74]
        /usr/lib/dri/savage_dri.so [0xb1fc1f87]
        /usr/lib/libGL.so.1 [0xb21e6a53]
        [0xb2e21df3]
        [0xb2e21c7f]
        [0xb2e21c1a]
        [0xb3699ae2]
        [0xb255c1d4]
        [0xb369bf46]
        /usr/lib/libgobject-2.0.so.0(g_cclosure_marshal_VOID__VOID+0x49) [0xb6384b29]
        /usr/lib/libgobject-2.0.so.0(g_closure_invoke+0x12b) [0xb637779b]
        /usr/lib/libgobject-2.0.so.0 [0xb6387e81]
        /usr/lib/libgobject-2.0.so.0(g_signal_emit_valist+0x8c7) [0xb63890b7]
        /usr/lib/libgobject-2.0.so.0(g_signal_emit+0x29) [0xb6389279]
        /usr/lib/libgtk-x11-2.0.so.0(gtk_widget_unrealize+0xd2) [0xb6977392]
        /usr/lib/libgtk-x11-2.0.so.0 [0xb678849f]
        /usr/lib/libgtk-x11-2.0.so.0 [0xb68b3568]
        /usr/lib/libgtk-x11-2.0.so.0(gtk_container_forall+0x6b) [0xb67c75fb]
        /usr/lib/libgtk-x11-2.0.so.0 [0xb697be1a]
        /usr/lib/libgobject-2.0.so.0(g_cclosure_marshal_VOID__VOID+0x49) [0xb6384b29]
        /usr/lib/libgobject-2.0.so.0 [0xb6375fb9]
        /usr/lib/libgobject-2.0.so.0(g_closure_invoke+0x20d) [0xb637787d]
        /usr/lib/libgobject-2.0.so.0 [0xb63881e3]
        /usr/lib/libgobject-2.0.so.0(g_signal_emit_valist+0x8c7) [0xb63890b7]
        /usr/lib/libgobject-2.0.so.0(g_signal_emit+0x29) [0xb6389279]
        /usr/lib/libgtk-x11-2.0.so.0(gtk_widget_unrealize+0xd2) [0xb6977392]
        /usr/lib/libgtk-x11-2.0.so.0 [0xb68807da]
        /usr/lib/libgtk-x11-2.0.so.0(gtk_container_forall+0x6b) [0xb67c75fb]
        /usr/lib/libgtk-x11-2.0.so.0 [0xb697be1a]
        /usr/lib/libgtk-x11-2.0.so.0 [0xb688337b]
        /usr/lib/libgobject-2.0.so.0(g_cclosure_marshal_VOID__VOID+0x49) [0xb6384b29]
        /usr/lib/libgobject-2.0.so.0 [0xb6375fb9]
        /usr/lib/libgobject-2.0.so.0(g_closure_invoke+0x20d) [0xb637787d]
        /usr/lib/libgobject-2.0.so.0 [0xb63881e3]
        /usr/lib/libgobject-2.0.so.0(g_signal_emit_valist+0x8c7) [0xb63890b7]
        /usr/lib/libgobject-2.0.so.0(g_signal_emit+0x29) [0xb6389279]
        /usr/lib/libgtk-x11-2.0.so.0(gtk_widget_unrealize+0xd2) [0xb6977392]
        /usr/lib/libgtk-x11-2.0.so.0 [0xb678c0e0]
        /usr/lib/libgtk-x11-2.0.so.0(gtk_container_forall+0x6b) [0xb67c75fb]
        /usr/lib/libgtk-x11-2.0.so.0 [0xb697be1a]
        /usr/lib/libgobject-2.0.so.0(g_cclosure_marshal_VOID__VOID+0x49) [0xb6384b29]
        /usr/lib/libgobject-2.0.so.0 [0xb6375fb9]
        /usr/lib/libgobject-2.0.so.0(g_closure_invoke+0x20d) [0xb637787d]
        /usr/lib/libgobject-2.0.so.0 [0xb63881e3]
        /usr/lib/libgobject-2.0.so.0(g_signal_emit_valist+0x8c7) [0xb63890b7]
        /usr/lib/libgobject-2.0.so.0(g_signal_emit+0x29) [0xb6389279]
        /usr/lib/libgtk-x11-2.0.so.0(gtk_widget_unrealize+0xd2) [0xb6977392]
        /usr/lib/libgtk-x11-2.0.so.0 [0xb678c0e0]
        /usr/lib/libgtk-x11-2.0.so.0(gtk_container_forall+0x6b) [0xb67c75fb]
        /usr/lib/libgtk-x11-2.0.so.0 [0xb697be1a]
        /usr/lib/libgobject-2.0.so.0(g_cclosure_marshal_VOID__VOID+0x49) [0xb6384b29]
        /usr/lib/libgobject-2.0.so.0 [0xb6375fb9]
        /usr/lib/libgobject-2.0.so.0(g_closure_invoke+0x20d) [0xb637787d]
        /usr/lib/libgobject-2.0.so.0 [0xb63881e3]
        /usr/lib/libgobject-2.0.so.0(g_signal_emit_valist+0x8c7) [0xb63890b7]
        /usr/lib/libgobject-2.0.so.0(g_signal_emit+0x29) [0xb6389279]
        /usr/lib/libgtk-x11-2.0.so.0(gtk_widget_unrealize+0xd2) [0xb6977392]
        /usr/lib/libgtk-x11-2.0.so.0 [0xb678c0e0]
        /usr/lib/libgtk-x11-2.0.so.0(gtk_container_forall+0x6b) [0xb67c75fb]
        /usr/lib/libgtk-x11-2.0.so.0 [0xb697be1a]
        /usr/lib/libgobject-2.0.so.0(g_cclosure_marshal_VOID__VOID+0x49) [0xb6384b29]
        /usr/lib/libgobject-2.0.so.0 [0xb6375fb9]
        /usr/lib/libgobject-2.0.so.0(g_closure_invoke+0x20d) [0xb637787d]
        /usr/lib/libgobject-2.0.so.0 [0xb63881e3]
        /usr/lib/libgobject-2.0.so.0(g_signal_emit_valist+0x8c7) [0xb63890b7]
        /usr/lib/libgobject-2.0.so.0(g_signal_emit+0x29) [0xb6389279]
        /usr/lib/libgtk-x11-2.0.so.0(gtk_widget_unrealize+0xd2) [0xb6977392]
        /usr/lib/libgtk-x11-2.0.so.0 [0xb678849f]
        /usr/lib/libgtk-x11-2.0.so.0(gtk_container_forall+0x6b) [0xb67c75fb]
        /usr/lib/libgtk-x11-2.0.so.0 [0xb697be1a]
        /usr/lib/libgtk-x11-2.0.so.0 [0xb6986703]
        /usr/lib/libgobject-2.0.so.0(g_cclosure_marshal_VOID__VOID+0x49) [0xb6384b29]
        /usr/lib/libgobject-2.0.so.0 [0xb6375fb9]
        /usr/lib/libgobject-2.0.so.0(g_closure_invoke+0x12b) [0xb637779b]
        /usr/lib/libgobject-2.0.so.0 [0xb63881e3]
        /usr/lib/libgobject-2.0.so.0(g_signal_emit_valist+0x8c7) [0xb63890b7]
        /usr/lib/libgobject-2.0.so.0(g_signal_emit+0x29) [0xb6389279]
        /usr/lib/libgtk-x11-2.0.so.0(gtk_widget_unrealize+0xd2) [0xb6977392]
        /usr/lib/libgtk-x11-2.0.so.0 [0xb6977d35]
        /usr/lib/libgtk-x11-2.0.so.0 [0xb6984006]
        /usr/lib/libgobject-2.0.so.0(g_object_run_dispose+0x50) [0xb6379e30]
        /usr/lib/libgtk-x11-2.0.so.0(gtk_object_destroy+0x7e) [0xb687cdfe]
        [0xb22b787c]
        [0xb22b7833]
        [0xb22b780e]
        [0xb2e21ac4]
        [0xb2e21a32]
        [0xb2e21968]
        [0xaac7f701]
        /usr/lib/libgobject-2.0.so.0(g_cclosure_marshal_VOID__INT+0x59) [0xb6384879]
        /usr/lib/libgobject-2.0.so.0(g_closure_invoke+0x12b) [0xb637779b]
        /usr/lib/libgobject-2.0.so.0 [0xb6387e81]
        /usr/lib/libgobject-2.0.so.0(g_signal_emit_valist+0x8c7) [0xb63890b7]
        /usr/lib/libgobject-2.0.so.0(g_signal_emit+0x29) [0xb6389279]
        /usr/lib/libgtk-x11-2.0.so.0(gtk_dialog_response+0x5a) [0xb67d8f5a]
        /usr/lib/libgtk-x11-2.0.so.0 [0xb67d8fb5]
        /usr/lib/libgobject-2.0.so.0(g_cclosure_marshal_VOID__VOID+0x49) [0xb6384b29]
        /usr/lib/libgobject-2.0.so.0(g_closure_invoke+0x12b) [0xb637779b]
        /usr/lib/libgobject-2.0.so.0 [0xb6387b93]
        /usr/lib/libgobject-2.0.so.0(g_signal_emit_valist+0x8c7) [0xb63890b7]
        /usr/lib/libgobject-2.0.so.0(g_signal_emit+0x29) [0xb6389279]
        /usr/lib/libgtk-x11-2.0.so.0(gtk_button_clicked+0x53) [0xb678d093]
        /usr/lib/libgtk-x11-2.0.so.0 [0xb678ecde]
        /usr/lib/libgobject-2.0.so.0(g_cclosure_marshal_VOID__VOID+0x49) [0xb6384b29]
        /usr/lib/libgobject-2.0.so.0 [0xb6375fb9]
        /usr/lib/libgobject-2.0.so.0(g_closure_invoke+0x12b) [0xb637779b]
        /usr/lib/libgobject-2.0.so.0 [0xb638802a]
        /usr/lib/libgobject-2.0.so.0(g_signal_emit_valist+0x8c7) [0xb63890b7]
        /usr/lib/libgobject-2.0.so.0(g_signal_emit+0x29) [0xb6389279]
        /usr/lib/libgtk-x11-2.0.so.0(gtk_button_released+0x53) [0xb678d123]
        /usr/lib/libgtk-x11-2.0.so.0 [0xb678d181]
        /usr/lib/libgtk-x11-2.0.so.0(_gtk_marshal_BOOLEAN__BOXED+0x60) [0xb685cb00]
        /usr/lib/libgobject-2.0.so.0 [0xb6375fb9]
        /usr/lib/libgobject-2.0.so.0(g_closure_invoke+0x20d) [0xb637787d]
        /usr/lib/libgobject-2.0.so.0 [0xb63881e3]
        /usr/lib/libgobject-2.0.so.0(g_signal_emit_valist+0x68f) [0xb6388e7f]
        /usr/lib/libgobject-2.0.so.0(g_signal_emit+0x29) [0xb6389279]
        /usr/lib/libgtk-x11-2.0.so.0 [0xb69705f8]
        /usr/lib/libgtk-x11-2.0.so.0(gtk_propagate_event+0x183) [0xb6855ef3]
        /usr/lib/libgtk-x11-2.0.so.0(gtk_main_do_event+0x317) [0xb68570f7]
        /usr/lib/libgdk-x11-2.0.so.0 [0xb66e07ea]
        /usr/lib/libglib-2.0.so.0(g_main_context_dispatch+0x182) [0xb7e6f802]
        /usr/lib/libglib-2.0.so.0 [0xb7e727df]
        /usr/lib/libglib-2.0.so.0(g_main_loop_run+0x1a9) [0xb7e72b89]
        /usr/lib/libgtk-x11-2.0.so.0(gtk_dialog_run+0x18b) [0xb67d8dfb]
        [0xb2e21845]
        [0xb2e217f5]
        [0xaac7ef5d]
        [0xb369e132]
        [0xb3699ae2]
        [0xb255c1d4]
        [0xb369bf46]
        /usr/lib/libgobject-2.0.so.0(g_cclosure_marshal_VOID__VOID+0x49) [0xb6384b29]
        /usr/lib/libgobject-2.0.so.0(g_closure_invoke+0x12b) [0xb637779b]
        /usr/lib/libgobject-2.0.so.0 [0xb6387e81]
        /usr/lib/libgobject-2.0.so.0(g_signal_emit_valist+0x8c7) [0xb63890b7]
        /usr/lib/libgobject-2.0.so.0(g_signal_emit+0x29) [0xb6389279]
        /usr/lib/libgtk-x11-2.0.so.0(gtk_widget_activate+0x94) [0xb6974994]
        /usr/lib/libgtk-x11-2.0.so.0(gtk_menu_shell_activate_item+0x118) [0xb68697d8]
        /usr/lib/libgtk-x11-2.0.so.0 [0xb686ada2]
        /usr/lib/libgtk-x11-2.0.so.0 [0xb6862995]
        /usr/lib/libgtk-x11-2.0.so.0(_gtk_marshal_BOOLEAN__BOXED+0x60) [0xb685cb00]
        /usr/lib/libgobject-2.0.so.0 [0xb6375fb9]
        /usr/lib/libgobject-2.0.so.0(g_closure_invoke+0x12b) [0xb637779b]
        /usr/lib/libgobject-2.0.so.0 [0xb63881e3]
        /usr/lib/libgobject-2.0.so.0(g_signal_emit_valist+0x68f) [0xb6388e7f]
        /usr/lib/libgobject-2.0.so.0(g_signal_emit+0x29) [0xb6389279]
        /usr/lib/libgtk-x11-2.0.so.0 [0xb69705f8]
        /usr/lib/libgtk-x11-2.0.so.0(gtk_propagate_event+0x183) [0xb6855ef3]
        /usr/lib/libgtk-x11-2.0.so.0(gtk_main_do_event+0x317) [0xb68570f7]
        /usr/lib/libgdk-x11-2.0.so.0 [0xb66e07ea]
        /usr/lib/libglib-2.0.so.0(g_main_context_dispatch+0x182) [0xb7e6f802]
        /usr/lib/libglib-2.0.so.0 [0xb7e727df]
        /usr/lib/libglib-2.0.so.0(g_main_loop_run+0x1a9) [0xb7e72b89]
        /usr/lib/libgtk-x11-2.0.so.0(gtk_main+0xb4) [0xb6857574]
        [0xaaccc771]
        [0xaaccc730]
        [0xaaccc710]
        [0xb7243021]
        [0xb7241a73]
        f-spot(mono_runtime_exec_main+0x62) [0x80996b2]
        f-spot(mono_runtime_run_main+0x1b9) [0x8099999]
        f-spot(mono_main+0xe47) [0x805d477]
        f-spot [0x805c122]
        /lib/tls/i686/cmov/libc.so.6(__libc_start_main+0xdc) [0xb7ccc8cc]
        f-spot [0x805c071]
Aborted
Comment 1 Stephane Delcroix 2007-07-21 10:58:05 UTC
This bug is probably related to your graphical environment... what od you use ase graphic card, with which driver, on which system ?
Comment 2 Christoffer Sørensen 2007-07-21 11:26:21 UTC
I am using Savage S3 on Ubuntu 6.10

xserver-xorg   7.1.1ubuntu6.2

01:00.0 VGA compatible controller: S3 Inc. SuperSavage IX/C SDR (rev 05)

This is an IBM T23 laptop.

I tried disabling glx and f-spot didn't crash but I got this in the terminal:

Xlib:  extension "GLX" missing on display ":0.0".
Error initializing the OpenGL context:
 GdkGlx.GlxException: Unable to find matching visual
  at GdkGlx.Context..ctor (Gdk.Screen screen, GdkGlx.Context share_list, System.Int32[] attr) [0x00000] 
  at GdkGlx.Context..ctor (Gdk.Screen screen, System.Int32[] attr) [0x00000] 
  at FSpot.PhotoImageView.HandleRealized (System.Object sender, System.EventArgs args) [0x00000] 
cleanup context
cleanup context

(f-spot:6263): GdkPixbuf-WARNING **: GdkPixbufLoader finalized without calling gdk_pixbuf_loader_close() - this is not allowed. You must explicitly end the data stream to the loader before dropping the last reference.

Maybe this is related to my crash?
Comment 3 Stephane Delcroix 2007-07-21 18:14:11 UTC
y, it's related... the latest error is "normal" if you run f-spot without glx... cause f-spot need it for some slideshow transitions.
Comment 4 Christoffer Sørensen 2007-07-22 10:51:17 UTC
I tried running f-spot in Ubuntu gutsy and got the same error, unfortunately.
Comment 5 Frank de Lange 2007-09-14 23:09:53 UTC
Same problem here. A workaround for the crash-on-cancel is to edit the source to get rid of the explicit call to glXDestroyContext in src/GdkGlx.cs, relying instead on the X server to destroy these contexts when the progam is closed. F-spot still crashes on exit though so this workaround does not solve all problems... I have not tested this workaround extensively yet so I do not know whether it solves all crashes or leads to resource starvation on the X server...
Comment 6 Frank de Lange 2007-09-14 23:20:40 UTC
While the above workaround makes it possible to use f-spot on the T23 it is not a real solution. The actual bug is probably in the savage dri driver. I have tried to add explicit calls to glXMakeCurrent, glFinish, glFlush, glXWaitX and glXWaitGL before the call to glXDestroyContext but those do not solve the crash. Removing the call to glXDestroyContext does...
Comment 7 Frank de Lange 2007-09-18 09:49:43 UTC
Created attachment 95786 [details] [review]
Disable glXDestroyContext() to keep Savage-based machines from crashing

Simple patch to disable glXDestroyContext() as the use of that function causes a crash on Savage-based systems. The X server should destroy these contexts when the program is terminated.

The real bug to be fixed is most likely somewhere in the savage driver. This patch makes it possible to use f-spot on affected systems until the savage driver is fixed.