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 595627 - 1.9.12: segfault when changing the text of a sheet object
1.9.12: segfault when changing the text of a sheet object
Status: RESOLVED FIXED
Product: Gnumeric
Classification: Applications
Component: Sheet Objects
1.9.x
Other Linux
: Immediate critical
: ---
Assigned To: Jody Goldberg
Jody Goldberg
Depends on:
Blocks:
 
 
Reported: 2009-09-18 20:40 UTC by Albert Graef
Modified: 2009-09-19 10:42 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
gdb backtrace (1.47 KB, text/plain)
2009-09-18 21:32 UTC, Albert Graef
Details
button pixmap for the toolbar, with transparency (216 bytes, image/png)
2009-09-19 10:42 UTC, Albert Graef
Details
radiobutton pixmap for the toolbar, with transparency (264 bytes, image/png)
2009-09-19 10:42 UTC, Albert Graef
Details

Description Albert Graef 2009-09-18 20:40:23 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.
Comment 1 Morten Welinder 2009-09-18 20:57:29 UTC
I don't see the backtrace and things appear to work for me.
Comment 2 Albert Graef 2009-09-18 21:32:30 UTC
Created attachment 143470 [details]
gdb backtrace
Comment 3 Albert Graef 2009-09-18 21:35:10 UTC
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;
Comment 4 Morten Welinder 2009-09-18 22:33:36 UTC
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.
Comment 5 Albert Graef 2009-09-18 23:20:15 UTC
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.
Comment 6 Morten Welinder 2009-09-18 23:25:59 UTC
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.
Comment 7 Jean Bréfort 2009-09-19 05:35:27 UTC
I can't reproduce either. Seems it has been fixed.
Comment 8 Albert Graef 2009-09-19 06:23:34 UTC
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?
Comment 9 Jean Bréfort 2009-09-19 08:33:53 UTC
I just renamed it.
Comment 10 Jean Bréfort 2009-09-19 08:49:28 UTC
Fixed in git. Thanks a lot for reporting. Don' hesitate to file new bugs reports when you find any.
Comment 11 Albert Graef 2009-09-19 09:34:24 UTC
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?
Comment 12 Jean Bréfort 2009-09-19 09:54:42 UTC
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).
Comment 13 Albert Graef 2009-09-19 10:40:33 UTC
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.
Comment 14 Albert Graef 2009-09-19 10:42:04 UTC
Created attachment 143485 [details]
button pixmap for the toolbar, with transparency
Comment 15 Albert Graef 2009-09-19 10:42:58 UTC
Created attachment 143486 [details]
radiobutton pixmap for the toolbar, with transparency