[Win32] Crashes when working with imported bitmaps

Bug #414413 reported by Ola Lindberg on 2009-08-16
36
This bug affects 6 people
Affects Status Importance Assigned to Milestone
Inkscape
High
Unassigned

Bug Description

I'm working with a 40 JPGs collage. Each JPG is about 6 MPIX / 2 MB in. The problem I'm having is that Inkscape (pre 0.47 from 10 Aug) crashes frequently. I'm on Vista, with a Wacom and the --no-wintab startup option. Not running Inkscape as Admin.

I haven't found out what causes the crashes yet but I think it has something to do with drag n dropping images.

Are there any logging I can enable to enhance this bug report?

Alvin Penner (apenner) wrote :

you can try using the program inkscapec.exe to trap any error messages using the method outlined at :
http://kaioa.com/node/63

- this will involve running inkscapec.exe from a DOS prompt.
- does the crash occur during a paste operation, or later?

Ola Lindberg (olalindberg) wrote :

Thanks a lot! I'll give that a try next time I work on my collage.

Is there any way to redirect the output to a text file instead of the console? I tried to use > but it didn't work.

tags: added: bitmap crash importing
jazzynico (jazzynico) wrote :

Hi Ola,

Could you please try to reproduce this bug with the latest Inkscape version (http://www.inkscape.org/download/) and confirm you're still affected?
Thanks!

Changed in inkscape:
importance: Undecided → High
tags: added: win32
Ola Lindberg (olalindberg) wrote :

Well. Actually it is much worse now. I cannot even import 10 images before it crashes.

su_v (suv-lp) wrote :

@Ola - Can you try capturing the console messages when Inkscape 0.48 crashes using the method outlined at <http://kaioa.com/node/63>?

Ola Lindberg (olalindberg) wrote :

I downloaded the latest stable version (just to be sure) as well as the latest development build (8 sept 2010). I unzipped them and copied the inkscapec.exe file to each folder. I ran inkscapec.exe. I added my images by dragging 10 images at the time from Explorer to Inkscape.

First i tried to select embed (logs called -embed.txt)
Both versions stopped working at around 1GB memory usage. Read from Task Manager, Memory (Private Working Set).

Then i tried to select link (log called -link.txt).
I only did this with the development version. It worked better with link and I got fewer log errors.
Out of 40 images it failed with 2. It showed a "Failed to load requested file" dialog (see screenshot). To be sure there wasn't a problem with the 2 images that failed I restarted Inkscape and loaded that 2 images separately. They worked fine.

Ola Lindberg (olalindberg) wrote :

More log files

Ola Lindberg (olalindberg) wrote :

More log files

Ola Lindberg (olalindberg) wrote :

A dialog sceenshot

Ola Lindberg (olalindberg) wrote :

Hope it helps. Tell me if you need any more.
I'll be offline for some weeks but if needed I'll try again when I'm back.

Ola Lindberg (olalindberg) wrote :

I'll try to attach the 40 images I try to put in a collage. The zip file is 80 mb so I'm not sure if it is possible to attach.

su_v (suv-lp) wrote :

> Then i tried to select link (log called -link.txt).
> I only did this with the development version.
> It worked better with link and I got fewer log errors.

Possibly related to memory leak with embedded images described in bug #597689 “Memory leak when showing/hiding embedded images.”?

su_v (suv-lp) wrote :

1) import and embed all images from the zip archive

> First i tried to select embed (logs called -embed.txt)
> Both versions stopped working at around 1GB memory usage.
> Read from Task Manager, Memory (Private Working Set).

I stopped trying to reproduce the crash after embedding 16 images, resulting in a 150 MB sized SVG file. Inkscape 0.48+devel r9762 on Mac OS X 10.5.8 produces the same repeated console messages:
** (inkscape-bin:45289): WARNING **: GC Warning: Repeated allocation of very large block (appr. size 11063296):
 May lead to memory leak and poor performance.
but no crash, and after saving and relaunching Inkscape it reopened the SVG file (16 embedding JPG images) without crash. Since my system only has a total of 2 GB RAM, the test causes a lot of memory paging and nearly freezes the system and other applications.

Personally I tend to think that Inkscape - as a vector editor - isn't optimized to handle so much embedded raster data (embedding 40 JPEG images with a total size of over 72 MB on disk) - maybe applications like raster image editors are better suited for this task when combining all images in original size and quality into one big file is required?

2) import and link all images from the zip archive

> Then i tried to select link (log called -link.txt).
> I only did this with the development version. It
> worked better with link and I got fewer log errors.
> Out of 40 images it failed with 2.

Works without issues in Inkscape 0.48 and 0.48+devel r9762 on Mac OS X 10.5.8: no errors or warnings reported in the console when importing and linking the files, though memory consumption is still high, and no warnings when loading the SVG with the collage (though that takes some seconds).

For testing see attached SVG file with relative links to all JPG files in the image archive (put the SVG file inside the images directory to allow Inkscape to find all linked files).

su_v (suv-lp) wrote :

Screenshot Inkscape 0.48+devel r9762 on Mac OS X 10.5.8:
loaded and rendered all 40 linked bitmap images (JPGs).

Kris (kris-degussem) wrote :

Encountered a crash when embedding the 15th image.
Some weird pointer issue seems to be present.
The best way to prevent errors in the long term would be the conversion of the relevant code in sp-image.cpp to a c++ class. I fail to do this because of the mechanism used elsewhere in the program to check which object type one is editing (sp_image_get_type via G_TYPE_CHECK_CLASS_TYPE).

Kris (kris-degussem) on 2012-10-08
Changed in inkscape:
status: New → Confirmed
strife (strife) wrote :

Crashes randomly when import images, sometimes it works and sometimes not. usually about 50%.
Assuming this is the same bug, using latest trunk. Attaching the gdb log.

To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Duplicates of this bug

Other bug subscribers