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 309170 - gimp crash when opening or creating certain size images
gimp crash when opening or creating certain size images
Status: RESOLVED NOTGNOME
Product: GIMP
Classification: Other
Component: libgimp
2.2.x
Other All
: High critical
: ---
Assigned To: GIMP Bugs
GIMP Bugs
Depends on:
Blocks:
 
 
Reported: 2005-06-28 07:57 UTC by mark krischer
Modified: 2008-01-15 12:57 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description mark krischer 2005-06-28 07:57:15 UTC
Steps to reproduce:
1. open a 1024x768 image (for example background-1024x768.png from an fbsplash theme
2. or create a new image and use the 1024x768 template
3. 


Stack trace:
Starting program: /usr/bin/gimp
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
---Type <return> to continue, or q <return> to quit---
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
[Thread debugging using libthread_db enabled]
[New Thread -1213674848 (LWP 24212)]
[New Thread -1217758288 (LWP 24389)]
art_render_invoke: no image source given
[New Thread -1226196048 (LWP 24390)]
[New Thread -1226466384 (LWP 24391)]
[New Thread -1226732624 (LWP 24392)]
art_render_invoke: no image source given

Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread -1213674848 (LWP 24212)]
0x080a288a in ?? ()
(gdb) q
The program is running.  Exit anyway? (y or n) y

gimp --verbose /etc/splash/livecd-2005.0/images/background-1024x768.png
INIT: gimp_load_config
Parsing '/etc/gimp/2.0/gimprc'
Parsing '/home/mark/.gimp-2.2/gimprc'
gimp_composite: use=yes, verbose=no
Processor instruction sets: -mmx -sse -sse2 -3dnow -altivec -vis
Adding theme 'Small' (/usr/share/gimp/2.0/themes/Small)
Adding theme 'Default' (/usr/share/gimp/2.0/themes/Default)
Writing '/home/mark/.gimp-2.2/themerc'
INIT: gimp_initialize
INIT: gimp_real_initialize
INIT: gui_initialize_after_callback
INIT: gimp_restore
INIT: gui_restore_callback
GimpClipboard: writable pixbuf format: image/png
GimpClipboard: writable pixbuf format: image/x-icon
GimpClipboard: writable pixbuf format: image/bmp
GimpClipboard: writable pixbuf format: image/x-bmp
GimpClipboard: writable pixbuf format: image/x-MS-bmp
GimpClipboard: writable pixbuf format: image/jpeg
INIT: gimp_real_restore
Starting extension: 'extension_script_fu'
INIT: gui_restore_after_callback
loading menu '/usr/share/gimp/2.0/menus/toolbox-menu.xml' for /toolbox-menubar
loading menu '/usr/share/gimp/2.0/menus/image-menu.xml' for /dummy-menubar
loading menu '/usr/share/gimp/2.0/menus/image-menu.xml' for /image-menubar
Segmentation fault
(script-fu:24399): LibGimpBase-WARNING **: script-fu: wire_read(): error




Other information:
seems to happen for 800x600 and 1024x768, but 640x480, 800x600, 1280x1024 and
1600x1200 seem to work fine.
Comment 1 Michael Schumacher 2005-06-28 08:19:20 UTC
I can't reproduce this. What OS?
Comment 2 mark krischer 2005-06-28 11:55:32 UTC
sorry.  i'm running gentoo linux.

[ebuild   R   ] dev-libs/glib-2.6.5  -doc -hardened -static 0 kB
[ebuild   R   ] x11-libs/gtk+-2.6.8  -doc +jpeg -static +tiff 0 kB
[ebuild   R   ] media-gfx/gimp-2.2.7-r1  -aalib (-altivec) -debug +doc
+gimpprint +gtkhtml -hardened +jpeg +lcms -mmx +mng +png +python -scanner -smp
-sse +svg +tiff +wmf 0 kB

linux kernel 2.6.12

emerge --info

Portage 2.0.51.19 (default-linux/x86, gcc-3.4.4, glibc-2.3.5-r0, 2.6.12-love1 i686)
=================================================================
System uname: 2.6.12-love1 i686 Intel(R) Pentium(R) M processor 1500MHz
Gentoo Base System version 1.6.12
Python:              dev-lang/python-2.3.5,dev-lang/python-2.4.1-r1 [2.4.1 (#1,
Jun 20 2005, 17:52:12)]
dev-lang/python:     2.3.5, 2.4.1-r1
sys-apps/sandbox:    [Not Present]
sys-devel/autoconf:  2.13, 2.59-r6
sys-devel/automake:  1.5, 1.8.5-r3, 1.6.3, 1.9.5, 1.7.9-r1, 1.4_p6
sys-devel/binutils:  2.15.92.0.2-r10
sys-devel/libtool:   1.5.16
virtual/os-headers:  2.6.8.1-r2
ACCEPT_KEYWORDS="x86"
AUTOCLEAN="yes"
CFLAGS="-Os -march=pentium-m -mmmx -msse -msse2 -fforce-addr -ftracer
-mfpmath=sse -pipe"
CHOST="i686-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/kde/2/share/config /usr/kde/3/share/config
/usr/lib/X11/xkb /usr/lib/mozilla/defaults/pref /usr/share/config
/usr/share/texmf/dvipdfm/config/ /usr/share/texmf/dvips/config/
/usr/share/texmf/tex/generic/config/ /usr/share/texmf/tex/platex/config/
/usr/share/texmf/xdvi/ /var/qmail/control"
CONFIG_PROTECT_MASK="/etc/gconf /etc/splash /etc/terminfo /etc/env.d"
CXXFLAGS="-Os -march=pentium-m -mmmx -msse -msse2 -fforce-addr -ftracer
-mfpmath=sse -pipe"
DISTDIR="/usr/portage/distfiles"
FEATURES="autoaddcvs autoconfig ccache distlocks sandbox sfperms strict"
GENTOO_MIRRORS="ftp://mirror.pacific.net.au/linux/Gentoo
http://mirror.isp.net.au/pub/gentoo/ ftp://mirror.isp.net.au/pub/gentoo/"
MAKEOPTS="-j2"
PKGDIR="/usr/portage/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/usr/local/portage"
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="x86 X a52 aac acpi alsa avi bash-completion berkdb bitmap-fonts bonobo
bzip2 cairo cdr crypt cups curl dbus divx4linux dvd eds emboss encode esd exif
fam fbcon foomaticdb gd gdbm gif gnome gpm gstreamer gtk gtk2 guile hal howl
imagemagick imlib java jpeg ldap libg++ libwww mad mikmod mmx mono motif mozilla
mp3 mpeg mysql ncurses nptl offensive ogg oggvorbis opengl oss pam pcmcia pda
pdflib perl pic png python qt quicktime readline samba sdl spell sqlite sse sse2
ssl svg tcpd tetex theora tiff truetype truetype-fonts type1-fonts usb v4l
vorbis xinerama xml2 xv xvid zlib video_cards_radeon userland_GNU kernel_linux
elibc_glibc"
Unset:  ASFLAGS, CBUILD, CTARGET, LANG, LC_ALL, LDFLAGS, LINGUAS
Comment 3 Sven Neumann 2005-07-02 12:55:51 UTC
That looks like a problem caused by overoptimization. There might very well be a
bug somewhere in GIMP or in one of the other libraries involved. But since the
problem isn't reproducable on any other system but yours, you will have to try
to come up with a useful stack trace yourself.
Comment 4 mark krischer 2005-07-02 13:17:19 UTC
one interesting thing i noticed was that it seems tied to my resolution.  i'm
running on a laptop in 1024x768 mode.  if i run at 800x600 or 640x480 then i can
open the 1024x768 image, but not an image in the same resoultion as the screen.

but i will rebuild with debug enabled and try and get a better stack trace. 
i'll also try some different resolution combinations.
Comment 5 Sven Neumann 2005-07-02 13:28:24 UTC
You might be hitting a bug in the downscaling routines then. GIMP will use a
zoom ratio of < 1.0 if your image is larger than the screen.
Comment 6 mark krischer 2005-07-02 13:56:27 UTC
i think you have something there.  here's the new stack trace with debug
symbols, and you'll see the first hit is at "gimp_display_shell_scale_get_fraction".

one additional interesting item.  the bug happens when i use the File | Open
menu.  but if i use File | Open Recent | <select file>, the bug doesn't get hit.
 the file opens, and the zoom has been set to 67%.  even odder, however, is that
if instead of selecting the file in the Open Recent menu using the mouse, i try
using the keyboard accelerator (in this cast Ctrl+1), then i do get the usual crash!

stack trace follows:

Starting program: /usr/bin/gimp
[Thread debugging using libthread_db enabled]
[New Thread -1214047584 (LWP 13039)]
[New Thread -1218417744 (LWP 13044)]
art_render_invoke: no image source given
[New Thread -1226962000 (LWP 13045)]
[New Thread -1227228240 (LWP 13046)]
art_render_invoke: no image source given

Program received signal SIGSEGV, Segmentation fault.

Thread NaN (LWP 13039)

  • #0 gimp_display_shell_scale_get_fraction
    at gimpdisplayshell-scale.c line 172
  • #1 gimp_display_shell_format_title
  • #2 gimp_display_shell_title_init
    at gimpdisplayshell-title.c line 76
  • #3 gimp_display_shell_new
    at gimpdisplayshell.c line 1045
  • #4 gimp_display_new
    at gimpdisplay.c line 345
  • #5 gui_display_create
    at gui-vtable.c line 336
  • #6 gimp_create_display
    at gimp-gui.c line 250
  • #7 file_open_with_proc_and_display
    at file-open.c line 317
  • #8 file_open_dialog_response
    at file-open-dialog.c line 181
  • #9 g_cclosure_marshal_VOID
    from /usr/lib/libgobject-2.0.so.0
  • #10 g_closure_invoke
    from /usr/lib/libgobject-2.0.so.0
  • #11 g_signal_has_handler_pending
    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 gtk_dialog_response
    from /usr/lib/libgtk-x11-2.0.so.0
  • #15 gtk_dialog_response
    from /usr/lib/libgtk-x11-2.0.so.0
  • #16 g_cclosure_marshal_VOID__VOID
    from /usr/lib/libgobject-2.0.so.0
  • #17 g_closure_invoke
    from /usr/lib/libgobject-2.0.so.0
  • #18 g_signal_has_handler_pending
    from /usr/lib/libgobject-2.0.so.0
  • #19 g_signal_emit_valist
    from /usr/lib/libgobject-2.0.so.0
  • #20 g_signal_emit
    from /usr/lib/libgobject-2.0.so.0
  • #21 gtk_button_clicked
    from /usr/lib/libgtk-x11-2.0.so.0
  • #22 gtk_button_get_alignment
    from /usr/lib/libgtk-x11-2.0.so.0
  • #23 gtk_button_get_alignment
    from /usr/lib/libgtk-x11-2.0.so.0
  • #24 g_main_context_wakeup
    from /usr/lib/libglib-2.0.so.0
  • #25 g_main_context_dispatch
    from /usr/lib/libglib-2.0.so.0
  • #26 g_main_context_acquire
    from /usr/lib/libglib-2.0.so.0
  • #27 g_main_loop_run
    from /usr/lib/libglib-2.0.so.0
  • #28 app_run
    at app_procs.c line 376
  • #29 main
    at main.c line 473

Comment 7 Manish Singh 2005-07-02 18:54:32 UTC
If that line number is correct, the crash is in this line:

      next_cf = floor (remainder);

... which only involves 2 automatic variables, and a standard C math function.

This points to your compiler. I'd suggest removing questionable CFLAGS, starting
with -mfpmath=sse.
Comment 8 mark krischer 2005-07-03 21:15:36 UTC
i removed -mfpmath=see from my CFLAGS and that seems to have solved the problem.

thanks heaps.
Comment 9 Manish Singh 2005-07-03 21:24:55 UTC
You should probably file a bug report with the gcc folks.
Comment 10 mark krischer 2005-07-04 06:20:26 UTC
for completeness, here's the link to the bug entered for gcc:
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=22289
Comment 11 mark krischer 2005-07-04 22:10:38 UTC
the gcc folks have responded to the bug with the following:

------- Additional Comments From giovannibajo at libero dot it  2005-07-04 15:34
-------
To produce a testcase, you could try extracting the routine that is miscompiled
and attach it to this bug (in a compilable form, so preprocessed with all
needed headers). I believe the GIMP folk can help you with this.

It might be that the bug is visible by just looking at the assembly code
generated by the compiler (-S).


any easy instructions i could follow to give the gcc folks what they need?