GNOME Bugzilla – Bug 159365
Crash when undoing
Last modified: 2004-12-22 21:47:04 UTC
Open the attached file. Move the selected block to top left. Undo (Ctrl-Z) -> crash. Program received signal SIGSEGV, Segmentation fault.
+ Trace 52609
Thread 1088615936 (LWP 17652)
Created attachment 34102 [details] test file
<jody> emmanuel_afk: this exposes a rather serious conflict between Dependent and SheetObject <jody> We do not ref count dependents <jody> The crash is exposed by some overzealous sheet object removal <jody> The minor bug is that we remove objects if thier topleft cell is in a changed region <jody> the major bug is that if a sheet object contains a dependent that changes as a result <jody> we point directly at the dependent <jody> with no way of knowing that the SheetObject containing it has been deleted <jody> I'll attempt to patch around it by finishing undo support for sheet objects deleted by cut-paste and ins/del col/row <jody> which should by us time <jody> but I suspect that we may need to add _ref/_unref methods to Dependent <jody> So that the unrelocate lists can add refs to the containing chart somehow
Created attachment 34126 [details] [review] Keep refs to objects removed This patch doesn't solve to core problem but it avoids it at a higher level and we needed to do it anyway. It keeps refs to objects being removed by pasting a cut, or ins/del col/row. since the objects continue to exist, we don't end up with dependent pointers to non-existent GObjects. On a related note we may want to relax the selection sheet objects to remove when pasting a cut. It currently uses the top left cell as the test.
I've self reviewed and realized that my change to restoring the objects to the sheet before unrelocating the expressions removed the need for the dependent.c patch. We'll likely need at least part of that eventually, but for now I'll leave it off.
*** Bug 156583 has been marked as a duplicate of this bug. ***