After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 353227 - Emboss filter crash
Emboss filter crash
Status: RESOLVED FIXED
Product: GIMP
Classification: Other
Component: Plugins
2.3.x
Other Linux
: Normal normal
: 2.4
Assigned To: GIMP Bugs
GIMP Bugs
Depends on:
Blocks:
 
 
Reported: 2006-08-28 12:15 UTC by skottish
Modified: 2008-01-15 14:08 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
might fix the problem (1.55 KB, patch)
2006-09-08 09:09 UTC, Sven Neumann
committed Details | Review

Description skottish 2006-08-28 12:15:10 UTC
Please describe the problem:
The emboss filter in Gimp 2.3.10 on 64 bit Linux no longer functions. 

Steps to reproduce:
1. Simply run emboss on 64 bit Linux
2. 
3. 


Actual results:
The message:

/opt/gimp-2.3/lib/gimp/2.0/plug-ins/emboss (pid:2889): [E]xit, [H]alt, show [S]tack trace or [P]roceed: 

is repeated on the console in a seemingly infinite loop. When the console isn't open, the dialog box error is:

Plug-in crashed: "emboss"
(/opt/gimp-2.3/lib/gimp/2.0/plug-ins/emboss)

The dying plug-in may have messed up GIMP's internal state. You may want to save your images and restart GIMP to be on the safe side.

Expected results:


Does this happen every time?
Yes

Other information:
Comment 1 Sven Neumann 2006-08-28 13:18:44 UTC
Please specify exactly what kind of image (size, mode, alpha channel) you are using the plug-in on.
Comment 2 weskaggs 2006-08-28 16:33:42 UTC
When you say "is repeated on the console in a seemingly infinite loop", what console are you talking about?  The command line you used to run GIMP from?  If so, are you really seeing the message show up over and over again without any action on your part?

Normally, you would only see that message once if you run the plug-in once and don't do anything after it crashes.  I'm going to assume for the moment that that's what happens, and that you got confused somehow.  If that's true, then here's what would be most helpful:

Run the plug-in as before, and when you get the error message, note the pid number -- suppose it is (pid:XXX).  Then, from a separate terminal window, run the command "gdb --pid=XXX", substituting the number from the error message for XXX.
The starts the GDB debugger and causes it to attach to the plug-in.  When the debugger gives you a prompt, type the command "where" and hit return.  You should get back a bunch of information, called a "stack trace".  If you could make a copy of the stack trace, and attach it to this bug report, it might be quite helpful.  After doing this, you can type "quit" at the gdb prompt.  (Apologies if I am explaining things that you already know!)
Comment 3 skottish 2006-08-29 01:27:26 UTC
For Sven: I've tried it on different images. Before I wrote this I tested it with both a 800x600 and a 605x338 RGB image. The plug-in doesn't give me an option to run under greyscale or RGBA. Also, none of the tested images have transparency.

For weskaggs: (from the command line, Konsole) It is running in an infinite loop. In fact, I can't even get CTRL-C through. But through some clever window resizing, I was able to harmonize the output so I could read the PID:

 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 3066
Reading symbols from /opt/gimp-2.3/lib/gimp/2.0/plug-ins/emboss...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/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 /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
0x00002b98f160a750 in __write_nocancel () from /lib/libc.so.6
(gdb) where
  • #0 __write_nocancel
    from /lib/libc.so.6
  • #1 _IO_new_file_write
    from /lib/libc.so.6
  • #2 new_do_write
    from /lib/libc.so.6
  • #3 _IO_new_do_write
    from /lib/libc.so.6
  • #4 _IO_new_file_sync
    from /lib/libc.so.6
  • #5 fflush
    from /lib/libc.so.6
  • #6 g_on_error_query
    from /usr/lib/libglib-2.0.so.0
  • #7 gimp_plugin_sigfatal_handler
    at gimp.c line 1491
  • #8 <signal handler called>
  • #9 emboss
    at emboss.c line 298
  • #10 g_closure_invoke
    from /usr/lib/libgobject-2.0.so.0
  • #11 signal_emit_unlocked_R
    from /usr/lib/libgobject-2.0.so.0
  • #12 g_signal_emit_valist
    from /usr/lib/libgobject-2.0.so.0
  • #13 g_signal_emit
    from /usr/lib/libgobject-2.0.so.0
  • #14 gimp_preview_invalidate_now
    at gimppreview.c line 474
  • #15 g_timeout_dispatch
    from /usr/lib/libglib-2.0.so.0
  • #16 g_main_context_dispatch
    from /usr/lib/libglib-2.0.so.0



Just so you know, if I start Gimp from the console, I get the infinite loop. If I start it from an KDE application launcher, that is where I get the error message I wrote in the first post.
Comment 4 Sven Neumann 2006-08-30 08:28:05 UTC
2006-08-30  Sven Neumann  <sven@gimp.org>

	* plug-ins/common/emboss.c: fixed off-by-one error and cleaned up
	the code a bit. Fixes bug #353227.
Comment 5 skottish 2006-08-30 12:04:42 UTC
Thank you everyone. Not only of the bug fix, but for the awesome Gimp.

Best regards.
Comment 6 Sven Neumann 2006-09-08 05:57:46 UTC
This doesn't seem to have fixed all issues, see bug #354881.
Comment 7 Sven Neumann 2006-09-08 06:10:19 UTC
Here's the relevant part of the new stack trace:

  • #9 emboss_row
    at emboss.c line 290
  • #10 emboss
    at emboss.c line 391

Comment 8 Sven Neumann 2006-09-08 06:13:39 UTC
skottish, did you compile gimp from source? What compiler are you using, what compiler flags, any particular optimizations?
Comment 9 Sven Neumann 2006-09-08 09:09:13 UTC
Created attachment 72406 [details] [review]
might fix the problem

I suspect that the compiler does not deal correctly with negative offsets into an array. The attached patch changes the code to not do that. The results should be identical but it might work around the compiler bug for you (if there is indeed such a problem, I am only guessing here).
Comment 10 skottish 2006-09-09 00:40:33 UTC
Gee whiz Batman! It seems to be working with the new patch. Here's all of the relevant information:

AMD X2 3800+
Arch Linux, 64 bit build
GCC 4.1.1
Compiled from source obtained from ftp.gimp.org
No optimizations used
--prefix is the only compiler flag used
No complaints or warnings noticed during compile-time
No complaints or warnings at all during run-time

I've only tested it for a short while. I'll report back if there are any more problems.

Thanks again.
Comment 11 Sven Neumann 2006-09-09 00:52:46 UTC
A bug should only be closed by a developer after a fix has been committed to CVS. But I have taken care of committing the patch now:

2006-09-09  Sven Neumann  <sven@gimp.org>

	* plug-ins/common/emboss.c: hopefully really fixed bug #353227
	this time.