Crash on Undo of Break apart with Fill+Stroke Dialog open (rev >= 11614)

Bug #1449276 reported by Hachmann
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Inkscape
Invalid
High
Unassigned

Bug Description

Break apart an object with a gradient while gradient count is displayed in Fill&Stroke dialog, then try undo.

Steps to reproduce:
- Open attached file
- Open Fill+Stroke dialog
- Select object
- Path -> Break apart
- Undo
- Crash!
- Emergency saved svg is missing one of the segments created by break apart.

No crash when F+S dialog is not open.

Didn't find this mentioned in another bug report on my search for crash + gradient / crash + undo.
Inkscape 0.91 on LM17.1, 64bit

Revision history for this message
Hachmann (marenhachmann) wrote :
Revision history for this message
su_v (suv-lp) wrote :

Duplicate of (or at least related to) Bug #1417173 “Crash when undoing change to duplicated gradient”?
https://bugs.launchpad.net/inkscape/+bug/1417173

Revision history for this message
su_v (suv-lp) wrote :

Reproduced with Inkscape 0.91+devel r14063 on OS X 10.7.5

Changed in inkscape:
importance: Undecided → High
status: New → Confirmed
tags: added: crash gradient undo
Revision history for this message
su_v (suv-lp) wrote :

Nevermind the reference to bug ##1417173 - the crash reported here can be reproduced with r12050 too.

Revision history for this message
su_v (suv-lp) wrote :

Based on tests with archived builds on OS X 10.7.5:
- crash not reproduced with rev <= 11613,
- crash reproduced with rev >= 11614;
the regression seems to be a side-effect of
Revision 11614: Fix for bug #165865 : markers must take object's stroke color
http://bazaar.launchpad.net/~inkscape.dev/inkscape/trunk/revision/11614

summary: - Crash on Undo with Fill+Stroke Dialog open (Gradient, Break apart)
+ Crash on Undo with Fill+Stroke Dialog open (Gradient, Break apart)(rev
+ <= 11614)
tags: added: regression
Changed in inkscape:
milestone: none → 0.92
summary: Crash on Undo with Fill+Stroke Dialog open (Gradient, Break apart)(rev
- <= 11614)
+ >= 11614)
Revision history for this message
su_v (suv-lp) wrote : Re: Crash on Undo with Fill+Stroke Dialog open (Gradient, Break apart)(rev >= 11614)

Crash is not related to gradient (can be reproduced with attached file which uses flat fill color instead of gradient).

tags: added: markers
removed: gradient
Revision history for this message
su_v (suv-lp) wrote :

Triggers appear to be these properties in the path's style attribute:
       "marker-start:none;marker-mid:none;marker-end:none"

(no crash if removed, see attached version of the file)

Revision history for this message
su_v (suv-lp) wrote :

The style properties which seem to trigger the crash also play a role e.g. in bug #1372151 (where they may break 'redo' if fill&stroke is open).

Other reports related to markers and undo: bug #1198530, bug #1357805.

Revision history for this message
Hachmann (marenhachmann) wrote :

Thank you very much, ~suv, for investigating the issue!

su_v (suv-lp)
summary: - Crash on Undo with Fill+Stroke Dialog open (Gradient, Break apart)(rev
- >= 11614)
+ Crash on Undo of Break apart with Fill+Stroke Dialog open (rev >= 11614)
Revision history for this message
su_v (suv-lp) wrote :

Same workaround also effective to avoid crash reported in
* Bug #1424717 “Error when undoing a “cut path” operation”
  https://bugs.launchpad.net/inkscape/+bug/1424717

Revision history for this message
Brynn (brynn4inks-deactivatedaccount) wrote :

I can confirm this happens on Windows 7, 64-bit, sp1 and in Inkscape 0.91, 32-bit (exe installer) and 64-bit (7z version).

I can provide a test file if needed. Just let me know :-)

Thanks,
brynn

Revision history for this message
Mc (mc...) wrote :

the following patch works:

=== modified file 'src/widgets/stroke-style.cpp'
--- src/widgets/stroke-style.cpp 2016-03-08 01:23:26 +0000
+++ src/widgets/stroke-style.cpp 2016-06-16 12:54:36 +0000
@@ -1303,10 +1303,6 @@

             if (update) {
                 setMarkerColor(marker, combo->get_loc(), SP_ITEM(object));
-
- SPDocument *document = desktop->getDocument();
- DocumentUndo::done(document, SP_VERB_DIALOG_FILL_STROKE,
- _("Set marker color"));
             }

         } else {

any idea why these lines are there ? (iiuc, they sort of mean that the automatic setting of marker colors is individually undoable (?) (correct me if i'm wrong), even if it's in the middle of a larger operation).
Could people please test this patch, (this code was introduced in r11614 to fix https://bugs.launchpad.net/inkscape/+bug/165865 , so regressions would likely be related to marker colors [and/or Undo] )
If someone knows more than I do about the DocumentUndo::maybeDone stuff, maybe take a look there ?

jazzynico (jazzynico)
Changed in inkscape:
status: Confirmed → Triaged
Revision history for this message
jazzynico (jazzynico) wrote :

Regarding comment #12:
The patch removes the action in the Undo history dialog, but it's still possible to undo the markers color change with Ctrl+Z. Inkscape then adds an empty line in the Undo history, and shows the following messages:
----
** (inkscape.exe:3464): WARNING **: Incomplete undo transaction:
** (inkscape.exe:3464): WARNING **: Event: Set attribute style to "fill-rule:evenodd;stroke-width:0.625;stroke-linejoin:round;stroke:#000000;stroke-opacity:1;fill:#ff0000;fill-opacity:1" on #<Element:0x09568af0>
----

jazzynico (jazzynico)
Changed in inkscape:
milestone: 0.92 → 0.93
Revision history for this message
Jonathan Hofinger (jhofinger) wrote :

Replicated in Inkscape 0.92.4, not replicated in 1.1-dev (c990a67, 2020-04-09), Windows 10. There have been a lot of changes to the code in question, see https://gitlab.com/inkscape/inkscape/-/blame/master/src/widgets/stroke-style.cpp#L1317, so I'll assume it's fixed. There is also no message indicating an incomplete undo transaction. Please reopen on http://inkscape.org/report if the problem occurs again.

Closed by: https://gitlab.com/jhofinger

Changed in inkscape:
status: Triaged → Invalid
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.