GDI object leak in Pango hangs Inkscape after some time

Bug #221712 reported by Scribblette
148
This bug affects 18 people
Affects Status Importance Assigned to Milestone
Inkscape
Fix Released
High
Krzysztof Kosinski
Inkscape Devlibs
Fix Released
High
Krzysztof Kosinski

Bug Description

Inkscape simply disappears. No crash report, no warnings, no back up save.

Seems to be mostly random, occuring most often while using the pen tool to move nodes in a path. Chances of occuring appear to increase the longer it's been since you last saved.

Running InkCL through Command Prompt provides the following errors that pop up at crash, further detail in following posts (below the "how do I do this?" queries).

In summary, the errors look like this:

C:\Program Files\Inkscape>inkcl
return code: -1073741819
** (inkscape.exe:3144): CRITICAL **: SPObject* sp_object_unref(SPObject*, SPObject*): assertion `object != NULL' failed
** (inkscape.exe:3144): CRITICAL **: SPObject* sp_object_unref(SPObject*, SPObject*): assertion `object != NULL' failed
** (inkscape.exe:3144): CRITICAL **: SPCurve* sp_curve_new_from_foreign_bpath(const NArtBpath*): assertion `new_bpath != NULL' failed
** (inkscape.exe:3144): CRITICAL **: SPObject* sp_object_unref(SPObject*, SPObject*): assertion `object != NULL' failed

That is followed by the following two lines, which repeat a dozen times.
(inkscape.exe:3144): Gdk-WARNING **: gdkgc-win32.c:823: SaveDC failed: Not enough storage is available to process this command.
(inkscape.exe:3144): Gdk-WARNING **: gdkgc-win32.c:963: RestoreDC failed: The parameter is incorrect.

It ends with this:
(inkscape.exe:3144): Gdk-WARNING **: gdkpixmap-win32.c:302: CreateDIBSection failed: The parameter is incorrect.
(inkscape.exe:3144): Gdk-WARNING **: gdkpixmap-win32.c:114: DeleteObject failed: The parameter is incorrect.
(inkscape.exe:3144): Gdk-CRITICAL **: _gdk_drawable_ref_cairo_surface: assertion `GDK_IS_DRAWABLE (drawable)' failed
(inkscape.exe:3144): Gdk-WARNING **: gdkgc-win32.c:823: SaveDC failed: Not enough storage is available to process this command.
(inkscape.exe:3144): Gdk-WARNING **: gdkgc-win32.c:963: RestoreDC failed: The parameter is incorrect.
(inkscape.exe:3144): Gdk-WARNING **: gdkwindow-win32.c:2123: CopyCursor failed: The operation completed successfully.
(inkscape.exe:3144): Gdk-WARNING **: gdkpixmap-win32.c:302: CreateDIBSection failed: The parameter is incorrect.
(inkscape.exe:3144): Gdk-WARNING **: gdkpixmap-win32.c:114: DeleteObject failed: The parameter is incorrect.
(inkscape.exe:3144): Gdk-CRITICAL **: _gdk_drawable_ref_cairo_surface: assertion `GDK_IS_DRAWABLE (drawable)' failed

The second recorded crash skipped the first four lines and replaced the number by the inkscape.exe with 3080.
The third recorded crash was truncated for length as I was resizing several objects at the time it happened.

I'm using the latest stable - 0.46, April 1st 2008 - on an M200 Toshiba Portege Tablet PC, 1.5gb RAM, Windows XP Pro SP2 (Tablet Edition), with all the latest updates except for the newer versions of the .net framework. No spyware, no viruses, no excess crap running. 5 gigabytes of hard drive space free, video card is laptop default Nvidia Geforce 5200 FX 32M/64M.

Tags: crash win32

Related branches

Revision history for this message
Rygle (rygle) wrote :

Hi Scribblette. Thanks for filing a bug and trying to improve Inkscape, but we really do need some information to work off if there is to be any chance of us fixing a bug. It is good that you included your operating system and Inkscape version, but repeatable steps are very important.

Helpful bug reports can take time to figure out, and it takes persistence to repeat actions until you can narrow it down to a few steps in particular. Sometimes a particular file on your computer will do it, and you need to remove objects from the page until you get the simplest test case possible that still makes it crash.

Changed in inkscape:
status: New → Incomplete
Revision history for this message
Rygle (rygle) wrote :

Scribblette, I've decided to close this bug as it is very non-descript. Please open a subsequent bug if you have more information in the future. Thanks. Rygle.

Changed in inkscape:
status: Incomplete → Invalid
Revision history for this message
Scribblette (gallantsquirrel) wrote :

Sure thing, I understand that. I'm not quite sure how to track it, though (beyond fiddling further until I find the steps to reproduce this) - having uninstalled the newest Wacom Penabled Tablet PC drivers (PenTablet_505-7.exe) I'm yet to experience the random disappearing act again. I don't suppose there's a way to get it to pause on crashing, or... hm. I reported in the hope that it'd already been reported and I just hadn't found the thread, but as is of course I have to get more information.

Incidentally, is there an auto-save function, or does Inkscape auto-save in the event of a crash? Is this disappearing act the way it crashes normally, or does it usually come up with an error message on crash? I haven't found any files that look like saves in the main Inkscape folder to see if it auto-saves.

Revision history for this message
Scribblette (gallantsquirrel) wrote :

Unfortunately this bug has continued to pose a problem, and it continues to be random. As I most often use the pen tool, I find it most often occurs while I'm pulling on the nodes to shape lines. Inkscape doesn't increase in memory usage before crashing... there are no indications and there's no way I've yet found to reliably reproduce this. The software that can be used to track the bug - can that be left running nonstop without chewing up memory or hard drive space, so I can chase it down?

There must be some way I can identify what's causing this or freeze it at the time of crash, surely?

I'm using a Toshiba M200 Portege with all the official drivers, no spyware, no viruses, and no excess crap running in Task Manager, with Inkscape 0.46 and Windows XP Tablet edition with all the latest updates except for .Net 2 and 3.

Changed in inkscape:
status: Invalid → Incomplete
Revision history for this message
Rygle (rygle) wrote :

Scribblette. Here are two things you can try to debug Inkscape.

Method 1: Use Inkcl to see if you get any errors reported via dos;
1. Download the inkcl.bat file from this page - http://kaioa.com/node/42
2. put in the same directory as the inkscape executable
3. open a dos/command window there - I use the Windows powertoys "dos prompt here"
4. type inkcl to run inkscape
5. when the crash happens, look for a message at the dos prompt

Method 2: Use gdb to see if you can get any error reports from glib;
(don't think this will work for yours, since it seems to be doing a hard crash/instantly gone, but here's the steps)
1. Download the debug files for Inkscape 0.46 Win32 from here - http://downloads.sourceforge.net/inkscape/inkscape-0.46.win32.debug.7z
2. Place the files inkscape.dbg and gdb.exe inside the Inkscape folder
3. Open a command window [Start Menu -> Run -> command (enter)] and move to the Inkscape directory
4. type the following
     ..> gdb (enter)
     (gdb) file inkscape.exe inkscape.dbg (enter)
     (gdb) run {filename optional} (enter)
5. For me, the debugger will always get part way and then give an error about xml. If that happens for you, type;
     (gdb) continue (enter)
6. This will start Inkscape, but the normal open command will not work to open files, as it will hang. You must use the import command instead.
7. Repeat the steps to produce the crash/problem
8. Go to the command window and type;
     {error message of some sort}
     (gdb) bt
9. This will now give some more information, a backtrace of the memory at the time of the crash. You will need to highlight the text in the command window and then right click once to copy. Then paste this into this bug report. Note: If unable to copy, right click on the icon at the top left hand of the command window, then select 'Properties', and then under the 'Options' tab tick 'Quick Edit Mode'. You should now be able to copy from or paste to the command window using the right mouse button.

Hope that helps. For more on debugging, see here - http://wiki.inkscape.org/wiki/index.php/DebuggingTips

Revision history for this message
Scribblette (gallantsquirrel) wrote :

Thanks! I'm running it via the command prompt and inkcl and I'm prepared for the crash now. Problem is that frequent saving out of caution seems to put off the crash... *laughs* so I'm still waiting!

And thanks a bundle for the detailed guide there, it's less daunting than what I'd read so far on how to spot and report bugs.

Revision history for this message
Scribblette (gallantsquirrel) wrote :
Download full text (3.9 KiB)

Ha! I got it! Thanks to the Method 1 instructions you supplied, after working for a good few hours this time - I was exhausted and wanted to knock off, but had to get the bug to happen first... it certainly seems related to how long it's been since I last saved.

Maybe a memory leak of sorts?

System specs:
1.5gigs of RAM, I'm using a Toshiba M200 Portege with all the official drivers, no spyware, no viruses, and no excess crap running in Task Manager, with Inkscape 0.46 and Windows XP Tablet edition with all the latest updates except for .Net 2 and 3.

C:\Program Files\Inkscape>inkcl
return code: -1073741819

** (inkscape.exe:3144): CRITICAL **: SPObject* sp_object_unref(SPObject*, SPObject*): assertion `object != NULL' failed

** (inkscape.exe:3144): CRITICAL **: SPObject* sp_object_unref(SPObject*, SPObject*): assertion `object != NULL' failed

** (inkscape.exe:3144): CRITICAL **: SPCurve* sp_curve_new_from_foreign_bpath(const NArtBpath*): assertion `new_bpath != NULL' failed

** (inkscape.exe:3144): CRITICAL **: SPObject* sp_object_unref(SPObject*, SPObject*): assertion `object != NULL' failed

(inkscape.exe:3144): Gdk-WARNING **: gdkgc-win32.c:823: SaveDC failed: Not enough storage is available to process this command.

(inkscape.exe:3144): Gdk-WARNING **: gdkgc-win32.c:963: RestoreDC failed: The parameter is incorrect.

(inkscape.exe:3144): Gdk-WARNING **: gdkgc-win32.c:823: SaveDC failed: Not enough storage is available to process this command.

(inkscape.exe:3144): Gdk-WARNING **: gdkgc-win32.c:963: RestoreDC failed: The parameter is incorrect.

(inkscape.exe:3144): Gdk-WARNING **: gdkgc-win32.c:823: SaveDC failed: Not enough storage is available to process this command.

(inkscape.exe:3144): Gdk-WARNING **: gdkgc-win32.c:963: RestoreDC failed: The parameter is incorrect.

(inkscape.exe:3144): Gdk-WARNING **: gdkgc-win32.c:823: SaveDC failed: Not enough storage is available to process this command.

(inkscape.exe:3144): Gdk-WARNING **: gdkgc-win32.c:963: RestoreDC failed: The parameter is incorrect.

(inkscape.exe:3144): Gdk-WARNING **: gdkgc-win32.c:823: SaveDC failed: Not enough storage is available to process this command.

(inkscape.exe:3144): Gdk-WARNING **: gdkgc-win32.c:963: RestoreDC failed: The parameter is incorrect.

(inkscape.exe:3144): Gdk-WARNING **: gdkgc-win32.c:823: SaveDC failed: Not enough storage is available to process this command.

(inkscape.exe:3144): Gdk-WARNING **: gdkgc-win32.c:963: RestoreDC failed: The parameter is incorrect.

(inkscape.exe:3144): Gdk-WARNING **: gdkgc-win32.c:823: SaveDC failed: Not enough storage is available to process this command.

(inkscape.exe:3144): Gdk-WARNING **: gdkgc-win32.c:963: RestoreDC failed: The parameter is incorrect.

(inkscape.exe:3144): Gdk-WARNING **: gdkgc-win32.c:823: SaveDC failed: Not enough storage is available to process this command.

(inkscape.exe:3144): Gdk-WARNING **: gdkgc-win32.c:963: RestoreDC failed: The parameter is incorrect.

(inkscape.exe:3144): Gdk-WARNING **: gdkpixmap-win32.c:302: CreateDIBSection failed: The parameter is incorrect.

(inkscape.exe:3144): Gdk-WARNING **: gdkpixmap-win32.c:114: DeleteObject failed: The parameter is incorrect.

(in...

Read more...

Revision history for this message
Rygle (rygle) wrote :

Setting to high priority due to crash. Really need more information if possible. Has anyone else had similar problems?

Changed in inkscape:
importance: Undecided → High
status: Incomplete → Triaged
Revision history for this message
Scribblette (gallantsquirrel) wrote :

If there's any way I can provide more information on this, let me know. I don't know if DirectX reports etc are relevant... thought perhaps not. I don't know what the error report means, really - except for the 'storage' thing, which might indicate RAM or HD space. I still have a good five gigs of space free and a fixed 1.5gig swap file.

Not one for technical jargon - all the compiling and programming jargon scares the bejeebus outta me.

Is it worth trying the second method you listed, or would that just return the information I already provided - or not work at all since it's a disappearing crash as you thought?

Have been using SVG files at time of crashes, one file and its backup are all I've been using. I'll try using another, brand new file today, for other work, and see if it happens.

Rather difficult to track down given it can take anywhere from a half hour to several hours before it happens!

I did notice that the memory being eaten up kept on increasing. Starts off happily at 75mb, but (and only as I'm working) it slowly creeps up. 150, 240, and eventually 450 MB of RAM or thereabouts were being consumed. Minimizing Inkscape lowered memory used down to a couple megs, but restoring it had it bump back up quickly enough. It really seems like saving delays the crash... it was only once there was a fair gap since my last save that it crashed again. It had only been using 450 MB shortly before that.

Revision history for this message
Rygle (rygle) wrote : Re: [Bug 221712] Re: the random Disappearing crash

Scribblette wrote:
> If there's any way I can provide more information on this, let me know.
> I don't know if DirectX reports etc are relevant... thought perhaps not.
Not really relevant, as they aren't specific to this code.

> I don't know what the error report means, really
Me either, just trying to help you diagnose it well, so someone else who
does know can step up.

> Not one for technical jargon - all the compiling and programming jargon
> scares the bejeebus outta me.
It's really quite hard to damage anything. I've tried to make all the
steps here on a "for dummies" level, firstly because I'm only a few
steps ahead of you, and second because I want to give people an easy leg
up. You're on a steep learning curve, but it does get easier.

If you can do the Inkcl thing, then the gdb thing (the second method) is
only a little harder. If you can get some results there, it will
generally be much better. My hunch is that you won't get results because
of the nature of the crash, but it just may help, and you'll have gained
valuable experience. I was exactly where you are less than two months
ago and just had to push through a few confidence barriers.

As I said, it's pretty hard to damage anything with Inkscape crashes and
gdb. All the Inkscape stuff is quite independent of the Windows core
operating system files. The only file I've *ever* seen corrupted after
probably about 100 crashes is the Inkscape settings file, which again
doesn't affect anything but Inkscape, and even then it just goes back to
defaults, and you delete it and it remakes it.

Give it a go, ask questions and take one step at a time. You've already
started, so keep going.

I will try to improve the debugging page on the wiki today. Had it
pretty good last night, but hadn't saved and then my beta version of
Firefox crashed and I lost it, but it's mostly still here in this bug
report.

> Have been using SVG files at time of crashes, one file and its backup
> are all I've been using. I'll try using another, brand new file today,
> for other work, and see if it happens.

Probably good to try a new file to see if it crashes then, but it could
be related to the contents of the files you've mentioned.

Instead of trying to minimise the chances of it crashing, try and
maximise the chances and figure out how to most easily make it crash. A
pattern, a series of steps, a file where you reduce the number of
objects/elements bit by bit until it stops crashing, and then you go
back one step to see what was removed and you might have your cause.

Revision history for this message
Scribblette (gallantsquirrel) wrote : Re: the random Disappearing crash
Download full text (3.6 KiB)

Okay, I've narrowed it down. Length of time since last save has a definitive impact. Lay out many pen tool shapes and sit there fiddling with anchors and looking for mapping perfection, do not save (saving seems to reset the time before next crash)... and that's about as close as it gets! Can't really narrow it down because it can take several hours before it happens.

I'm really repeating the same actions over and over, though - pen tool, draw nodes, pull anchors on nodes, repeat.

This is despite the fact I'm using a new document for this crash. I copied the penned outlines I've been working on over, that was all.

And here's the log. Note the subtle differences between this log and the last one.

C:\Program Files\Inkscape>inkCL
return code: -1073741819

(inkscape.exe:3080): Gdk-WARNING **: gdkgc-win32.c:823: SaveDC failed: Not enough storage is available to process this command.

(inkscape.exe:3080): Gdk-WARNING **: gdkgc-win32.c:963: RestoreDC failed: The parameter is incorrect.

(inkscape.exe:3080): Gdk-WARNING **: gdkgc-win32.c:823: SaveDC failed: Not enough storage is available to process this command.

(inkscape.exe:3080): Gdk-WARNING **: gdkgc-win32.c:963: RestoreDC failed: The parameter is incorrect.

(inkscape.exe:3080): Gdk-WARNING **: gdkgc-win32.c:823: SaveDC failed: Not enough storage is available to process this command.

(inkscape.exe:3080): Gdk-WARNING **: gdkgc-win32.c:963: RestoreDC failed: The parameter is incorrect.

(inkscape.exe:3080): Gdk-WARNING **: gdkgc-win32.c:823: SaveDC failed: Not enough storage is available to process this command.

(inkscape.exe:3080): Gdk-WARNING **: gdkgc-win32.c:963: RestoreDC failed: The parameter is incorrect.

(inkscape.exe:3080): Gdk-WARNING **: gdkgc-win32.c:823: SaveDC failed: Not enough storage is available to process this command.

(inkscape.exe:3080): Gdk-WARNING **: gdkgc-win32.c:963: RestoreDC failed: The parameter is incorrect.

(inkscape.exe:3080): Gdk-WARNING **: gdkgc-win32.c:823: SaveDC failed: Not enough storage is available to process this command.

(inkscape.exe:3080): Gdk-WARNING **: gdkgc-win32.c:963: RestoreDC failed: The parameter is incorrect.

(inkscape.exe:3080): Gdk-WARNING **: gdkgc-win32.c:823: SaveDC failed: Not enough storage is available to process this command.

(inkscape.exe:3080): Gdk-WARNING **: gdkgc-win32.c:963: RestoreDC failed: The parameter is incorrect.

(inkscape.exe:3080): Gdk-WARNING **: gdkgc-win32.c:823: SaveDC failed: Not enough storage is available to process this command.

(inkscape.exe:3080): Gdk-WARNING **: gdkgc-win32.c:963: RestoreDC failed: The parameter is incorrect.

(inkscape.exe:3080): Gdk-WARNING **: gdkpixmap-win32.c:302: CreateDIBSection failed: The parameter is incorrect.

(inkscape.exe:3080): Gdk-WARNING **: gdkpixmap-win32.c:114: DeleteObject failed: The parameter is incorrect.

(inkscape.exe:3080): Gdk-CRITICAL **: _gdk_drawable_ref_cairo_surface: assertion `GDK_IS_DRAWABLE (drawable)' failed

(inkscape.exe:3080): Gdk-WARNING **: gdkgc-win32.c:823: SaveDC failed: Not enough storage is available to process this command.

(inkscape.exe:3080): Gdk-WARNING **: gdkgc-win32.c:963: RestoreDC failed: The parameter is incorrect.

(in...

Read more...

Revision history for this message
Scribblette (gallantsquirrel) wrote :
Download full text (13.2 KiB)

Just went nuts on me again. The first half (and then some!) of this error report was cut off in the command prompt window because it overflowed several times. It's the same sort of disappearing act.

I had only just saved, had selected several pathed objects, resized them with the arrow handles and was setting the line pixel width to 1 pixel when it crashed.

None of the errors this far have been repeatable. I've tried repeating the exact same motions preceding a crash (easy enough when you're only working with lines) and it simply won't happen.

[most of message truncated by command prompt, this is what remained]

(inkscape.exe:3456): Gdk-WARNING **: gdkgc-win32.c:823: SaveDC failed: Not enough storage is available to process this command.

(inkscape.exe:3456): Gdk-WARNING **: gdkdrawable-win32.c:1665: CreateRectRgn failed: Not enough storage is available to process this command.

(inkscape.exe:3456): Gdk-WARNING **: gdkdrawable-win32.c:1782: CreateCompatibleDC failed: Not enough storage is available to process this command.

(inkscape.exe:3456): Gdk-WARNING **: gdkgc-win32.c:963: RestoreDC failed: The parameter is incorrect.

(inkscape.exe:3456): Gdk-WARNING **: gdkgc-win32.c:823: SaveDC failed: Not enough storage is available to process this command.

(inkscape.exe:3456): Gdk-WARNING **: gdkdrawable-win32.c:1665: CreateRectRgn failed: Not enough storage is available to process this command.

(inkscape.exe:3456): Gdk-WARNING **: gdkdrawable-win32.c:1782: CreateCompatibleDC failed: Not enough storage is available to process this command.

(inkscape.exe:3456): Gdk-WARNING **: gdkgc-win32.c:963: RestoreDC failed: The parameter is incorrect.

(inkscape.exe:3456): Gdk-WARNING **: gdkgc-win32.c:823: SaveDC failed: Not enough storage is available to process this command.

(inkscape.exe:3456): Gdk-WARNING **: gdkdrawable-win32.c:1665: CreateRectRgn failed: Not enough storage is available to process this command.

(inkscape.exe:3456): Gdk-WARNING **: gdkdrawable-win32.c:1782: CreateCompatibleDC failed: Not enough storage is available to process this command.

(inkscape.exe:3456): Gdk-WARNING **: gdkgc-win32.c:963: RestoreDC failed: The parameter is incorrect.

(inkscape.exe:3456): Gdk-WARNING **: gdkgc-win32.c:823: SaveDC failed: Not enough storage is available to process this command.

(inkscape.exe:3456): Gdk-WARNING **: gdkdrawable-win32.c:1665: CreateRectRgn failed: Not enough storage is available to process this command.

(inkscape.exe:3456): Gdk-WARNING **: gdkdrawable-win32.c:1782: CreateCompatibleDC failed: Not enough storage is available to process this command.

(inkscape.exe:3456): Gdk-WARNING **: gdkgc-win32.c:963: RestoreDC failed: The parameter is incorrect.

(inkscape.exe:3456): Gdk-WARNING **: gdkgc-win32.c:823: SaveDC failed: Not enough storage is available to process this command.

(inkscape.exe:3456): Gdk-WARNING **: gdkdrawable-win32.c:1665: CreateRectRgn failed: Not enough storage is available to process this command.

(inkscape.exe:3456): Gdk-WARNING **: gdkdrawable-win32.c:1782: CreateCompatibleDC failed: Not enough storage is available to process this command.

(inkscape.exe:3456): Gdk-WARNING **: gdkgc-win32.c:963: RestoreDC...

description: updated
Revision history for this message
Scribblette (gallantsquirrel) wrote : Re: Inkscape's Vanishing Act (the disappearing program) - updated

Following error from a brief fiddle with Inkscape today. I don't know if it bears relevance so I'm including it here. I was doing the same I always do - placing nodes, pushing and pulling lines into shapes, and as usual the redraw/refresh was slow.

C:\PROGRA~1\Inkscape>inkcl

(inkscape.exe:4000): Gtk-CRITICAL **: gtk_widget_queue_resize: assertion `GTK_IS_WIDGET (widget)' failed

(inkscape.exe:4000): Gtk-CRITICAL **: gtk_widget_queue_resize: assertion `GTK_IS_WIDGET (widget)' failed

** (inkscape.exe:4000): CRITICAL **: SPObject* sp_object_unref(SPObject*, SPObject*): assertion `object != NULL' failed

C:\PROGRA~1\Inkscape>

Revision history for this message
Scribblette (gallantsquirrel) wrote :

There any way to tell if any of the programmers have seen this description and know whether the error reports have been sufficient to find the relevant bug?

description: updated
Revision history for this message
EarlyBlake (pam4water) wrote :

This is probably just FYI at this point, but I have this problem also in 0.46.

Early on in a drawing when I'm just ruffing stuff out. (All I have at this point is a bunch of black 1 point curves with no fill.) Inkscape will crash quite often when I'm moving the nodes or when I'm moving the handles. As I get more paths fill gradients etc inkscape will crash less often. I don't know if it because I'd editing faster early on in a drawing. Or adding fills to paths stabilizes inkscape somehow. :? Or because later on in a drawing I'm moving nodes and and handle by smaller distances.

I hadn't thought about the time between saves. I save fairly often though. I got screen shots but I don't think they will help much at this point.

I'm running windows home vista premium. I don't get the full poof crash though. I get the inkscape not responding window with the close option. Occasionally it will hang and I have to CTR ALT DEL it away. I think I like the poof crash option better. Kind of time saving.

FYI: The automatic saves have never worked for me no matter what crashes inkscape.

Revision history for this message
Diederik van Lierop (mail-diedenrezi) wrote :

Is this problem still present when using a recent nightly builds? I've never noticed warnings like this before.

Revision history for this message
Jan M (cymiu) wrote :

I'm running Inkscape 0.47pre1 on Windows XP. Inkscape still occasionally disappears (crashes) when node sculpting using the node tool, though it happens a lot less often now than it did in 0.46. I also notice that it happens less often after deleting the application data/inkscape/preferences.xml file and starting on a clean config. Anyhow, I managed to capture a backtrace of the crash. Hope it helps!

Relevant system specs:
Windows XP Pro 32-bit SP3 English (latest patches applied), 4 GB RAM (3.2 GB usable), ATi Radeon X1900 graphics
Wacom Intuos3 A4 (9x12), driver version 6.1.1-3 (latest)
Inkscape 0.47pre1

C:\Program Files\inkscape>gdb inkscape
GNU gdb 6.8
Copyright (C) 2008 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law. Type "show copying"
and "show warranty" for details.
This GDB was configured as "i686-pc-mingw32"...
(no debugging symbols found)
(gdb) symbol-file inkscape.dbg
Reading symbols from C:\Program Files\inkscape/inkscape.dbg...done.
(gdb) run D:\art\wscover\charge3.svg
Starting program: C:\Program Files\inkscape/inkscape.exe D:\art\wscover\charge3.
svg
[New thread 216.0x99c]

Program received signal SIGSEGV, Segmentation fault.
0x68de8b90 in cairo_surface_set_device_offset ()
   from C:\Program Files\inkscape\libcairo-2.dll
(gdb) bt
#0 0x68de8b90 in cairo_surface_set_device_offset ()
   from C:\Program Files\inkscape\libcairo-2.dll
#1 0x6c35ba87 in gdk_window_begin_paint_region ()
   from C:\Program Files\inkscape\libgdk-win32-2.0-0.dll
#2 0x6185f9ad in gtk_main_do_event ()
   from C:\Program Files\inkscape\libgtk-win32-2.0-0.dll
#3 0x6c35c933 in gdk_window_process_updates_internal ()
   from C:\Program Files\inkscape\libgdk-win32-2.0-0.dll
#4 0x6c35ca78 in gdk_window_process_all_updates ()
   from C:\Program Files\inkscape\libgdk-win32-2.0-0.dll
#5 0x617d57d9 in gtk_container_idle_sizer ()
   from C:\Program Files\inkscape\libgtk-win32-2.0-0.dll
#6 0x6c341808 in gdk_threads_dispatch ()
   from C:\Program Files\inkscape\libgdk-win32-2.0-0.dll
#7 0x685e73d7 in g_main_context_dispatch ()
   from C:\Program Files\inkscape\libglib-2.0-0.dll
#8 0x685e8aa3 in g_main_context_iterate ()
   from C:\Program Files\inkscape\libglib-2.0-0.dll
#9 0x685e8d4a in g_main_loop_run ()
   from C:\Program Files\inkscape\libglib-2.0-0.dll
#10 0x6185ebfe in gtk_main ()
   from C:\Program Files\inkscape\libgtk-win32-2.0-0.dll
#11 0x01974d03 in Gtk::Main::run () at main.cc:481
#12 0x004031fc in sp_main_gui ()
#13 0x00408631 in Inkscape::NSApplication::Application::run ()
#14 0x00402d59 in main ()
(gdb)

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

related upstream bug reports:

"cairo_surface_set_device_offset crashes pidgin on windows"
<http://bugs.freedesktop.org/show_bug.cgi?id=15761>

"gdk_window_begin_paint_region() passes NULL to cairo_surface_set_device_offset() and crashes"
<https://bugzilla.gnome.org/show_bug.cgi?id=543209>

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

so far reported for
 Inkscape 0.46
 Inkscape 0.46+devel
 Inkscape 0.47pre1, pre4
 Inkscape 0.47 r22583

on
 Windows XP Pro SP2 (Tablet Edition)
 Windows XP Pro 32-bit SP3
 Windows Vista Home Premium
 Vista 32bit
 Vista 64bit

with and without tablet.

Revision history for this message
Jon South (striker) wrote :

Doing further research on this and related bugs both in inkscape and pidgin, this crash is caused by Inkscape (and/or GTK/cairo) exhausting windows GDI objects. Attached is a screenshot of this crash, the dialog, the assertion message, and process info of Inkscape at the time of the crash.

The crash will occur anytime the application or libs attempts to consume more than 10,000 GDI objects.

I was able to reproduce this crash simply by hiding and unhiding a layer within my image. It does not seem to matter which layers I hide, but more GDI objects are consumed with more objects hidden/unhidden in the canvas.

Almost any operation seems to consume more GDI objects. Even simple things like locking and unlocking layers consumes some.

This crash does not seem to be related to using tablets as this screenshot was captured when my tablet was not plugged in (and no drivers are installed).

One last note related to the pidgin bug reports. Pidgin also consumes GDI objects on some operations, though a much smaller than Inkscape.

Revision history for this message
Jon South (striker) wrote :

Yet more updates (sorry for the noise):

After installing the new pango libs available at http://www.gtk.org/download-windows.html, I am not seeing any extra GDI object usage.

I will do more vigorous testing today on some real SVG editing to put them through their paces, but first impressions are looking good.

I also installed the new versions of GLib, ATK, and Cairo, and had no issues, but I did notice if I used the newer 2.18.5 GTK+ libs, that list boxes and text boxes had graphical glitches (borders/items/text missing) until moused over, though seem to be functioning well otherwise. Without the new GTK+ libs, everything seems OK. I will be testing with only the updated Pango for now.

Revision history for this message
archis (archis) wrote :

I can confirm Jon's observation with inkscape 0.47 on vista 32-bit. Inkscape appears to be accumulating GDI objects with each operation and crashes as soon as it accumulates 10,000 GDI objects.

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

adding bug watch for suspected upstream bug in pango libraries currently installed with Inkscape 0.47:

"Pangocariowin32 is leaking every cairo font it ever creates"
<https://bugzilla.gnome.org/show_bug.cgi?id=562574>

Revision history for this message
jazzynico (jazzynico) wrote :

We plan to update the win32 devlibs (including Python, Cairo...).
I hope It'll be ok for 0.48.

Changed in inkscape:
assignee: nobody → JazzyNico (jazzynico)
milestone: none → 0.48
Revision history for this message
Jon South (striker) wrote :

It would be nice to get a 0.47.1 (or 0.47-4) release, or at the very least a notice added to the website for the workaround. I know there are plans to speed up the release cycle, but 0.48 still appears to be quite a few months out.

Revision history for this message
archis (archis) wrote :

No more crashes with inkscape after replacing the pango libs in the current win32 release (0.47-3); inkscape hardly consumes more than a few hundred GDI objects in most circumstances. This clearly fixed a long-standing crash bug for me.

» I concur with Jon here; for me, inkscape went from regularly crashing to rock-solid simply by upgrading to the current pango lib binaries from the gtk+ project web site. A point release would seem justified.

Revision history for this message
jazzynico (jazzynico) wrote :

Krzysztof, could you please update the cairo (or at least pango) libs in the win32 devlib, so that we have time to test it before 0.48.
Thanks!

Changed in inkscape:
assignee: JazzyNico (jazzynico) → Krzysztof Kosiński (tweenk)
Changed in inkscape-devlibs:
assignee: nobody → Krzysztof Kosiński (tweenk)
Revision history for this message
Krzysztof Kosinski (tweenk) wrote :

OK. Updating the C libraries (GTK, Glib, cairo, etc.) is a matter of pasting them into the devlibs. Updating the C++ bindings like gtkmm is going to be a little more involved, but I see that for now only the C stack needs updates.

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

It looks like GTK 2.18 on Windows has some regressions, so I'll go for 2.16, and copy the rest of the stack from 2.18.

Changed in inkscape-devlibs:
status: New → Confirmed
importance: Undecided → High
Revision history for this message
Krzysztof Kosinski (tweenk) wrote :

Please test latest devlibs and trunk - I updated the C part of the GTK stack to new versions.

Changed in inkscape-devlibs:
status: Confirmed → Fix Committed
Revision history for this message
Gemmu (gemmu) wrote :

How does one install the new pango-libraries?

I downloaded the Pango 1.26.2 binaries zip-file and found a few folders/directories inside it with .dll's and .modules and more. Must I go through the C:\ProgramFiles\Inkscape\-directory and find and replace all the files with the same name? Are these files any newer than the ones I already have on my computer? For an example I have "libpangowin32-1.0-0.dll" installed and downloaded from the website comes "libpangowin32-1.0-0.dll". All the other files also have the same versioning as the installed ones. The Inkscape I'm running is of version 0.47 r22583, built Nov 21 2009.

Should I download a development version of Inkscape instead? I'm looking to have a stable version for actuall work and the current crash-every-20-minutes-situation isn't very nice albeit I have the autosave run every 60 seconds.

I'm sorry if this is the wrong place to ask for this, but there wasn't that much information at the GTK-site.

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

You need to overwrite libpangowin32-1.0-0.dll in the Inkscape directory with the one from the zip file. The different versions of the library have to be named the same because Inkscape finds the libraries by their filenames; but this doesn't mean they contain the same code.

Revision history for this message
Gemmu (gemmu) wrote :

Thank you for the help. I did the overwrite after the last crash. I do hope it does the trick.

Might I add that Inkscape was not happy with the libpangowin32-1.0-0.dll alone. It wouldn't start at all, so I tried to copy the rest of the .dll-files from the pango-binaries to Inkscape-directory. That helped.

Thank you very much for your help.

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

Setting to fix committed in Inkscape as well.

Changed in inkscape:
status: Triaged → Fix Committed
summary: - Inkscape's Vanishing Act (the disappearing program) - updated
+ GDI object leak in Pango hangs Inkscape after some time
jazzynico (jazzynico)
Changed in inkscape:
status: Fix Committed → Fix Released
Changed in inkscape-devlibs:
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.