Hi Guys I Would like to have some help in figuring out why I get a Crash in the following patch. I have been banging my head against this for a while now, but the closest I can pinpoint it is something with Mono! I added the same code (delete tags when cancel) to Gabriels GThumb tag importer, and it crashes there also. How to reproduce it. (Key thing, is that you have a photo to import, which have F-Spot tags in it, and the tags do not exist in F-Spot. Like Events --> Party, where Party do not exist. 1) Delete all Photos, and photos.db 2) Apply the patch 3) Tag a photo with some newly created tags 4) Copy this photo to another empty directory 5) Stop f-spot 6) Delete Photos and photos.db 7) Start f-spot 8) Start the import a) Open the folder where you have this photo, press ok b) DO NOT import anything now c) Open another folder. (Press select folder, instead of Import or Cancel) d) --> Crash The code that causes it to crash is in XmpTagsImporter.cs, row 157. --- #if CRASH (row 157) tag_store.Remove ((DbItem) tags_created.Pop()); #else Tag t = tags_created.Pop() as Tag; #endif --- BUT, it do not crash here, it crashes in CompatFileChooser.cs, row 107. --- WriteLine ("2In Run, use_file_chooser {0}, chooser {1}, filesel {2}", use_file_chooser); if (use_file_chooser) response = chooser.Run (); else response = filesel.Run (); System.Console.WriteLine ("3Leaving Run"); --- If you undefine the CRASH variable in XmpTagsImporter.cs, the code will not call tag_store.Remove, and then the it will not crash. I tried with a 10 seconds delay, just in case it was some timing issues, but still crashes. I do not understand why tag_store.Remove(tag) will destroy a gtk dialog window 4 calls later or so. Appreciate any help or hints on this one, since I am stuck... /Bengt The crash is as follows: === About to delete just created tags - 2 of them About call tag_store_Remove(Pappa), count=2 About call tag_store_Remove(Last Import), count=1 item ImportCommand+SourceItem 2In Run, use_file_chooser True, chooser Not null, filesel NULL System.NullReferenceException: Object reference not set to an instance of an object in <0x00fc2> IconView:DrawCell (Int32 thumbnail_num, Rectangle area) in <0x0017a> IconView:DrawAllCells (Rectangle area) in <0x00097> IconView:OnExposeEvent (Gdk.EventExpose args) in <0x00054> Gtk.Widget:exposeevent_cb (IntPtr widget, IntPtr evnt) in (wrapper native-to-managed) Gtk.Widget:exposeevent_cb (intptr,intptr) in <0x00000> <unknown method> in (wrapper managed-to-native) Gtk.Dialog:gtk_dialog_run (intptr) in <0x0001d> Gtk.Dialog:Run () in <0x000a0> CompatFileChooserDialog:Run () === An unhandled exception was thrown: Object reference not set to an instance of an object in <0x00fc2> IconView:DrawCell (Int32 thumbnail_num, Rectangle area) in <0x0017a> IconView:DrawAllCells (Rectangle area) in <0x00097> IconView:OnExposeEvent (Gdk.EventExpose args) in <0x00054> Gtk.Widget:exposeevent_cb (IntPtr widget, IntPtr evnt) in (wrapper native-to-managed) Gtk.Widget:exposeevent_cb (intptr,intptr) in <0x00000> <unknown method> in (wrapper managed-to-native) Gtk.Dialog:gtk_dialog_run (intptr) in <0x0001d> Gtk.Dialog:Run () Distribution: Ubuntu 6.06 (dapper) Package: f-spot Severity: Normal Version: GNOME2.14.1 0.1.11 Gnome-Distributor: Ubuntu Synopsis: Crash when... Bugzilla-Product: f-spot Bugzilla-Component: General Bugzilla-Version: 0.1.11 BugBuddy-GnomeVersion: 2.0 (2.14.1) Description: Backtrace was generated from '/usr/local/bin/f-spot' (no debugging symbols found) Using host libthread_db library "/lib/tls/i686/cmov/libthread_db.so.1". (no debugging symbols found) (no debugging symbols found) (no debugging symbols found) (no debugging symbols found) (no debugging symbols found) (no debugging symbols found) (no debugging symbols found) (no debugging symbols found) [Thread debugging using libthread_db enabled] [New Thread -1212724928 (LWP 16605)] [New Thread -1336575056 (LWP 16626)] [New Thread -1284654160 (LWP 16616)] [New Thread -1279599696 (LWP 16613)] [New Thread -1276240976 (LWP 16612)] [New Thread -1275188304 (LWP 16611)] [New Thread -1222566992 (LWP 16607)] [New Thread -1208685648 (LWP 16606)] (no debugging symbols found) (no debugging symbols found) (no debugging symbols found) (no debugging symbols found) (no debugging symbols found) (no debugging symbols found) (no debugging symbols found) (no debugging symbols found) (no debugging symbols found) (no debugging symbols found) (no debugging symbols found) (no debugging symbols found) (no debugging symbols found) (no debugging symbols found) (no debugging symbols found) (no debugging symbols found) (no debugging symbols found) (no debugging symbols found) (no debugging symbols found) (no debugging symbols found) (no debugging symbols found) (no debugging symbols found) (no debugging symbols found) (no debugging symbols found) (no debugging symbols found) (no debugging symbols found) (no debugging symbols found) (no debugging symbols found) (no debugging symbols found) (no debugging symbols found) (no debugging symbols found) (no debugging symbols found) (no debugging symbols found) (no debugging symbols found) (no debugging symbols found) (no debugging symbols found) (no debugging symbols found) (no debugging symbols found) (no debugging symbols found) (no debugging symbols found) (no debugging symbols found) (no debugging symbols found) (no debugging symbols found) (no debugging symbols found) (no debugging symbols found) (no debugging symbols found) (no debugging symbols found) (no debugging symbols found) (no debugging symbols found) (no debugging symbols found) (no debugging symbols found) (no debugging symbols found) (no debugging symbols found) (no debugging symbols found) (no debugging symbols found) (no debugging symbols found) (no debugging symbols found) (no debugging symbols found) (no debugging symbols found) (no debugging symbols found) (no debugging symbols found) (no debugging symbols found) (no debugging symbols found) (no debugging symbols found) (no debugging symbols found) (no debugging symbols found) (no debugging symbols found) (no debugging symbols found) (no debugging symbols found) (no debugging symbols found) (no debugging symbols found) (no debugging symbols found) (no debugging symbols found) (no debugging symbols found) (no debugging symbols found) (no debugging symbols found) (no debugging symbols found) (no debugging symbols found) (no debugging symbols found) 0xffffe410 in __kernel_vsyscall () #0 0xffffe410 in __kernel_vsyscall () #1 0xb7cda48b in __waitpid_nocancel () from /lib/tls/i686/cmov/libpthread.so.0 #2 0xb6d728e6 in libgnomeui_module_info_get () from /usr/lib/libgnomeui-2.so.0 #3 <signal handler called> #4 0xffffe410 in __kernel_vsyscall () #5 0xb7b9d9a1 in raise () from /lib/tls/i686/cmov/libc.so.6 #6 0xb7b9f2b9 in abort () from /lib/tls/i686/cmov/libc.so.6 #7 0xb7dfc47a in mono_handle_native_sigsegv () from /usr/lib/libmono.so.0 #8 0xb7dbe03e in mono_create_jump_trampoline () from /usr/lib/libmono.so.0 #9 <signal handler called> #10 0xb64e0293 in g_signal_get_invocation_hint () from /usr/lib/libgobject-2.0.so.0 #11 0xb3dd1305 in ?? () #12 0x08311a58 in ?? () #13 0x00000773 in ?? () #14 0xbfe6d478 in ?? () #15 0xbfe6da54 in ?? () #16 0x08067488 in ?? () #17 0x085eaed0 in ?? () #18 0x001e3000 in ?? () #19 0x00000773 in ?? () #20 0x00000000 in ?? () Thread 8 (Thread -1208685648 (LWP 16606)): #0 0xffffe410 in __kernel_vsyscall () No symbol table info available. #1 0xb7cd9d56 in __nanosleep_nocancel () from /lib/tls/i686/cmov/libpthread.so.0 No symbol table info available. #2 0xb7ea7956 in mono_disasm_code_one () from /usr/lib/libmono.so.0 No symbol table info available. #3 0xb7cd4341 in start_thread () from /lib/tls/i686/cmov/libpthread.so.0 No symbol table info available. #4 0xb7c3e4ee in clone () from /lib/tls/i686/cmov/libc.so.6 No symbol table info available. Thread 7 (Thread -1222566992 (LWP 16607)): #0 0xffffe410 in __kernel_vsyscall () No symbol table info available. #1 0xb7cd6eec in pthread_cond_timedwait@@GLIBC_2.3.2 () from /lib/tls/i686/cmov/libpthread.so.0 No symbol table info available. #2 0xb7eaa9e8 in _wapi_handle_ops_prewait () from /usr/lib/libmono.so.0 No symbol table info available. #3 0xb7eac8e3 in _wapi_handle_timedwait_signal_handle () from /usr/lib/libmono.so.0 No symbol table info available. #4 0xb7eac947 in _wapi_handle_wait_signal_handle () from /usr/lib/libmono.so.0 No symbol table info available. #5 0xb7eba3f7 in WaitForSingleObjectEx () from /usr/lib/libmono.so.0 No symbol table info available. #6 0xb7e58c53 in mono_domain_finalize () from /usr/lib/libmono.so.0 No symbol table info available. #7 0xb7e6f456 in mono_thread_get_pending_exception () from /usr/lib/libmono.so.0 No symbol table info available. #8 0xb7eb960f in CreateThread () from /usr/lib/libmono.so.0 No symbol table info available. #9 0xb7ed33b3 in GC_start_routine () from /usr/lib/libmono.so.0 No symbol table info available. #10 0xb7cd4341 in start_thread () from /lib/tls/i686/cmov/libpthread.so.0 No symbol table info available. #11 0xb7c3e4ee in clone () from /lib/tls/i686/cmov/libc.so.6 No symbol table info available. Thread 6 (Thread -1275188304 (LWP 16611)): #0 0xffffe410 in __kernel_vsyscall () No symbol table info available. #1 0xb7cd6eec in pthread_cond_timedwait@@GLIBC_2.3.2 () from /lib/tls/i686/cmov/libpthread.so.0 No symbol table info available. #2 0xb7eaa9e8 in _wapi_handle_ops_prewait () from /usr/lib/libmono.so.0 No symbol table info available. #3 0xb7eac8e3 in _wapi_handle_timedwait_signal_handle () from /usr/lib/libmono.so.0 No symbol table info available. #4 0xb7eac947 in _wapi_handle_wait_signal_handle () from /usr/lib/libmono.so.0 No symbol table info available. #5 0xb7eba3f7 in WaitForSingleObjectEx () from /usr/lib/libmono.so.0 No symbol table info available. #6 0xb7e6cdbd in ves_icall_System_Threading_Monitor_Monitor_wait () from /usr/lib/libmono.so.0 No symbol table info available. #7 0xb4047fc1 in ?? () No symbol table info available. #8 0x001f5570 in ?? () No symbol table info available. #9 0xffffffff in ?? () No symbol table info available. #10 0x085df370 in ?? () No symbol table info available. #11 0x085e3a68 in ?? () No symbol table info available. #12 0x085de610 in ?? () No symbol table info available. #13 0x00000000 in ?? () No symbol table info available. Thread 5 (Thread -1276240976 (LWP 16612)): #0 0xffffe410 in __kernel_vsyscall () No symbol table info available. #1 0xb7cd6eec in pthread_cond_timedwait@@GLIBC_2.3.2 () from /lib/tls/i686/cmov/libpthread.so.0 No symbol table info available. #2 0xb7eaa9e8 in _wapi_handle_ops_prewait () from /usr/lib/libmono.so.0 No symbol table info available. #3 0xb7eac8e3 in _wapi_handle_timedwait_signal_handle () from /usr/lib/libmono.so.0 No symbol table info available. #4 0xb7eac947 in _wapi_handle_wait_signal_handle () from /usr/lib/libmono.so.0 No symbol table info available. #5 0xb7eba3f7 in WaitForSingleObjectEx () from /usr/lib/libmono.so.0 No symbol table info available. #6 0xb7e6cdbd in ves_icall_System_Threading_Monitor_Monitor_wait () from /usr/lib/libmono.so.0 No symbol table info available. #7 0xb4047fc1 in ?? () No symbol table info available. #8 0x001b9510 in ?? () No symbol table info available. #9 0xffffffff in ?? () No symbol table info available. #10 0x085d3d18 in ?? () No symbol table info available. #11 0x085de308 in ?? () No symbol table info available. #12 0x085de610 in ?? () No symbol table info available. #13 0xb7f372ec in ?? () from /usr/lib/libmono.so.0 No symbol table info available. #14 0x001b9510 in ?? () No symbol table info available. #15 0x00000001 in ?? () No symbol table info available. #16 0xb3ee1264 in ?? () No symbol table info available. #17 0xb4047f9c in ?? () No symbol table info available. #18 0xb3ee127c in ?? () No symbol table info available. #19 0xb4047e9e in ?? () No symbol table info available. #20 0x001b9510 in ?? () No symbol table info available. #21 0xffffffff in ?? () No symbol table info available. #22 0x001b95a0 in ?? () No symbol table info available. #23 0x001c6190 in ?? () No symbol table info available. #24 0xb3ee12b8 in ?? () No symbol table info available. #25 0xb404824b in ?? () No symbol table info available. #26 0x001b9510 in ?? () No symbol table info available. #27 0x001c6190 in ?? () No symbol table info available. #28 0x00000000 in ?? () No symbol table info available. Thread 4 (Thread -1279599696 (LWP 16613)): #0 0xffffe410 in __kernel_vsyscall () No symbol table info available. #1 0xb7c348c4 in poll () from /lib/tls/i686/cmov/libc.so.6 No symbol table info available. #2 0xb7d1c7d8 in g_main_context_check () from /usr/lib/libglib-2.0.so.0 No symbol table info available. #3 0xb7d1cca8 in g_main_loop_run () from /usr/lib/libglib-2.0.so.0 No symbol table info available. #4 0xb649d70e in link_thread_io_context () from /usr/lib/libORBit-2.so.0 No symbol table info available. #5 0xb7d355d2 in g_static_private_free () from /usr/lib/libglib-2.0.so.0 No symbol table info available. #6 0xb7cd4341 in start_thread () from /lib/tls/i686/cmov/libpthread.so.0 No symbol table info available. #7 0xb7c3e4ee in clone () from /lib/tls/i686/cmov/libc.so.6 No symbol table info available. Thread 3 (Thread -1284654160 (LWP 16616)): #0 0xffffe410 in __kernel_vsyscall () No symbol table info available. #1 0xb7cd6eec in pthread_cond_timedwait@@GLIBC_2.3.2 () from /lib/tls/i686/cmov/libpthread.so.0 No symbol table info available. #2 0xb7eaa9e8 in _wapi_handle_ops_prewait () from /usr/lib/libmono.so.0 No symbol table info available. #3 0xb7eac8e3 in _wapi_handle_timedwait_signal_handle () from /usr/lib/libmono.so.0 No symbol table info available. #4 0xb7eac947 in _wapi_handle_wait_signal_handle () from /usr/lib/libmono.so.0 No symbol table info available. #5 0xb7eba3f7 in WaitForSingleObjectEx () from /usr/lib/libmono.so.0 No symbol table info available. #6 0xb7e6cdbd in ves_icall_System_Threading_Monitor_Monitor_wait () from /usr/lib/libmono.so.0 No symbol table info available. #7 0xb4047fc1 in ?? () No symbol table info available. #8 0x001b9330 in ?? () No symbol table info available. #9 0xffffffff in ?? () No symbol table info available. #10 0x087321b0 in ?? () No symbol table info available. #11 0x0874cc20 in ?? () No symbol table info available. #12 0x085de610 in ?? () No symbol table info available. #13 0xb7f372ec in ?? () from /usr/lib/libmono.so.0 No symbol table info available. #14 0x001b9330 in ?? () No symbol table info available. #15 0x00000001 in ?? () No symbol table info available. #16 0xb36db264 in ?? () No symbol table info available. #17 0xb4047f9c in ?? () No symbol table info available. #18 0xb36db27c in ?? () No symbol table info available. #19 0xb4047e9e in ?? () No symbol table info available. #20 0x001b9330 in ?? () No symbol table info available. #21 0xffffffff in ?? () No symbol table info available. #22 0x001b9360 in ?? () No symbol table info available. #23 0x0032b3c0 in ?? () No symbol table info available. #24 0xb36db2b8 in ?? () No symbol table info available. #25 0xb404824b in ?? () No symbol table info available. #26 0x001b9330 in ?? () No symbol table info available. #27 0x006db2f8 in ?? () No symbol table info available. #28 0x00000000 in ?? () No symbol table info available. Thread 2 (Thread -1336575056 (LWP 16626)): #0 0xffffe410 in __kernel_vsyscall () No symbol table info available. #1 0xb7cd6eec in pthread_cond_timedwait@@GLIBC_2.3.2 () from /lib/tls/i686/cmov/libpthread.so.0 No symbol table info available. #2 0xb7eaa9e8 in _wapi_handle_ops_prewait () from /usr/lib/libmono.so.0 No symbol table info available. #3 0xb7eac8e3 in _wapi_handle_timedwait_signal_handle () from /usr/lib/libmono.so.0 No symbol table info available. #4 0xb7eac947 in _wapi_handle_wait_signal_handle () from /usr/lib/libmono.so.0 No symbol table info available. #5 0xb7eba3f7 in WaitForSingleObjectEx () from /usr/lib/libmono.so.0 No symbol table info available. #6 0xb7e6cdbd in ves_icall_System_Threading_Monitor_Monitor_wait () from /usr/lib/libmono.so.0 No symbol table info available. #7 0xb4047fc1 in ?? () No symbol table info available. #8 0x003047b0 in ?? () No symbol table info available. #9 0xffffffff in ?? () No symbol table info available. #10 0x088ea060 in ?? () No symbol table info available. #11 0x088ea048 in ?? () No symbol table info available. #12 0x085de610 in ?? () No symbol table info available. #13 0xb7f372ec in ?? () from /usr/lib/libmono.so.0 No symbol table info available. #14 0x003047b0 in ?? () No symbol table info available. #15 0x00000001 in ?? () No symbol table info available. #16 0xb0557264 in ?? () No symbol table info available. #17 0xb4047f9c in ?? () No symbol table info available. #18 0xb055727c in ?? () No symbol table info available. #19 0xb4047e9e in ?? () No symbol table info available. #20 0x003047b0 in ?? () No symbol table info available. #21 0xffffffff in ?? () No symbol table info available. #22 0x003047e0 in ?? () No symbol table info available. #23 0x002e4910 in ?? () No symbol table info available. #24 0xb05572b8 in ?? () No symbol table info available. #25 0xb404824b in ?? () No symbol table info available. #26 0x003047b0 in ?? () No symbol table info available. #27 0x005572f8 in ?? () No symbol table info available. #28 0x00000000 in ?? () No symbol table info available. Thread 1 (Thread -1212724928 (LWP 16605)): #0 0xffffe410 in __kernel_vsyscall () No symbol table info available. #1 0xb7cda48b in __waitpid_nocancel () from /lib/tls/i686/cmov/libpthread.so.0 No symbol table info available. #2 0xb6d728e6 in libgnomeui_module_info_get () from /usr/lib/libgnomeui-2.so.0 No symbol table info available. #3 <signal handler called> No symbol table info available. #4 0xffffe410 in __kernel_vsyscall () No symbol table info available. #5 0xb7b9d9a1 in raise () from /lib/tls/i686/cmov/libc.so.6 No symbol table info available. #6 0xb7b9f2b9 in abort () from /lib/tls/i686/cmov/libc.so.6 No symbol table info available. #7 0xb7dfc47a in mono_handle_native_sigsegv () from /usr/lib/libmono.so.0 No symbol table info available. #8 0xb7dbe03e in mono_create_jump_trampoline () from /usr/lib/libmono.so.0 No symbol table info available. #9 <signal handler called> No symbol table info available. #10 0xb64e0293 in g_signal_get_invocation_hint () from /usr/lib/libgobject-2.0.so.0 No symbol table info available. #11 0xb3dd1305 in ?? () No symbol table info available. #12 0x08311a58 in ?? () No symbol table info available. #13 0x00000773 in ?? () No symbol table info available. #14 0xbfe6d478 in ?? () No symbol table info available. #15 0xbfe6da54 in ?? () No symbol table info available. #16 0x08067488 in ?? () No symbol table info available. #17 0x085eaed0 in ?? () No symbol table info available. #18 0x001e3000 in ?? () No symbol table info available. #19 0x00000773 in ?? () No symbol table info available. #20 0x00000000 in ?? () No symbol table info available. #0 0xffffe410 in __kernel_vsyscall ()
Attachment:
ImportXmpTags2.diff.gz
Description: GNU Zip compressed data