crash on save as .ps or eps and convert filtereffects to bitmap

Bug #273767 reported by theAdib
2
Affects Status Importance Assigned to Milestone
Inkscape
Fix Released
High
theAdib

Bug Description

When I export the file filters.svg to eps or ps (using the cairo exporter) Inkscape chrashes.
You have to switch on: filtereffects to bitmap (I have 90DPI)

Inkscape consumes a lot of memory and run out of new memspace.

Backtrace:
Starting program: /usr/local/bin/inkscape
[Thread debugging using libthread_db enabled]
[New Thread 0xb69ca720 (LWP 9989)]

GLib-ERROR **: /build/buildd/glib2.0-2.16.4/glib/gmem.c:136: failed to allocate 1970604772 bytes
aborting...

Program received signal SIGABRT, Aborted.
[Switching to Thread 0xb69ca720 (LWP 9989)]
0xb7f3e410 in __kernel_vsyscall ()
(gdb) bt
#0 0xb7f3e410 in __kernel_vsyscall ()
#1 0xb6bea085 in raise () from /lib/tls/i686/cmov/libc.so.6
#2 0xb6beba01 in abort () from /lib/tls/i686/cmov/libc.so.6
#3 0xb73c41fa in g_logv () from /usr/lib/libglib-2.0.so.0
#4 0xb73c4239 in g_log () from /usr/lib/libglib-2.0.so.0
#5 0xb73c2e07 in g_malloc () from /usr/lib/libglib-2.0.so.0
#6 0x086c67fc in sp_generate_internal_bitmap (doc=0x8b93ea0, x0=91.25, y0=107.5,
    x1=83202.5, y1=18955, width=83111, height=18847, xdpi=90, ydpi=90,
    bgcolor=4294967040, items_only=0xbbac758) at helper/pixbuf-ops.cpp:142
#7 0x085e307d in sp_item_invoke_render (item=0xa5e9130, ctx=0xbf46768)
    at extension/internal/cairo-renderer.cpp:496
#8 0x085e39ca in Inkscape::Extension::Internal::CairoRenderer::renderItem (
    this=0xbbca638, ctx=0xbf46768, item=0xa5e9130)
    at extension/internal/cairo-renderer.cpp:623
#9 0x085e3c40 in sp_group_render (item=<value optimized out>, ctx=0xbf46768)
    at extension/internal/cairo-renderer.cpp:275
#10 0x085e2c17 in sp_item_invoke_render (item=0x8fdadb0, ctx=0xbf46768)
    at extension/internal/cairo-renderer.cpp:388
#11 0x085e39ca in Inkscape::Extension::Internal::CairoRenderer::renderItem (
    this=0xbbca638, ctx=0xbf46768, item=0x8fdadb0)
    at extension/internal/cairo-renderer.cpp:623
#12 0x085e3c40 in sp_group_render (item=<value optimized out>, ctx=0xbf46768)
    at extension/internal/cairo-renderer.cpp:275
#13 0x085e2c53 in sp_item_invoke_render (item=0xa5e95b0, ctx=0xbf46768)
    at extension/internal/cairo-renderer.cpp:563
#14 0x085e39ca in Inkscape::Extension::Internal::CairoRenderer::renderItem (

Revision history for this message
theAdib (theadib) wrote :
Revision history for this message
Alvin Penner (apenner) wrote :

running Win32 nightly build from Sept 16, I get the attached crash message :

Changed in inkscape:
status: New → Confirmed
Revision history for this message
Thomas Hicks (hicks-kingtom) wrote :

Th problem seems to stem form the fact that the svg file has two <svg> elements in it, and inkscape gets confused while working out the bounding box of the objects in the inner svg element

- correct bounding box if inner test case is removed form the file and tested separately
-correct bounding box if inner <svg></svg> elements are removed or replaced with <g> (although the size changes)

-problem remains if the filter effect is removed but made worse by filter effect dimensions (problems with interacting with viewbox???)

Revision history for this message
Alvin Penner (apenner) wrote :

just confirming that in Inkscape this file contains a box whose width is reported as 83121.75 px and height is 18884.25 px.

theAdib (theadib)
Changed in inkscape:
importance: Undecided → High
Revision history for this message
theAdib (theadib) wrote :

I commited a patch in svn rev 21327 that Inkscape does not crash any more.
Adib.

tags: added: crash
Revision history for this message
theAdib (theadib) wrote :

Still crashing on Ubuntu 9.04
when I use 300 dpi it calculates=277037 and height=62825 times 4byte results in 69619398100. This number is larger than 2^32=4294967296.
So we need to test here for possible range overflow.
patch #1 will check for possible overflow?field.comment=Still crashing on Ubuntu 9.04
when I use 300 dpi it calculates=277037 and height=62825 times 4byte results in 69619398100. This number is larger than 2^32=4294967296.
So we need to test here for possible range overflow.
patch #1 will check for possible overflow

Changed in inkscape:
status: Confirmed → In Progress
assignee: nobody → theAdib (theadib)
Revision history for this message
theAdib (theadib) wrote :

attached patch (in addition to #6) calculates the bbox for absolute filtercoordinates. Now it renders the picture almost ok.

Revision history for this message
theAdib (theadib) wrote :

attached the pdf that shows how patch #7 works.

still to go: when I select the filtered element the bounding box shows somewhere else. Now on the top left corner.

Revision history for this message
ScislaC (scislac) wrote :

Fix committed in 22391. I am closing this report Adib, please commit your other work when trunk opens back up to general development again.

Changed in inkscape:
status: In Progress → Fix Released
Revision history for this message
theAdib (theadib) wrote :

as the issue is marked as released further development continues on this one : https://bugs.launchpad.net/inkscape/+bug/273767

Revision history for this message
su_v (suv-lp) wrote :
tags: added: cairo exporting filters-svg
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.