GNOME Bugzilla – Bug 746393
Gimp crashes when using color picker from color dialogs
Last modified: 2016-03-28 12:40:33 UTC
Reproduction steps: 1.Gimp working as non single mode under Windows 7 2.Open any image 3.Try to change color by selecting "Foreground & background" color panel 4.Popup appear 5.Put color : "5F99CF" into Html notation box 6.Click button to pick the correct color(next to html notation edit panel) 7.Cursor changes to color picker, gimps stops responding and crashes.
That button is for picking a color from anywhere on screen and completely unrelated to the HTML notation box, but of course GIMP shouldn't crash. There have been reports of this button not working in various ways on windows, but a crash has IIRC never been reported. Can anyone reproduce this?
I just provided my steps when this is happening. If there is any log file which can help you find out whats wrong I can attach it, just tell me where to look for. If you need any other information just let me know.
With my Gimp 2.8.6 on my Windows 7 64bit System, the color picker only returns 000000 but doesn't crash. I'll test it with 2.8.14 later.
I can partially confirm this (Win 8.1, 64 Bit, Gimp 2.8.14). For me it crashes not just by clicking on the Color picker, but clicking outside Gimp's window with the picker enabled. Inside the window it doesn't crash but always returns black (so it might be some kind of a permission problem or something?). The Color Picker Tool from the toolbox works as expected.
In Addition: I just attached the VS Debugger to it and that is what i got: First-chance exception at 0x00000000003DCE00 (libpixman-1-0.dll) in gimp-2.8.exe: 0xC0000005: Access violation reading location 0x000000002431E6EC Unhandled exception at 0x00000000003DCE00 (libpixman-1-0.dll) in gimp-2.8.exe: 0xC0000005: Access violation reading location 0x000000002431E6EC
I guess entering the color code it not precondition to reproduce this, though?
*is no
No - at least for me it is not. Maybe the title should be changed to "Gimp crashes when using Color Picker" or something like this.
Even with Gimp 2.8.14 on my Windows 7 64bit System, the color picker still only returns 000000 but it still doesn't crash.
Now hat you have answered I tried it again to be sure and without changing anything on my system, suddenly everything works. It doesn't crash and even returns the correct value inside and outside of gimp's window. Strange...
Oh well, and we have a million of windows bugs like this one. Until somebody comes along and debugs and fixes GIMP on windows, nothing will change. If you know any hacker that wants to use GIMP on windows properly, send them our way please.
Guys just tell me what kind of info do you want and I can try to provide it. Unfortunately I cannot debug it but If there is any log file or something I can find it and post it here.
Created attachment 302565 [details] my monitor setup I think I just found out what causes this bug to happen: I have a multi monitor setup with two monitors of different resolutions. In order to line them up I gave one of them a little offset in the windows display settings dialog. Now, whenever one of the monitors is disabled (via win+p) or set to "mirror", gimp doesn't crash when using the picker. On the other hand, there is a 100% guarantee for gimp to crash when I switch to "Extend Desktop" (or whatever this option is called in english, in german it is "Erweitern"). I think the problem is that gimp (or cairo/pixman) has problems with something in this setup. Maybe this results in negative coordinates or something which in the end lead to an out of range exception. I'm going to try and find the exact setting that causes the crash. I don't know whether it helps but this is the disassembly around the code, gimp crashes: 000000000224CDE4 shr r13d,2 000000000224CDE8 mov r8d,r13d 000000000224CDEB lea r10,[r8*4+4] 000000000224CDF3 xor r8d,r8d 000000000224CDF6 nop word ptr cs:[rax+rax] 000000000224CE00 mov r9d,dword ptr [rcx+r8] -->crash happens here - the value of r8 is 0 . 000000000224CE04 mov dword ptr [rax+r8],r9d 000000000224CE08 add r8,4 000000000224CE0C cmp r8,r10 000000000224CE0F jne 000000000224CE00
Ok, I think I found out what the exact problem (at least for me) is: As you can see in the previous attachment, my right monitor is my primary monitor. In this setup "Extend" leads to a crash. When I switch the option so that now my left monitor is the primary, everything works - even in extended mode. Another way to make it work is to simply switch positions of the monitors - so I think gimp has a problem with the primary monitor not being the most left monitor.
I can confirm this on with Gimp 2.8.14 and Windows 7 Professional SP1. Gimp crashes as soon as I use the color picker from the color dialog on the left monitor. I created the same setup with the right monitor as main monitor and a second on with the same resolution on the left. I've attached on old Visual Studio the process to get debug informations. I'm not sure this helps, is there a Gimp version with debugging symbols to get better results? The crash happens exactly at the same point then Simons crash: 0000000000A5CDE4 shr r13d,2 0000000000A5CDE8 mov r8d,r13d 0000000000A5CDEB lea r10,[r8*4+4] 0000000000A5CDF3 xor r8d,r8d 0000000000A5CDF6 nop word ptr cs:[rax+rax] -> 0000000000A5CE00 mov r9d,dword ptr [rcx+r8] 0000000000A5CE04 mov dword ptr [rax+r8],r9d 0000000000A5CE08 add r8,4 0000000000A5CE0C cmp r8,r10 0000000000A5CE0F jne 0000000000A5CE00 0000000000A5CE11 neg r13d The stack trace looks like this: > libpixman-1-0.dll!0000000000a5ce00() [Frames below may be incorrect and/or missing, no symbols loaded for libpixman-1-0.dll] libpixman-1-0.dll!0000000000a5cf95() libpixman-1-0.dll!00000000009d2641() libcairo-2.dll!0000000068de02bd() libcairo-2.dll!0000000068e165f2() libcairo-2.dll!0000000068e16a7e() libcairo-2.dll!0000000068e16b6a() libcairo-2.dll!0000000068dd5b61() libcairo-2.dll!0000000068de5d61() libcairo-2.dll!0000000068e19b10() libcairo-2.dll!0000000068ddd322() libcairo-2.dll!0000000068dd0809() libgimpwidgets-2.0-0.dll!00000000002f1e13() libgimpwidgets-2.0-0.dll!00000000002f20e3() libgtk-win32-2.0-0.dll!0000000000ca82bb() libgobject-2.0-0.dll!0000000063a45f8f() libgobject-2.0-0.dll!0000000063a56d23() libgobject-2.0-0.dll!0000000063a5da68() libgobject-2.0-0.dll!0000000063a5dea8() libgtk-win32-2.0-0.dll!0000000000db9d92() libgtk-win32-2.0-0.dll!0000000000ca6901() libgtk-win32-2.0-0.dll!0000000000ca6cbb() libgdk-win32-2.0-0.dll!000000006c37b85b() libglib-2.0-0.dll!00000000685f0ee3() libglib-2.0-0.dll!00000000685f10d8() libglib-2.0-0.dll!00000000685f1515() gimp-2.8.exe!00000000004017f7() gimp-2.8.exe!000000000071f65a() gimp-2.8.exe!00000000004013ce() gimp-2.8.exe!00000000004014c8() kernel32.dll!00000000773b59cd() ntdll.dll!00000000775eb891() And this is what VS outputs to the debug window: 'gimp-2.8.exe': Loaded 'C:\Program Files\GIMP 2\bin\gimp-2.8.exe', Binary was not built with debug information. 'gimp-2.8.exe': Loaded 'C:\Windows\System32\ntdll.dll' 'gimp-2.8.exe': Loaded 'C:\Windows\System32\kernel32.dll' 'gimp-2.8.exe': Loaded 'C:\Windows\System32\KernelBase.dll' 'gimp-2.8.exe': Loaded 'C:\Program Files\GIMP 2\bin\libgimpmodule-2.0-0.dll', Binary was not built with debug information. 'gimp-2.8.exe': Loaded 'C:\Program Files\GIMP 2\bin\libgimpbase-2.0-0.dll', Binary was not built with debug information. 'gimp-2.8.exe': Loaded 'C:\Windows\System32\msvcrt.dll' 'gimp-2.8.exe': Loaded 'C:\Program Files\GIMP 2\bin\libgio-2.0-0.dll', Binary was not built with debug information. 'gimp-2.8.exe': Loaded 'C:\Program Files\GIMP 2\bin\libgmodule-2.0-0.dll', Binary was not built with debug information. 'gimp-2.8.exe': Loaded 'C:\Program Files\GIMP 2\bin\libglib-2.0-0.dll', Binary was not built with debug information. 'gimp-2.8.exe': Loaded 'C:\Windows\System32\advapi32.dll' 'gimp-2.8.exe': Loaded 'C:\Windows\System32\sechost.dll' 'gimp-2.8.exe': Loaded 'C:\Windows\System32\rpcrt4.dll' 'gimp-2.8.exe': Loaded 'C:\Program Files\GIMP 2\bin\libintl-8.dll', Binary was not built with debug information. 'gimp-2.8.exe': Loaded 'C:\Windows\System32\ole32.dll' 'gimp-2.8.exe': Loaded 'C:\Windows\System32\gdi32.dll' 'gimp-2.8.exe': Loaded 'C:\Windows\System32\user32.dll' 'gimp-2.8.exe': Loaded 'C:\Windows\System32\lpk.dll' 'gimp-2.8.exe': Loaded 'C:\Windows\System32\usp10.dll' 'gimp-2.8.exe': Loaded 'C:\Windows\System32\shell32.dll' 'gimp-2.8.exe': Loaded 'C:\Windows\System32\shlwapi.dll' 'gimp-2.8.exe': Loaded 'C:\Windows\System32\winmm.dll' 'gimp-2.8.exe': Loaded 'C:\Windows\System32\ws2_32.dll' 'gimp-2.8.exe': Loaded 'C:\Windows\System32\nsi.dll' 'gimp-2.8.exe': Loaded 'C:\Program Files\GIMP 2\bin\libgobject-2.0-0.dll', Binary was not built with debug information. 'gimp-2.8.exe': Loaded 'C:\Program Files\GIMP 2\bin\libffi-6.dll', Binary was not built with debug information. 'gimp-2.8.exe': Loaded 'C:\Windows\System32\dnsapi.dll' 'gimp-2.8.exe': Loaded 'C:\Windows\System32\IPHLPAPI.DLL' 'gimp-2.8.exe': Loaded 'C:\Windows\System32\winnsi.dll' 'gimp-2.8.exe': Loaded 'C:\Program Files\GIMP 2\bin\zlib1.dll', Binary was not built with debug information. 'gimp-2.8.exe': Loaded 'C:\Program Files\GIMP 2\bin\libgimpthumb-2.0-0.dll', Binary was not built with debug information. 'gimp-2.8.exe': Loaded 'C:\Program Files\GIMP 2\bin\libgdk_pixbuf-2.0-0.dll', Binary was not built with debug information. 'gimp-2.8.exe': Loaded 'C:\Program Files\GIMP 2\bin\libjasper-1.dll', Binary was not built with debug information. 'gimp-2.8.exe': Loaded 'C:\Program Files\GIMP 2\bin\libjpeg-8.dll', Binary was not built with debug information. 'gimp-2.8.exe': Loaded 'C:\Program Files\GIMP 2\bin\libpng16-16.dll', Binary was not built with debug information. 'gimp-2.8.exe': Loaded 'C:\Program Files\GIMP 2\bin\libtiff-5.dll', Binary was not built with debug information. 'gimp-2.8.exe': Loaded 'C:\Program Files\GIMP 2\bin\liblzma-5.dll', Binary was not built with debug information. 'gimp-2.8.exe': Loaded 'C:\Program Files\GIMP 2\bin\libgimpwidgets-2.0-0.dll', Binary was not built with debug information. 'gimp-2.8.exe': Loaded 'C:\Program Files\GIMP 2\bin\libgimpcolor-2.0-0.dll', Binary was not built with debug information. 'gimp-2.8.exe': Loaded 'C:\Program Files\GIMP 2\bin\libcairo-2.dll', Binary was not built with debug information. 'gimp-2.8.exe': Loaded 'C:\Windows\System32\msimg32.dll' 'gimp-2.8.exe': Loaded 'C:\Program Files\GIMP 2\bin\libgcc_s_seh-1.dll', Binary was not built with debug information. 'gimp-2.8.exe': Loaded 'C:\Program Files\GIMP 2\bin\libfontconfig-1.dll', Binary was not built with debug information. 'gimp-2.8.exe': Loaded 'C:\Program Files\GIMP 2\bin\libfreetype-6.dll', Binary was not built with debug information. 'gimp-2.8.exe': Loaded 'C:\Program Files\GIMP 2\bin\libxml2-2.dll', Binary was not built with debug information. 'gimp-2.8.exe': Loaded 'C:\Program Files\GIMP 2\bin\libpixman-1-0.dll', Binary was not built with debug information. 'gimp-2.8.exe': Loaded 'C:\Program Files\GIMP 2\bin\libgimpconfig-2.0-0.dll', Binary was not built with debug information. 'gimp-2.8.exe': Loaded 'C:\Program Files\GIMP 2\bin\libgimpmath-2.0-0.dll', Binary was not built with debug information. 'gimp-2.8.exe': Loaded 'C:\Program Files\GIMP 2\bin\libgdk-win32-2.0-0.dll', Binary was not built with debug information. 'gimp-2.8.exe': Loaded 'C:\Windows\System32\imm32.dll' 'gimp-2.8.exe': Loaded 'C:\Windows\System32\msctf.dll' 'gimp-2.8.exe': Loaded 'C:\Program Files\GIMP 2\bin\libpango-1.0-0.dll', Binary was not built with debug information. 'gimp-2.8.exe': Loaded 'C:\Program Files\GIMP 2\bin\libpangocairo-1.0-0.dll', Binary was not built with debug information. 'gimp-2.8.exe': Loaded 'C:\Program Files\GIMP 2\bin\libpangoft2-1.0-0.dll', Binary was not built with debug information. 'gimp-2.8.exe': Loaded 'C:\Program Files\GIMP 2\bin\libharfbuzz-0.dll', Binary was not built with debug information. 'gimp-2.8.exe': Loaded 'C:\Program Files\GIMP 2\bin\libpangowin32-1.0-0.dll', Binary was not built with debug information. 'gimp-2.8.exe': Loaded 'C:\Program Files\GIMP 2\bin\libgtk-win32-2.0-0.dll', Binary was not built with debug information. 'gimp-2.8.exe': Loaded 'C:\Windows\winsxs\amd64_microsoft.windows.common-controls_6595b64144ccf1df_5.82.7601.18201_none_a4d3b9377117c3df\comctl32.dll' 'gimp-2.8.exe': Loaded 'C:\Windows\System32\comdlg32.dll' 'gimp-2.8.exe': Loaded 'C:\Windows\System32\winspool.drv' 'gimp-2.8.exe': Loaded 'C:\Program Files\GIMP 2\bin\libatk-1.0-0.dll', Binary was not built with debug information. 'gimp-2.8.exe': Loaded 'C:\Program Files\GIMP 2\bin\libbabl-0.1-0.dll', Binary was not built with debug information. 'gimp-2.8.exe': Loaded 'C:\Program Files\GIMP 2\bin\libgegl-0.2-0.dll', Binary was not built with debug information. 'gimp-2.8.exe': Loaded 'C:\Program Files\GIMP 2\bin\libgthread-2.0-0.dll', Binary was not built with debug information. 'gimp-2.8.exe': Loaded 'C:\Windows\System32\cryptbase.dll' 'gimp-2.8.exe': Loaded 'C:\Windows\System32\uxtheme.dll' 'gimp-2.8.exe': Loaded 'C:\Windows\winsxs\amd64_microsoft.windows.common-controls_6595b64144ccf1df_6.0.7601.17514_none_fa396087175ac9ac\comctl32.dll' 'gimp-2.8.exe': Loaded 'C:\Windows\System32\oleaut32.dll' 'gimp-2.8.exe': Loaded 'C:\Windows\System32\setupapi.dll' 'gimp-2.8.exe': Loaded 'C:\Windows\System32\cfgmgr32.dll' 'gimp-2.8.exe': Loaded 'C:\Windows\System32\devobj.dll' 'gimp-2.8.exe': Loaded 'C:\Windows\System32\clbcatq.dll' 'gimp-2.8.exe': Loaded 'C:\Windows\System32\propsys.dll' 'gimp-2.8.exe': Loaded 'C:\Windows\System32\ntmarta.dll' 'gimp-2.8.exe': Loaded 'C:\Windows\System32\Wldap32.dll' 'gimp-2.8.exe': Loaded 'C:\Windows\System32\profapi.dll' 'gimp-2.8.exe': Loaded 'C:\Windows\System32\winhttp.dll' 'gimp-2.8.exe': Loaded 'C:\Windows\System32\webio.dll' 'gimp-2.8.exe': Loaded 'C:\Windows\System32\sspicli.dll' 'gimp-2.8.exe': Loaded 'C:\Windows\System32\credssp.dll' 'gimp-2.8.exe': Loaded 'C:\Program Files\GIMP 2\lib\gtk-2.0\2.10.0\engines\libwimp.dll', Binary was not built with debug information. 'gimp-2.8.exe': Loaded 'C:\Windows\System32\dwmapi.dll' 'gimp-2.8.exe': Loaded 'C:\Windows\System32\mscms.dll' 'gimp-2.8.exe': Loaded 'C:\Windows\System32\userenv.dll' 'gimp-2.8.exe': Loaded 'C:\Windows\System32\icm32.dll' 'gimp-2.8.exe': Loaded 'C:\Windows\System32\shfolder.dll' 'gimp-2.8.exe': Loaded 'C:\Windows\System32\mswsock.dll' 'gimp-2.8.exe': Loaded 'C:\Windows\System32\apphelp.dll' 'gimp-2.8.exe': Loaded 'C:\Program Files\GIMP 2\lib\gimp\2.0\modules\libdisplay-filter-lcms.dll', Binary was not built with debug information. 'gimp-2.8.exe': Loaded 'C:\Program Files\GIMP 2\bin\liblcms2-2.dll', Binary was not built with debug information. 'gimp-2.8.exe': Loaded 'C:\Program Files\GIMP 2\lib\gimp\2.0\modules\libcolor-selector-cmyk.dll', Binary was not built with debug information. 'gimp-2.8.exe': Loaded 'C:\Program Files\GIMP 2\lib\gimp\2.0\modules\libcolor-selector-water.dll', Binary was not built with debug information. 'gimp-2.8.exe': Loaded 'C:\Program Files\GIMP 2\lib\gimp\2.0\modules\libcolor-selector-wheel.dll', Binary was not built with debug information. The thread 'Win64 Thread' (0x1f14) has exited with code 0 (0x0). First-chance exception at 0x00a5ce00 in gimp-2.8.exe: 0xC0000005: Access violation reading location 0x000000002b0885a8. Unhandled exception at 0x00a5ce00 in gimp-2.8.exe: 0xC0000005: Access violation reading location 0x000000002b0885a8.
Thanks guy this is very helpful :) Can one of our windows experts please explain how to get a prooper stack trace with symbol information, so we can track this down?
Created attachment 302588 [details] callstack Is this what you need? I used Windbg as supposed in a dev-mail from oct. 2011. Unfortunately I don't really know how to use it yet as I just installed it a few minutes ago.
Yes that's what we need, preferrably with line numbers instead of address offsets. But this stack trace has gimp_path_editor_set_dir_writable and can't be related to this bug.
Created attachment 302630 [details] debugger Hmm, that is strange. The callstack from above is from the only thread that was really doing something (gimp's main thread) at the time of the crash. And a double click on the last call in the callstack i posted before (libpixman_1_0!pixman_implementation_create_mmx+0x22830) leads me directly to the line "mov r9d,dword ptr [rcx+r8]" in the disassembly. Unfortunately I can't provide you with line numbers because I have no Debug information and can't build gimp with debug symbols. All the function names in the callstack from above are taken from the exported symbols the respective library from the official 2.8.14 build provides. It would be nice if someone who can actually build gimp for windows with debug symbols could help out.
Indeed, we really need builds with debug information to make this kind of bugs fixable at all. As to the weird funcions in the trace, such cases of "impossible" stack traces usually indicate stack memory corruption.
I now managed to build at least gimp with debug symbols but I still have to find out how this works for cairo. My new stacktrace looks like this: (gdb) backtrace
+ Trace 235039
I will report back when I was able to compile cairo with debug symbols.
Ok, I now compiled gimp, babl, cairo, gegl and pixman from their respective git master and this is the stacktrace I got: (gdb) backtrace
+ Trace 235040
Seems we have two identical bugs with identical stack traces, resolving as duplicate. *** This bug has been marked as a duplicate of bug 740634 ***
Should i post my Stacktrace with proper Line numbers over there, then?
Yes please, attach it there.