Inkscape crashes on bitmap update (rev >= 13002)

Bug #1278571 reported by Dani Epstein on 2014-02-10
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Krzysztof Kosinski

Bug Description

When editing a bitmap that is linked in an Inkscape document in an external editor, upon returning to Inkscape it will crash.

Version: 0.48+devel r

Steps to reproduce the crash:

Create a new Inkscape document
Drag an image onto the page.
Open the image in GIMP or similar

jazzynico (jazzynico) wrote :

Marking duplicate of Bug #167390 "Crash on imported image update (during Gimp save)". Don't hesitate to revert the duplicate status if you it's a different issue.

tags: added: bitmap crash
Dani Epstein (planetzargon) wrote :

This is a completely different issue.

This is not down to a partial write of a large file, but occurs even with a really small file as well, that is linked in on the page, and after the save has completed.

Saving a linked file (that has been edited in GIMP, for example) will crash Inkscape even after returning several minutes later, since as it updates it crashes.

su_v (suv-lp) wrote :

Based on tests with archived trunk builds on OS X 10.7.5:
- works as expected with rev <= 12226
- fails to update if linked image was changed on disk with rev >= 12227/12228
- works again as expected with rev >= 12599
- crashes if linked image was changed on disk with rev >= 13002

Full backtrace with r13020 attached.

tags: added: regression
Changed in inkscape:
importance: Undecided → High
milestone: none → 0.91
status: New → Confirmed
summary: - Inkscape crashes on bitmap update
+ Inkscape crashes on bitmap update (rev >= 13002)
Markus Engel (engelmarkus) wrote :

From sp-image.cpp:361 on, the ctx passed in as a parameter is used:
SPItemCtx *ictx = (SPItemCtx *) ctx;

The problem here is that sp_image_refresh_if_outdated explicitly sets the ctx to null in lines 840-842. I'm not sure, though, where we could get a valid ctx from.

Krzysztof Kosinski (tweenk) wrote :

sp_image_refresh_if_outdated() was incorrectly calling the update function directly, whereas the correct thing to do is to just mark the image for update with the SP_IMAGE_HREF_MODIFIED flag.

Fixed in r13117.

Changed in inkscape:
status: Confirmed → Won't Fix
status: Won't Fix → Fix Committed
assignee: nobody → Krzysztof Kosinski (tweenk)
Changed in inkscape:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers