event names corrupted after rename
Submitted by an unknown user
Assigned to cli..@..ba.org
Link to original bug (#718262)
Description
---- Reported by shotwell-maint@gnome.bugs 2011-09-28 17:47:00 -0700 ----
Original Redmine bug id: 4201
Original URL: http://redmine.yorba.org/issues/4201
Searchable id: yorba-bug-4201
Original author: Norbert Preining
Original description:
Hi all,
I regularly build shotwell from git, and today's build went awfully wrong. I built from commit bd0eea48 that includes the switch to valac-0.14 and removal of gconf stuff.
After building this version and starting all the events that have been renamed have no names or strange names, some with "thum...." some arbitrary Unicode letters.
Reverting to my build from 3 days ago from git abf4f3c2 made it work again.
All the best
Norbert
Related issues:
- related to shotwell - 4622: Corrupt event names when upgrading from database version ... (Fixed)
---- Additional Comments From shotwell-maint@gnome.bugs 2013-05-01 11:38:00 -0700 ----
History
Comment 1
Updated by Clinton Rogers about 2 years ago
- Priority changed from Normal to Urgent
Reproduces readily with the following steps:
- With a fresh build of master, import at least one photo with an embedded date and time.
- Rename the resulting event.
- Close Shotwell.
- Reopen Shotwell and carefully observe the event renamed in step two.
Comment 2
Updated by Jim Nelson about 2 years ago
- Category set to 4
- Target version set to 0.12
Comment 3
Updated by Jim Nelson about 2 years ago
- Assignee set to Clinton Rogers
Comment 4
Updated by Adam Dingle about 2 years ago
- Subject changed from Current git status is broken - most events loose their names to event names corrupted after rename
Comment 5
Updated by Clinton Rogers about 2 years ago
After a considerable amount of digging and discussion with Jim, I believe the problem may lie in one of the .vapi files upon which we rely (Jim has suggested GTK+3). Reasons:
- Occasionally (1/10) I get a double free or munmap_chunk invalid pointer crash by navigating about the app, then renaming an event.
- Event.vala has not changed recently.
- I have thoroughly examined the code, and neither Event.name, Event.raw_name, nor EventRow.name are ever manually getting reset (except as part of event loading, event creation or if we rename an event).
Currently examining the generated C code to see if I can spot the source of the corruption.
Comment 6
Updated by Clinton Rogers about 2 years ago
At least
self->priv->raw_name
, corresponding to the Vala variable Event.raw_name, is getting set to null somewhere along the way, but being returned for use as if it's still valid...
Comment 7
Updated by Clinton Rogers about 2 years ago
I got it to crash while renaming an event with GDB attached; here's the message and backtrace:
-
-
- glibc detected * * * /home/clinton/Desktop/cleanroom/shotwell: free(): invalid pointer: 0xabe150e8 * * *
#0 0x00130416 in __kernel_vsyscall () #1 (moved) 0x00ebcc8f in __GI_raise (sig=6) at ../nptl/sysdeps/unix/sysv/linux/raise.c:64 #2 (closed) 0x00ec02b5 in __GI_abort () at abort.c:92 #3 0x00ef2dfc in __libc_message (do_abort=2, fmt=0xfcc080 "*** glibc detected *** %s: %s: 0x%s ***\n") at ../sysdeps/unix/sysv/linux/libc_fatal.c:189 #4 (closed) 0x00efdbc2 in malloc_printerr (action=
<optimized out>
, str=<optimized out>
, ptr=0xabe150e8) at malloc.c:6283 #5 0x00efe862 in _int_free (av=0x1008400, p=0xabe150e0) at malloc.c:4795 #6 (closed) 0x00f0194d in __GI___libc_free (mem=0xabe150e8) at malloc.c:3738 #7 (closed) 0x00c72c1b in ?? () from /lib/i386-linux-gnu/libglib-2.0.so.0 #8 (closed) 0x00c72ef6 in g_free () from /lib/i386-linux-gnu/libglib-2.0.so.0 #9 (closed) 0x082ac8ba in event_rename (self=0xaa606c90, name=0x892f700 "cheese!") at /home/clinton/Desktop/cleanroom/src/Event.vala:743 #10 (closed) 0x082bda0a in rename_event_command_real_execute_on_source (base=0x87b6b80, source=0xaa606c90) at /home/clinton/Desktop/cleanroom/src/Commands.vala:617 #11 (closed) 0x082b8806 in simple_proxyable_command_execute_on_source (self=0x87b6b80, source=0xaa606c90) at /home/clinton/Desktop/cleanroom/src/Commands.vala:149 #12 (closed) 0x082b886c in simple_proxyable_command_real_execute (base=0x87b6b80) at /home/clinton/Desktop/cleanroom/src/Commands.vala:146 #13 0x082b43be in command_execute (self=0x87b6b80) at /home/clinton/Desktop/cleanroom/src/CommandManager.vala:46 #14 0x082b5458 in command_manager_execute (self=0x86d7b40, command=0x87b6b80) at /home/clinton/Desktop/cleanroom/src/CommandManager.vala:120 #15 (closed) 0x0818b902 in events_event_entry_real_rename (base=0x86bec28, new_name=0x87b2c18 "cheese!") at /home/clinton/Desktop/cleanroom/src/events/Branch.vala:501 #16 0x0817c66a in sidebar_renameable_entry_rename (self=0x86bec28, new_name=0x87b2c18 "cheese!") at /home/clinton/Desktop/cleanroom/src/sidebar/Entry.vala:55 #17 (closed) 0x0817ed1b in sidebar_tree_on_editing_done (self=0x86e4198) at /home/clinton/Desktop/cleanroom/src/sidebar/Tree.vala:1137 #18 (closed) _sidebar_tree_on_editing_done_gtk_cell_editable_editing_done (_sender=0x895c048, self=0x86e4198) at /home/clinton/Desktop/cleanroom/src/sidebar/Tree.vala:1117 #19 (closed) 0x00bdd14c in g_cclosure_marshal_VOID__VOID () from /usr/lib/i386-linux-gnu/libgobject-2.0.so.0 #20 0x00bdbc3c in g_closure_invoke () from /usr/lib/i386-linux-gnu/libgobject-2.0.so.0 #21 0x00bee9f0 in ?? () from /usr/lib/i386-linux-gnu/libgobject-2.0.so.0 #22 (closed) 0x00bf7787 in g_signal_emit_valist () from /usr/lib/i386-linux-gnu/libgobject-2.0.so.0 #23 0x00bf7a7f in g_signal_emit_by_name () from /usr/lib/i386-linux-gnu/libgobject-2.0.so.0 #24 0x004e4e32 in gtk_cell_editable_editing_done () from /usr/lib/libgtk-3.so.0 #25 (closed) 0x0051b4f2 in ?? () from /usr/lib/libgtk-3.so.0 #26 (closed) 0x00bdd14c in g_cclosure_marshal_VOID__VOID () from /usr/lib/i386-linux-gnu/libgobject-2.0.so.0 #27 0x00bdbc3c in g_closure_invoke () from /usr/lib/i386-linux-gnu/libgobject-2.0.so.0 #28 (closed) 0x00bee9f0 in ?? () from /usr/lib/i386-linux-gnu/libgobject-2.0.so.0 #29 (closed) 0x00bf6ed5 in g_signal_emitv () from /usr/lib/i386-linux-gnu/libgobject-2.0.so.0 #30 0x004c2ba7 in ?? () from /usr/lib/libgtk-3.so.0 #31 0x004c31bb in ?? () from /usr/lib/libgtk-3.so.0 #32 (closed) 0x004c332d in ?? () from /usr/lib/libgtk-3.so.0 #33 0x004c466b in gtk_bindings_activate_event () from /usr/lib/libgtk-3.so.0 #34 (closed) 0x006f4b33 in ?? () from /usr/lib/libgtk-3.so.0 #35 0x0052999f in ?? () from /usr/lib/libgtk-3.so.0 #36 (closed) 0x005a71a2 in ?? () from /usr/lib/libgtk-3.so.0 #37 (closed) 0x00bda68d in ?? () from /usr/lib/i386-linux-gnu/libgobject-2.0.so.0 #38 (closed) 0x00bdbb66 in g_closure_invoke () from /usr/lib/i386-linux-gnu/libgobject-2.0.so.0 #39 0x00bee838 in ?? () from /usr/lib/i386-linux-gnu/libgobject-2.0.so.0 #40 0x00bf7599 in g_signal_emit_valist () from /usr/lib/i386-linux-gnu/libgobject-2.0.so.0 #41 (closed) 0x00bf7a7f in g_signal_emit_by_name () from /usr/lib/i386-linux-gnu/libgobject-2.0.so.0 #42 (closed) 0x081d6da0 in page_window_real_key_press_event (base=0x86b4010, event=0xbfffeba0) at /home/clinton/Desktop/cleanroom/src/AppWindow.vala:354 #43 0x0812f974 in library_window_real_key_press_event (base=0x86b4010, event=0x86df920) at /home/clinton/Desktop/cleanroom/src/library/LibraryWindow.vala:1565 #44 (closed) 0x005a71a2 in ?? () from /usr/lib/libgtk-3.so.0 #45 (closed) 0x00bda68d in ?? () from /usr/lib/i386-linux-gnu/libgobject-2.0.so.0 #46 0x00bdbc3c in g_closure_invoke () from /usr/lib/i386-linux-gnu/libgobject-2.0.so.0 #47 (closed) 0x00bee838 in ?? () from /usr/lib/i386-linux-gnu/libgobject-2.0.so.0 #48 (closed) 0x00bf7599 in g_signal_emit_valist () from /usr/lib/i386-linux-gnu/libgobject-2.0.so.0 #49 (closed) 0x00bf78f3 in g_signal_emit () from /usr/lib/i386-linux-gnu/libgobject-2.0.so.0 #50 0x006f73a3 in ?? () from /usr/lib/libgtk-3.so.0 #51 (closed) 0x005a699c in gtk_propagate_event () from /usr/lib/libgtk-3.so.0 #52 0x005a6d48 in gtk_main_do_event () from /usr/lib/libgtk-3.so.0 #53 (closed) 0x008eb13c in ?? () from /usr/lib/libgdk-3.so.0 #54 0x00912ec8 in ?? () from /usr/lib/libgdk-3.so.0 #55 (closed) 0x00c6c25f in g_main_context_dispatch () from /lib/i386-linux-gnu/libglib-2.0.so.0 #56 (closed) 0x00c6c990 in ?? () from /lib/i386-linux-gnu/libglib-2.0.so.0 #57 0x00c6cf9b in g_main_loop_run () from /lib/i386-linux-gnu/libglib-2.0.so.0 #58 (closed) 0x005a5f95 in gtk_main () from /usr/lib/libgtk-3.so.0 #59 (closed) 0x083130a6 in application_start (self=0x85354b0) at /home/clinton/Desktop/cleanroom/src/Application.vala:44 #60 (closed) 0x081d456d in library_exec (mounts=0x84fb6b0, mounts_length1=0) at /home/clinton/Desktop/cleanroom/src/main.vala:226 #61 0x081d5c57 in _vala_main (args=0xbffff354, args_length1=1) at /home/clinton/Desktop/cleanroom/src/main.vala:445 #62 0x080ae848 in main (argc=1, argv=0xbffff354) at /home/clinton/Desktop/cleanroom/src/main.vala:358 -
Comment 8
Updated by Clinton Rogers about 2 years ago
- File 4201.diff added
- Status changed from Open to Review
Possible Valac bug, am seeing the addresses of two strings overlap when they shouldn't (to wit: we got a shallow copy when we were expecting a deep one) when modifying a string coming from a struct passed to a method.
Bug report filed on GNOME's Bugzilla page; please see https://bugzilla.gnome.org/show_bug.cgi?id=661041 for details.
In the meantime, it's possible to work around this by either manually duplicating the strings in question, or by making the struct 'EventRow' be a class instead; per discussion with Adam, am taking the latter approach.
Comment 9
Updated by Clinton Rogers about 2 years ago
Improved patch submitted via email - per meeting, it changes structs with strings in them to classes.
Comment 10
Updated by Clinton Rogers about 2 years ago
Many thanks for Norbert for the initial find.
Comment 11
Updated by Clinton Rogers about 2 years ago
- Status changed from Review to 5
- Resolution set to fixed
Comment 12
Updated by Charles Lindsay 7 months ago
- Status changed from 5 to Fixed
--- Bug imported by chaz@yorba.org 2013-11-25 21:56 UTC ---
This bug was previously known as bug 4201 at http://redmine.yorba.org/show_bug.cgi?id=4201 Imported an attachment (id=262283)
Unknown Component Using default product and component set in Parameters Unknown milestone "unknown in product shotwell. Setting to default milestone for this product, "---". Setting qa contact to the default for this product. This bug either had no qa contact or an invalid one.
Version: 0.12
Resolution: RESOLVED FIXED