[Tweak tool] crash in sp_cursor_bitmap_and_mask_from_xpm() when selecting "Attract (Repel)" mode

Bug #668261 reported by su_v
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Inkscape
Fix Released
High
Krzysztof Kosinski

Bug Description

Inkscape 0.48+devel r9862 on OS X 10.5.8:
Regression: Inkscape crashes when clicking on the 'Attract (Repel)' mode icon on the tweak tool controls bar.

Steps to reproduce:
1) open new document
2) switch to the tweak tool (with or without a path selected)
3) click on the button 'Attract parts of paths towards the cursor'

-> Inkscape crashes.

The regression seems to have been introduced between r9737 and r9743, possibly caused by the new code for the color preview in the cursor in r9743.

tested with archived local builds: 9737 ok, 9743 crash
no console messages, crash report attached

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

Note: does not affect the 0.48.x branch.

su_v (suv-lp)
summary: - [Tweak tool] crash when selecting "Attract (Repel)" mode
+ [Tweak tool] crash in sp_cursor_bitmap_and_mask_from_xpm() when
+ selecting "Attract (Repel)" mode
Revision history for this message
su_v (suv-lp) wrote :

@Jasper - subscribing you here: could you take a look if this crash is caused by revision 9743 for the color preview in the cursor symbols?

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

patch to fix corrupt cursor icons (incorrect number of colors in two cursor icons for the tweak tool)

tested with Inkscape 0.48+devel r9862 on OS X 10.5.8: Inkscape no longer crashes when selecting 'Attract (Repel)' mode

Revision history for this message
jazzynico (jazzynico) wrote :

Bug confirmed on Ubuntu 10.04.
Fix tested successfully.

Changed in inkscape:
status: New → In Progress
Revision history for this message
Jaspervdg (jaspervdg) wrote :

Great to see this already fixed!

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

@Jasper - would it make sense to add some error checking in the code that reads from xpm so that Inkscape doesn't crash when there is a small error in the xpm source?

I can't code C++ myself and I only figured out the above fix by chance -- because Inkscape showed small errors when displaying on-canvas the two xpm files from the source tree (linked as images) while previewing and testing bug #614500.

Revision history for this message
Jaspervdg (jaspervdg) wrote :

I guess it would make sense to add some error checking, but in this case it's not that trivial (I think), at least not to make it so that it outputs something sensible (other than a message that something is wrong with the xpm). If I find some time I'll have a look if it can be made a bit more robust (could take a couple of months).

Revision history for this message
Krzysztof Kosinski (tweenk) wrote :

Applied in trunk 9912 / branch 9729

Changed in inkscape:
assignee: nobody → Krzysztof Kosinski (tweenk)
milestone: none → 0.48.1
status: In Progress → Fix Committed
jazzynico (jazzynico)
Changed in inkscape:
status: Fix Committed → Fix Released
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.