GNOME Bugzilla – Bug 603711
Crashes when using path tool.
Last modified: 2010-05-16 08:36:57 UTC
Recently I have started seriously using paths in images. Starting a month ago odd things have happened when using ans manipulating large amounts of paths. First whilst working on an image GIMP crashed completely, showing the following error message: GLib-ERROR **: gmem.c:136: failed to allocate 1618733314 bytes aborting... Somehow this also corrupted the saved .xcf file (wasn't saving at the time) and the same message now appears when trying to open the file with GIMP. Three or four times after this GIMP has crashed without displaying error messages when editing images with large amounts of paths. GIMP exits completely during these crashes and the save files are okay.
Hi and thanks for the bug report! We need a step-by-step instruction on how to reproduce the problem.
The problem always occurs when editing and creating multiple large paths. Images have always been in .xcf format and have multiple layers. There is often quite a large time delay between opening the file and the crash can range from 15 minutes to an hour. A repeat of the first incident has not yet occurred. Though the second kind of crash did not occur until it happened. More than that I don't know what to tell you. There may be some connection to trying to stroke the path or convert it to selection, but I don't know for sure and it definitely doesn't do it all the time when using those features.
I am afraid without a stack trace from the crash there is nothing we can do.
Created attachment 149082 [details] [review] Quick hack to limit the effects of uninitialized variables A short run under valgrind reveals usages of uninitialized values. Step to reproduce (with version 2.6.7): Ctrl+N Enter (New Image) B (Path tool) click the left button of the mouse move the mouse click the left button of the mouse move the mouse Press Shift The problem is that in gimp_display_shell_canvas_tool_events (in file 'app/display/gimpdisplayshell-calllbacks.c') 'display_coords' is declared uninitialized. Its initialization occurs in 'gimp_display_shell_get_event_coords' but the member 'velocity' is left uninitialized. Several execution paths successively access the content of this variable. With the attached patch, that explicitly initializes it to 0., valgrind does not report these errors.
Reopening as requested information has (almost) been provided.
Initialize stuff in master and 2-6. James, can you check whether this fixes the crash in the next stable release? commit 353ef2037dfbcda8aec8507f8aa7ce5619d3fed0 Author: Michael Natterer <mitch@gimp.org> Date: Sun Jan 31 17:19:51 2010 +0100 Bug 603711 - Crashes when using path tool gimp_display_shell_get_*_coord(): initialize the coords with GIMP_COORDS_DEFAULT_VALUES allGimpCoords members get initialized. (cherry-picked from 74bf91cb63ec9ee64d7f2ab2c1b58f118b0f61e1) app/display/gimpdisplayshell-coords.c | 47 +++++++++++--------------------- 1 files changed, 16 insertions(+), 31 deletions(-)
Review of attachment 149082 [details] [review]: Well, the initialization of velocity should happen where the other members are initialized.
No further reports about this, let's assume it's FIXED now until proven otherwise.