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 490700 - GIMP plugin compose crashes when using GtkComboBox
GIMP plugin compose crashes when using GtkComboBox
Status: RESOLVED DUPLICATE of bug 399484
Product: gtk+
Classification: Platform
Component: Backend: Win32
2.12.x
Other Windows
: Normal normal
: ---
Assigned To: gtk-win32 maintainers
gtk-bugs
Depends on:
Blocks:
 
 
Reported: 2007-10-27 02:19 UTC by Fraser
Modified: 2007-11-05 13:58 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Small version of LAB decomposed image. (275.01 KB, application/octet-stream)
2007-10-28 01:30 UTC, Fraser
Details
orginal file which generated HSV recomposition error (59.48 KB, image/jpeg)
2007-10-28 10:28 UTC, paul
Details
drmingw output (6.63 KB, text/plain)
2007-11-02 18:06 UTC, Michael Schumacher
Details

Description Fraser 2007-10-27 02:19:11 UTC
the plugin compose.exe crashes when recomposing a LAB decomposed image.  I have tried reinstalling gimp 2.4 but get the same problem.
Comment 1 paul 2007-10-27 09:28:15 UTC
version:  gimp 2.4.0
bug:      crash when recomposing a HSV image.
testcase: jpg image, raw image (from pentax pef file)
also tested decompose/recompose for RGB,YCbCr_ITU_709_256,CMYK and all works fine
Comment 2 Sven Neumann 2007-10-27 10:24:29 UTC
Please attach a small test image to this bug report so that we can attempt to reproduce the problem.
Comment 3 Fraser 2007-10-28 01:30:14 UTC
Created attachment 98001 [details]
Small version of LAB decomposed image.

Small version of LAB decomposed image I was trying to compose when I get crash.  I get the same crash with the small image (when trying to compose).

I get the crash right after I select LAB (i.e. I never actually get to the stage where I can click 'OK').

If you need more information or scren shots etc. please let me know.
Comment 4 Sven Neumann 2007-10-28 09:51:12 UTC
Sounds like bug #322310 but that is supposed to be fixed.
Comment 5 paul 2007-10-28 10:28:33 UTC
Created attachment 98012 [details]
orginal file which generated HSV recomposition error
Comment 6 Fraser 2007-10-28 20:37:33 UTC
I have read through that bug, and will add the following details (incase it helps).

Running on WinXP SP2, no gaim installed, (GTK 2.8.9, I think.  I will update after posting this).  1gb of RAM, p4-2.6ghz.  

Crash occurs when selecting LAB, HSV, or HSL (all using the same LAB decomposed image).

I had tried recompose originally and that crashed too.  The error message was different when I tried recompose, I suspect it said something about failure to allocate memory or some such.  After installing the new GTK I will see if I can recreate that error message too.

The error message is non-descript: 
"Plug-in crashed: "compose.exe"
(C:\Program Files\GIMP-2.0\lib\gimp\2.0\plug-ins\compose.exe)

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."

If you would like me to conduct any specific tests, please let me know.
Comment 7 Fraser 2007-10-28 21:05:04 UTC
I have installed GTK 2.14.2 and get the same crash.

I tried recreating the recompose error but was not able to.  Either that was fixed with GTK 2.14.2 or I'm doing something different.  Sorry for not paying more attention to it when I got it originally.
Comment 8 Marcin W. Dąbrowski 2007-11-02 15:28:07 UTC
Confirming on WinXP-Pro, and on WinXP-Home. GIMP 2.4.1 from gimp-win.sf.net installer, with GTK 2.12.1/GLib 2.14.2.

Shortest path to exploit the bug in Compose plugin:
1. File; New; Advanced: Colour space: Greyscale; OK
2. <Image>/Colours/Components/Compose...
3. Switch "Colour model" several times - after some number of changes plug-in crashes. (I tried switching by mouse roll, and by clicking up/down arrows - bug is exploitable with any method.)

I've tried to track what's going on, and here's top of call stack from Dr. Mingw dump (frame addresses ommited, full Dr. Mingw dump at http://pastebin.ca/758742):

Call stack:
7C910C3F  ntdll.dll:7C910C3F  wcsncpy
7C910D5C  ntdll.dll:7C910D5C  wcsncpy
77C2C2DE  MSVCRT.dll:77C2C2DE  free
libgdk-win32-2.0-0.dll: No symbol found
  gdk_region_destroy
libgdk-win32-2.0-0.dll: No symbol found
  gdk_event_free
libgtk-win32-2.0-0.dll: No symbol found
  gtk_container_propagate_expose
libgtk-win32-2.0-0.dll: No symbol found
  gtk_container_forall
...

I tried looking at the code, and see nothing. Notes from bug 322310 didn't help much. I tried some changes in type_combo_calback() like disabling icon updates, but is didn't helped - plug-in still crashes, maybe a little more "Colour model" changes are needed to trigger that.

Also, I tried commenting out the call to gtk_label_set_text_with_mnemonic() - and it helped! I was unable to crash the plug-in. It looks like there's something wrong going with memory allocation/freeing on setting labels. BTW: Changing gtk_label_set_text_with_mnemonic() to gtk_label_set_text (GTK_LABEL (label), text ? text : ""); still produces crashes. Hmm... GTK bug?

PS: Tried debugging it under gdb - I got a callstack of over 9000 (nine thousand!) calls. Second try produced this: http://pastebin.ca/758763. I'm lost from ideas what can I do more... :/
Comment 9 Michael Schumacher 2007-11-02 18:06:58 UTC
Created attachment 98402 [details]
drmingw output

Hm, seems to point towards gdk.
Comment 10 Sven Neumann 2007-11-04 10:56:16 UTC
Yes, looks a lot like a problem in the Windows GDK backend. Since we already tried everything to locate this problem in GIMP, it's probably about time to reassign this to GTK+. But in order to improve the chances that this will be fixed at some point, it would really help if someone could make an isolated test case.
Comment 11 Tor Lillqvist 2007-11-04 16:31:48 UTC
Please attach an original image (as JPEG or PNG) and exact instructions how to cause the bug.
Comment 12 Tor Lillqvist 2007-11-05 12:02:55 UTC
I can reproduce the crash. Seems to happen only when the ms-windows theme engine is used.

*** This bug has been marked as a duplicate of 399484 ***
Comment 13 paul 2007-11-05 12:44:29 UTC
i have all ms-win theme off. in gimp 2.4.1 bug still is present.
tested on image which i already send.
testpath:
1. start gimp
2. open jpeg file (attached as "orginal file which generated HSV recomposition error")
3. oryginal file: in menu->color->decompose choose HSV ("decompose to layers" checked)
4. decomposed file: in menu->color->recompose open dialog and drop down combobox and choose HSV
5. here comes big_bad_error ;)

it works every time
Comment 14 Marcin W. Dąbrowski 2007-11-05 13:15:11 UTC
(In reply to comment #12)
> Seems to happen only when the ms-windows theme engine is used.

Checked on SVG and pixmap engines - same story, plugin crashes every time.

> duplicate of 399484

Ok, moving there. :)
Comment 15 Tor Lillqvist 2007-11-05 13:58:21 UTC
> Checked on SVG and pixmap engines - same story, plugin crashes every time

Well, what if you don't use any theme engine at all? It doesn't crash then for me.

But with the ms-windows theme engine, I can reproduce the crash. I don't even have to open any particular image. Just create a new empty image with Control-N, do Colors:Components:Decompose..., choose "LAB", and then in the new image (called "L-2.0" typically in a freshly started GIMP) do Colors:Components:Compose... and choose "CMY" for instance from the combo box. Crash.