GNOME Bugzilla – Bug 595627
1.9.12: segfault when changing the text of a sheet object
Last modified: 2009-09-19 10:42:58 UTC
To reproduce: - Start Gnumeric. - Insert (e.g.) a checkbox from the object toolbar. - Right-click to get the context menu. - Delete -> after a little while: gnumeric segfaults. gdb backtrace attached.
I don't see the backtrace and things appear to work for me.
Created attachment 143470 [details] gdb backtrace
Well, I seem to recall that I attached it, but I'm getting older. ;-) I just tried again. Maybe it's because I use some pretty old GTK+ version (GTK+ 2.14.4 on SUSE 11.1). I investigated this some more. The segfault happens in enter_notify_cb (line 34 in goc-widget.c). Apparently the event passed there (after the object was deleted), points to an item which has already lost its parent (the item pointer seems all right but item->base.parent is NULL. If I check for that and bail out if the parent pointer is NULL then everything seems to work fine. That is: item->base.canvas->cur_event = (GdkEvent *) event; if (item->base.parent) return GOC_ITEM_GET_CLASS (item->base.parent)->enter_notify (GOC_ITEM (item->base.parent), (event->x + item->x) / item->base.canvas->pixels_per_unit + item->base.canvas->scroll_x1, (event->y + item->y) / item->base.canvas->pixels_per_unit + item->base.canvas->scroll_y1); else return FALSE;
Ok, thanks. I'm on opensuse 11.1 too so the gtk+ version is unlikely to be the problem. We can fixed a number of this kind of problems in the canvas over the past few days. That is more likely the reason I don't get a crash. Nevertheless, I'll see if we need to bullet proof something there.
Well, I did try the latest from http://git.gnome.org/{gnumeric,goffice,libgsf} earlier today, but that was totally unusable for me; I got segfaults in Gnumeric even when I only wanted to edit a cell. :( Guess I'll try that again tomorrow.
Hmm.. That's not good. I did fix one such bug yesterday but that was pretty early in the day (EST): http://git.gnome.org/cgit/gnumeric/commit/?id=aa5a619bb1c7d6fdbaf8fe111209c58cc6c8a3f5 Another obvious reason for crashes is if you end up with two different copies of goffice. git gnumeric really, really wants git goffice.
I can't reproduce either. Seems it has been fixed.
Yes, the latest from git works for me now, too. I still have various other problems with the GUI elements, though (most notably, segfaults when I try to change the labels of frames and checkboxes). Should I just post these here, or should I file a new bug report?
I just renamed it.
Fixed in git. Thanks a lot for reporting. Don' hesitate to file new bugs reports when you find any.
Did you fix up all the GUI objects yet? I found that the property callbacks all assume that the realized_item elements are GocItems, but they are GocGroups. Also, I need to get the labels and (non-checkbox) button widgets working. Where do I enable them so that they show up on the object toolbar?
I searched for all accesses to the embedded widget and fixed everything I found, including #595648. Hopefully I did not forget anything this time. For simple labels and buttons, we need to add them to the toolbar. Until now, they were only imported from foreign formats (excel at least).
Never mind, I found the xml file where I can enable them. Now I just need to figure out how to add some useful properties to the button and radiobutton widgets. BTW, the button and radiobutton pixmaps lack transparency. I'm attaching some suitable replacements. Another minor quibble is that the current selection in the combobox and list widgets aren't initialized to their linked cell value when opening a spreadheet. I'll try to figure out how to fix that myself.
Created attachment 143485 [details] button pixmap for the toolbar, with transparency
Created attachment 143486 [details] radiobutton pixmap for the toolbar, with transparency