trunk: crash on ungroup (selection contains group and a clone of the group) (rev >= 12532)

Bug #1239452 reported by su_v on 2013-10-13
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Inkscape
High
jazzynico

Bug Description

Steps to reproduce:
1) launch current trunk (default prefs, default new doc, locale: en_US.UTF-8)
2) draw a rectangle
3) group it ('Ctrl+G')
4) clone the group ('Alt+D')
5) select all ('Ctrl+A')
6) ungroup ('Ctrl+U')

Expected result:
The group in the selection is ungrouped, the clone is unlinked (because the original disappears) i.e. replaced with a copy of the original group

Actual result:
Program received signal EXC_BAD_ACCESS, Could not access memory.
Reason: KERN_INVALID_ADDRESS at address: 0x0000000000000000
0x0000000100270691 in sp_selection_ungroup (selection=0x10d81cb40, desktop=0x10d81dc00) at selection-chemistry.cpp:794
794 if (strcmp(group->getRepr()->name(), "svg:g") && strcmp(group->getRepr()->name(), "svg:switch") &&

Confirmed with r12586 on OS X 10.7.5.

Based on tests with archived builds:
- not reproduced with rev <= 12531,
- reproduced with rev >= 12532,
the regression is related to the merge of the C++ification branch in revision 12532:
<http://bazaar.launchpad.net/~inkscape.dev/inkscape/trunk/revision/12532>

su_v (suv-lp) wrote :
Changed in inkscape:
importance: Undecided → High
description: updated
summary: - trunk: crash on ungroup (selection has group and a clone of the group)
- (rev >= 12532)
+ trunk: crash on ungroup (selection contains group and a clone of the
+ group) (rev >= 12532)
Kris (kris-degussem) wrote :

Does this fix the issue? (just had a quick look, can not check for now)
Or does it give problems with the undo?

su_v (suv-lp) wrote :

Kris wrote:
> Does this fix the issue?

No - same crash.

jazzynico (jazzynico) wrote :

Confirmed on Windows XP, Inkscape trunk revision 12686.

Kris> Does this fix the issue?
~suv> No - same crash.

Confirmed.

Changed in inkscape:
status: New → Triaged
jazzynico (jazzynico) wrote :

New patch attached, tested successfully on Windows XP with r12688.

su_v (suv-lp) wrote :

Patch '1239452-UnselectGroupCrash.diff' tested successfully with r12791 on OS X 10.7.5
(minor caveat: the build used for testing has several other patches applied)

@Markus - could you review the second patch?

Markus Engel (engelmarkus) wrote :

I'm wondering why this happens now but didn't in revs < 12532. Anyway, the patch looks okay :) .

su_v (suv-lp) on 2013-10-15
Changed in inkscape:
assignee: nobody → jazzynico (jazzynico)
status: Triaged → In Progress
jazzynico (jazzynico) wrote :

Fix committed revision 12692.
Thanks for the tests!

Changed in inkscape:
milestone: 0.49 → none
status: In Progress → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers