GNOME Bugzilla – Bug 355219
Depth Merge plug-in crash on 64 bit Linux
Last modified: 2008-01-15 14:08:26 UTC
Please describe the problem: The Depth Merge plug-in crashes on the second use in a session. The image I used is a 681x511 RGB image with no transparency. I opened the image, duplicated its layer, and ran the Bump Map plug-in (from the Emboss dialog) on one layer. I then went to repeat the process, with both un-doing the changes and keeping the changes, and the plug-in crashed. I reproduced the crash using the Convolution Matrix filter also. AMD X2 3800+, GCC 4.1.1, 64 bit Linux (Arch) Steps to reproduce: 1. Open an image and duplicate its layer. 2. Run either layer through the Bump Map filter (from the Emboss menu) 3. Run one layer through the Depth Merge filter (I fiddled with settings there) 4. Repeat the process If it doesn't crash, try again. Sometimes it doesn't do it on the second use of the Depth Merge filter. Actual results: If I'm not running from the concole, I get a dialog box that doesn't give much information aside from complaining about the crash. From the console, see gdb output below. Expected results: Does this happen every time? I've been about to reproduce the results with the Emboss/Bump Map and Convolution filters without fail. Of course, they're all basically the same filter. I didn't get the same results from not manipulating a layer or the Engrave filter. Other information: GNU gdb 6.5 Copyright (C) 2006 Free Software Foundation, Inc. GDB is free software, covered by the GNU General Public License, and you are welcome to change it and/or distribute copies of it under certain conditions. Type "show copying" to see the conditions. There is absolutely no warranty for GDB. Type "show warranty" for details. This GDB was configured as "x86_64-unknown-linux-gnu". Attaching to process 11828 Reading symbols from /opt/gimp-2.3/lib/gimp/2.0/plug-ins/depthmerge...done. Using host libthread_db library "/lib/libthread_db.so.1". Reading symbols from /opt/gimp-2.3/lib/libgimpui-2.0.so.0...done. Loaded symbols for /opt/gimp-2.3/lib/libgimpui-2.0.so.0 Reading symbols from /opt/gimp-2.3/lib/libgimpconfig-2.0.so.0...done. Loaded symbols for /opt/gimp-2.3/lib/libgimpconfig-2.0.so.0 Reading symbols from /opt/gimp-2.3/lib/libgimpwidgets-2.0.so.0...done. Loaded symbols for /opt/gimp-2.3/lib/libgimpwidgets-2.0.so.0 Reading symbols from /opt/gimp-2.3/lib/libgimp-2.0.so.0...done. Loaded symbols for /opt/gimp-2.3/lib/libgimp-2.0.so.0 Reading symbols from /opt/gimp-2.3/lib/libgimpcolor-2.0.so.0...done. Loaded symbols for /opt/gimp-2.3/lib/libgimpcolor-2.0.so.0 Reading symbols from /opt/gimp-2.3/lib/libgimpmath-2.0.so.0...done. Loaded symbols for /opt/gimp-2.3/lib/libgimpmath-2.0.so.0 Reading symbols from /opt/gimp-2.3/lib/libgimpbase-2.0.so.0...done. Loaded symbols for /opt/gimp-2.3/lib/libgimpbase-2.0.so.0 Reading symbols from /usr/lib/libgtk-x11-2.0.so.0...done. Loaded symbols for /usr/lib/libgtk-x11-2.0.so.0 Reading symbols from /usr/lib/libgdk-x11-2.0.so.0...done. Loaded symbols for /usr/lib/libgdk-x11-2.0.so.0 Reading symbols from /usr/lib/libatk-1.0.so.0...done. Loaded symbols for /usr/lib/libatk-1.0.so.0 Reading symbols from /usr/lib/libgdk_pixbuf-2.0.so.0...done. Loaded symbols for /usr/lib/libgdk_pixbuf-2.0.so.0 Reading symbols from /lib/libm.so.6...done. Loaded symbols for /lib/libm.so.6 Reading symbols from /usr/lib/libpangocairo-1.0.so.0...done. Loaded symbols for /usr/lib/libpangocairo-1.0.so.0 Reading symbols from /usr/lib/libpango-1.0.so.0...done. Loaded symbols for /usr/lib/libpango-1.0.so.0 Reading symbols from /usr/lib/libcairo.so.2...done. Loaded symbols for /usr/lib/libcairo.so.2 Reading symbols from /usr/lib/libgobject-2.0.so.0...done. Loaded symbols for /usr/lib/libgobject-2.0.so.0 Reading symbols from /usr/lib/libgmodule-2.0.so.0...done. Loaded symbols for /usr/lib/libgmodule-2.0.so.0 Reading symbols from /lib/libdl.so.2...done. Loaded symbols for /lib/libdl.so.2 Reading symbols from /usr/lib/libglib-2.0.so.0...done. Loaded symbols for /usr/lib/libglib-2.0.so.0 Reading symbols from /lib/libc.so.6...done. Loaded symbols for /lib/libc.so.6 Reading symbols from /opt/gimp-2.3/lib/libgimpmodule-2.0.so.0...done. Loaded symbols for /opt/gimp-2.3/lib/libgimpmodule-2.0.so.0 Reading symbols from /usr/lib/libX11.so.6...done. Loaded symbols for /usr/lib/libX11.so.6 Reading symbols from /usr/lib/libfontconfig.so.1...done. Loaded symbols for /usr/lib/libfontconfig.so.1 Reading symbols from /usr/lib/libXext.so.6...done. Loaded symbols for /usr/lib/libXext.so.6 Reading symbols from /usr/lib/libXrender.so.1...done. Loaded symbols for /usr/lib/libXrender.so.1 Reading symbols from /usr/lib/libXinerama.so.1...done. Loaded symbols for /usr/lib/libXinerama.so.1 Reading symbols from /usr/lib/libXi.so.6...done. Loaded symbols for /usr/lib/libXi.so.6 Reading symbols from /usr/lib/libXrandr.so.2...done. Loaded symbols for /usr/lib/libXrandr.so.2 Reading symbols from /usr/lib/libXcursor.so.1...done. Loaded symbols for /usr/lib/libXcursor.so.1 Reading symbols from /usr/lib/libXfixes.so.3...done. Loaded symbols for /usr/lib/libXfixes.so.3 Reading symbols from /usr/lib/libpangoft2-1.0.so.0...done. Loaded symbols for /usr/lib/libpangoft2-1.0.so.0 Reading symbols from /usr/lib/libfreetype.so.6...done. Loaded symbols for /usr/lib/libfreetype.so.6 Reading symbols from /usr/lib/libz.so.1...done. Loaded symbols for /usr/lib/libz.so.1 Reading symbols from /usr/lib/libpng12.so.0...done. Loaded symbols for /usr/lib/libpng12.so.0 Reading symbols from /lib/librt.so.1...done. Loaded symbols for /lib/librt.so.1 Reading symbols from /lib/ld-linux-x86-64.so.2...done. Loaded symbols for /lib/ld-linux-x86-64.so.2 Reading symbols from /usr/lib/libXau.so.6...done. Loaded symbols for /usr/lib/libXau.so.6 Reading symbols from /usr/lib/libXdmcp.so.6...done. Loaded symbols for /usr/lib/libXdmcp.so.6 Reading symbols from /usr/lib/libexpat.so.0...done. Loaded symbols for /usr/lib/libexpat.so.0 Reading symbols from /lib/libpthread.so.0...done. [Thread debugging using libthread_db enabled] [New Thread 47627518060208 (LWP 11828)] Loaded symbols for /lib/libpthread.so.0 Reading symbols from /usr/lib/gconv/ISO8859-1.so...done. Loaded symbols for /usr/lib/gconv/ISO8859-1.so Reading symbols from /lib/libnss_files.so.2...done. Loaded symbols for /lib/libnss_files.so.2 Reading symbols from /usr/lib/pango/1.5.0/modules/pango-basic-fc.so...done. Loaded symbols for /usr/lib/pango/1.5.0/modules/pango-basic-fc.so 0x00002b5123d89750 in __write_nocancel () from /lib/libc.so.6 (gdb) where
+ Trace 72015
Whwn this is fixed, please post the patch.
This bug report is in some respects a bit difficult to understand. Is it true that the crash always occurs when you run the Depth Merge filter? In your description, it looks like you are saying that several other filters are crashing too, but your summary suggests something different. Please clarify. By the way, the stack trace is very helpful. If you need to do this in future, though, you can omit all the "Reading symbols.../Loaded symbols..." lines, which are pretty much useless without detailed knowledge of your system.
Depth Merge is the filter that's crashing. It usually crashes on the second use of the filter; which is to say, I can apply it once successfully, then if I try to apply it again, it blows up. Sometimes I can get more than two passes with it before it breaks. Sorry about the earlier confusing post. I could only reproduce the error yesterday after using matrix based filters first: emboss, bumpmap, convolution matrix, sobel etc. Today I was able to reproduce it without applying any filters before Depth Merge.
Okay, fixed now in both branches: 2006-09-10 Bill Skaggs <weskaggs@primate.ucdavis.edu> * plug-ins/common/depthmerge.c (dialogDepthMap2ChangedCallback): change "depthMap1Drawable" to "depthMap2Drawable" to fix typo introduced in version 1.35 committed on 2004-04-21. Should fix bug #355219. Thanks for the bug report. I won't attach a patch, but since the fix is just to change one character (from "1" to "2") in line 999 of depthmerge.c, you should be able to do this if you need it.
This line (999) from depthmerge.c? "dm->depthMap1Drawable = ((dm->params.depthMap2 == -1) ?" Are you saying to change the '-1' to '-2'? Because if you are, it's still broken. Here's the output from the console (output from gdb below): *** glibc detected *** /opt/gimp-2.3/lib/gimp/2.0/plug-ins/depthmerge: double free or corruption (!prev): 0x00000000005d07b0 *** ======= Backtrace: ========= /lib/libc.so.6[0x2ba5f1cc5fed] /lib/libc.so.6(__libc_free+0x6c)[0x2ba5f1cc75ec] /opt/gimp-2.3/lib/libgimp-2.0.so.0(gimp_drawable_detach+0x1c)[0x2ba5f05a235c] /opt/gimp-2.3/lib/gimp/2.0/plug-ins/depthmerge[0x403941] /opt/gimp-2.3/lib/libgimp-2.0.so.0(gimp_main+0x5f4)[0x2ba5f05936b4] /lib/libc.so.6(__libc_start_main+0xf4)[0x2ba5f1c7a0a4] /opt/gimp-2.3/lib/gimp/2.0/plug-ins/depthmerge[0x4022f9] ======= Memory map: ======== 00400000-00406000 r-xp 00000000 08:03 8031091 /opt/gimp-2.3/lib/gimp/2.0/plug-ins/depthmerge 00505000-00506000 rw-p 00005000 08:03 8031091 /opt/gimp-2.3/lib/gimp/2.0/plug-ins/depthmerge 00506000-006b2000 rw-p 00506000 00:00 0 [heap] 2ba5f002f000-2ba5f0049000 r-xp 00000000 08:03 3702807 /lib/ld-2.4.so 2ba5f0049000-2ba5f004b000 rw-p 2ba5f0049000 00:00 0 2ba5f0148000-2ba5f0149000 r--p 00019000 08:03 3702807 /lib/ld-2.4.so 2ba5f0149000-2ba5f014a000 rw-p 0001a000 08:03 3702807 /lib/ld-2.4.so 2ba5f014a000-2ba5f0168000 r-xp 00000000 08:03 8030635 /opt/gimp-2.3/lib/libgimpui-2.0.so.0.311.0 2ba5f0168000-2ba5f0267000 ---p 0001e000 08:03 8030635 /opt/gimp-2.3/lib/libgimpui-2.0.so.0.311.0 2ba5f0267000-2ba5f0269000 rw-p 0001d000 08:03 8030635 /opt/gimp-2.3/lib/libgimpui-2.0.so.0.311.0 2ba5f0269000-2ba5f0277000 r-xp 00000000 08:03 8030541 /opt/gimp-2.3/lib/libgimpconfig-2.0.so.0.311.0 2ba5f0277000-2ba5f0377000 ---p 0000e000 08:03 8030541 /opt/gimp-2.3/lib/libgimpconfig-2.0.so.0.311.0 2ba5f0377000-2ba5f0378000 rw-p 0000e000 08:03 8030541 /opt/gimp-2.3/lib/libgimpconfig-2.0.so.0.311.0 2ba5f0378000-2ba5f047c000 r-xp 00000000 08:03 8030578 /opt/gimp-2.3/lib/libgimpwidgets-2.0.so.0.311.0 2ba5f047c000-2ba5f057c000 ---p 00104000 08:03 8030578 /opt/gimp-2.3/lib/libgimpwidgets-2.0.so.0.311.0 2ba5f057c000-2ba5f0581000 rw-p 00104000 08:03 8030578 /opt/gimp-2.3/lib/libgimpwidgets-2.0.so.0.311.0 2ba5f0581000-2ba5f0582000 rw-p 2ba5f0581000 00:00 0 2ba5f0582000-2ba5f05b4000 r-xp 00000000 08:03 8030631 /opt/gimp-2.3/lib/libgimp-2.0.so.0.311.0 2ba5f05b4000-2ba5f06b4000 ---p 00032000 08:03 8030631 /opt/gimp-2.3/lib/libgimp-2.0.so.0.311.0 2ba5f06b4000-2ba5f06b7000 rw-p 00032000 08:03 8030631 /opt/gimp-2.3/lib/libgimp-2.0.so.0.311.0 2ba5f06b7000-2ba5f06b8000 rw-p 2ba5f06b7000 00:00 0 2ba5f06b8000-2ba5f06c2000 r-xp 00000000 08:03 8030517 /opt/gimp-2.3/lib/libgimpcolor-2.0.so.0.311.0 2ba5f06c2000-2ba5f07c2000 ---p 0000a000 08:03 8030517 /opt/gimp-2.3/lib/libgimpcolor-2.0.so.0.311.0 2ba5f07c2000-2ba5f07c3000 rw-p 0000a000 08:03 8030517 /opt/gimp-2.3/lib/libgimpcolor-2.0.so.0.311.0 2ba5f07c3000-2ba5f07c8000 r-xp 00000000 08:03 8030531 /opt/gimp-2.3/lib/libgimpmath-2.0.so.0.311.0 2ba5f07c8000-2ba5f08c7000 ---p 00005000 08:03 8030531 /opt/gimp-2.3/lib/libgimpmath-2.0.so.0.311.0 2ba5f08c7000-2ba5f08c8000 rw-p 00004000 08:03 8030531 /opt/gimp-2.3/lib/libgimpmath-2.0.so.0.311.0 2ba5f08c8000-2ba5f08db000 r-xp 00000000 08:03 8030493 /opt/gimp-2.3/lib/libgimpbase-2.0.so.0.311.0 2ba5f08db000-2ba5f09db000 ---p 00013000 08:03 8030493 /opt/gimp-2.3/lib/libgimpbase-2.0.so.0.311.0 2ba5f09db000-2ba5f09de000 rw-p 00013000 08:03 8030493 /opt/gimp-2.3/lib/libgimpbase-2.0.so.0.311.0 2ba5f09fb000-2ba5f09fc000 rw-p 2ba5f09fb000 00:00 0 2ba5f09fc000-2ba5f0d6b000 r-xp 00000000 08:03 8901909 /usr/lib/libgtk-x11-2.0.so.0.1000.2 2ba5f0d6b000-2ba5f0e6a000 ---p 0036f000 08:03 8901909 /usr/lib/libgtk (gimp:22423): Gimp-Plug-In-WARNING **: gimp: plug_in_flush(): error: Broken pipe ------------------------------------------------------------------------
+ Trace 72079
No, you changed the wrong thing. As the ChangeLog entry clearly states, change "depthMap1Drawable" to "depthMap2Drawable".
Sorry, I'm an idiot.