On 2013-09-14 05:48 +0200, Krzysztof KosiĆski wrote:
The fix is committed as r12516.
One of the recent commits (12512-12516) related to GdkPixbuf / Cairo surface results in crashes when working with SVG files which contain links to "missing" bitmap images.
In my tests on Ubuntu 12.04 and 13.04 (VM, 64bit), inkscape (trunk PPA r12526) crashes immediately when trying to open a test file with a missing image; on OS X 10.7.5, the behavior is more erratic: files sometimes open fine, and crash on selection, or when applying extensions or on quit. Same was reported for recent Windows builds [*].
If the test file can be opened without crash, the placeholder graphic for the missing image is no longer displayed (the one which says 'Linked Image not found'). The missing image (or its placeholder) renders as fully transparent rectangle, but is nevertheless directly selectable with a single LMB click.
Testing with archived builds on OS X 10.7.5: - not reproduced with r12511, - reproduced with r12517 and later builds.
I tested by importing several multi-megabyte JPEG photos. The file size indicates that they are imported as JPEG. Similarly, the PDF export is much smaller than previously, because the photos are not re-saved as PNG.
This work is somewhat related to the SAX parser work which remains to be done. If we migrate to a SAX parser, we can avoid storing base64-encoded copies of the data in the XML tree - we can decode them on the fly and store only the binary data, which we could pass directly to cairo_image_surface_set_mime_data(). A similar mechanism could be gradually introduced for other attributes which could benefit from alternate forms of storage, such as CSS and ID references.
[*] See comments #11-#13 in https://bugs.launchpad.net/inkscape/+bug/1161003