GNOME Bugzilla – Bug 321714
Copying a graph leaves gnumeric in an unstable state
Last modified: 2006-10-10 10:42:24 UTC
Open a file with a graph or create one, even an empty one, then select the graph and type Ctrl-C and Ctrl-Q. In the best case, you get one or several (seems as many as seiries): ** (gnumeric:1885): CRITICAL **: dependent_unlink: assertion `IS_SHEET (dep->sheet)' failed Also, I have an excel file for which I get a crash on exit, but only if it is open from the recent files list !!! I attach the file. The stack trace is:
+ Trace 64102
The crash seems to affect only HEAD, not gnumeric-1.6.1, but the critical affects both.
Created attachment 54873 [details] the files for which I get a crash I do not remember if I generated this file using excel or gnumeric. It was when I worked on the #318610 patch
I could also reproduce the bug doing the following: -open gnumeric -open the graph guru -immediatly insert -Ctrl-C and then Ctrl-Q The problem comes from the fact that the graph in the clipboard depends on the sheet. If the sheet is destroyed, finalizing the GnmGOData is unsafe. Seems related to the changes I made to graph.c :-(
More thinking. The problem is that the dep->flags does not indicate that the reference goes outside of the sheet (and even outside of the workbook). So when the sheet is destroyed, handle_outgoing_references does not unlink it.
seems like we must add DEPENDENT_GOES_INTERBOOK | DEPENDENT_GOES_INTERSHEET to dst_dep->flags in gnm_go_data_dup when copying to the clipboard. This must probably be implemented in sheet-object-graph.c (it is not difficult). Should I proceed?
With 1.6.1. RC1 the problem seems to be fixed. Well done!
It is not fixed at all, unfortunately. It would be nice if bugs were fixed without any action from developers ;-)
Here's the crash recipe from 323762, which probably is the same bug. Same behaviour in 1.6.1 and HEAD: New gnumeric. Open sample spreadsheet from gnumeric web page. Mark graph. Copy. File/New. Close sample spreadsheet. File/Paste in the remaining window. Result: Segfault
*** Bug 323762 has been marked as a duplicate of this bug. ***
Here's the stacktrace from 323762:
+ Trace 64540
Recipe from comment #7 still crashes HEAD.
The original issue is solved. The "duplicate" bug 323762 is still a crasher. Closing this report and reopening 323762.