trunk: crash on paste from clipboard, and on file import (rev >= 13299)

Bug #1312120 reported by su_v
12
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Inkscape
Fix Released
High
Tavmjong Bah

Bug Description

Current trunk crashes when pasting an object from the clipboard, or when importing an SVG file.

Steps to reproduce:
1) launch latest trunk (default new prefs, default new doc)
2) draw a rectangle
3) copy it (Ctrl+C)
4) paste it (Ctrl+V)

Expected result:
The copied object is pasted at the current pointer position.

Actual result:
Crash on paste.

Program received signal EXC_BAD_ACCESS, Could not access memory.
Reason: KERN_INVALID_ADDRESS at address: 0x0000000214e0d070
0x00000001008a7080 in SPIPaint::isPaintserver (this=0x214e0d048) at style-internal.h:494
494 bool isPaintserver() const {return (value.href) ? value.href->getObject():0;}

On OS X 10.7.5:
- not reproduced with rev <= 13297
- reproduced with r13299, r13301
(the crash occurs with X11- and with Quartz-backend of GTK+).

Revision history for this message
su_v (suv-lp) wrote :
su_v (suv-lp)
summary: - trunk: crash on paste (rev >= 13299)
+ trunk: crash on paste and SVG import (rev >= 13299)
description: updated
description: updated
su_v (suv-lp)
summary: - trunk: crash on paste and SVG import (rev >= 13299)
+ trunk: crash on paste from clipboard, and on SVG import (rev >= 13299)
Revision history for this message
su_v (suv-lp) wrote : Re: trunk: crash on paste from clipboard, and on SVG import (rev >= 13299)

Likely also affects import from openclipart (can't verify myself due to bug #943148).

Revision history for this message
jazzynico (jazzynico) wrote :

Also reproduced on Crunchbang Waldorf, Inkscape trunk revision 13301.

> Likely also affects import from openclipart

Confirmed.

Changed in inkscape:
importance: Undecided → High
status: New → Triaged
Revision history for this message
jazzynico (jazzynico) wrote :
Revision history for this message
su_v (suv-lp) wrote :

Also affects import of bitmap images (via 'File > Import' or drag&drop onto canvas), and other file formats (e.g. PDF).

summary: - trunk: crash on paste from clipboard, and on SVG import (rev >= 13299)
+ trunk: crash on paste from clipboard, and on file import (rev >= 13299)
Revision history for this message
Shlomi Fish (shlomif-gmail) wrote :

This is a patch that appears to fix the bug for me. The problem was that SPIPaint_properties and SPIPaint_members were not synchronised.

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

Patch tested successfully with r13301 on OS X 10.7.5

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

@Tav - any chance you could review and commit the patch for this regression if ok?

Revision history for this message
Tavmjong Bah (tavmjong-free) wrote :

Committed (13302) with an additional line commented out. Thanks Shlomi.

The 'color' attribute can only hold a color value and not a paint value (e.g. pattern) per SVG1.1/CSS2.1

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

@Shlomi and @Tav - thx a lot for the quick fix!

Changed in inkscape:
assignee: nobody → Tavmjong Bah (tavmjong-free)
milestone: 0.91 → none
status: Triaged → Fix Released
Revision history for this message
su_v (suv-lp) wrote :

@Tav - any chance could you review another proposed patch related to the recent changes for SPStyle, to address overzealous warnings from clang about mismatched tags (struct or class)?
<https://bugs.launchpad.net/inkscape/+bug/1232425> comment #13

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.