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 623563 - Text tool crashes Gimp (get_impl_drawable)
Text tool crashes Gimp (get_impl_drawable)
Status: RESOLVED FIXED
Product: gtk+
Classification: Platform
Component: Backend: Win32
2.20.x
Other Windows
: Normal major
: ---
Assigned To: gtk-win32 maintainers
gtk-bugs
: 623479 623791 624099 624992 625158 625352 625733 626157 629276 629892 636785 Miguelator 644022 653100 659903 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2010-07-05 02:01 UTC by Rick Yorgason
Modified: 2012-01-08 02:17 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
GIMP initial error screen (82.02 KB, image/jpeg)
2010-07-05 22:31 UTC, Amanda
Details
Detail report from Microsoft when GIMP crashes (38.77 KB, image/jpeg)
2010-07-05 22:32 UTC, Amanda
Details
Partially drawn toolbar in GIMP (3.35 KB, image/png)
2011-12-17 15:03 UTC, Jernej Simončič
Details

Description Rick Yorgason 2010-07-05 02:01:45 UTC
Running on Windows Vista x64, Gimp 2.7.1 crashes whenever I try to use the text tool.  This is a different crash than Bug #575866 ("Assertion fail (font finalize) pango win32") which crashes version 2.7.0 with the exact same reproduction recipe, but gives a different error message.

Step to reproduce:

1) Select the text tool.
2) Click on the canvas.

Actual results:

Gimp crashes with a standard Windows error popup ("The application has requested the Runtime to terminate in an unusual way.  Blah blah blah.") and the following error is printed in the console:

Gdk:ERROR:gdkgc-win32.c:751:get_impl_drawable: code should not be reached

Note: Unlike bug #575866, which didn't crash immediately if you selected certain fonts (e.g. Courier, which didn't crash until you tried to type a character) it looks like this bug always crashes as soon as you left-click on the canvas, no matter which font you have selected.
Comment 1 Michael Schumacher 2010-07-05 12:25:40 UTC
*** Bug 623479 has been marked as a duplicate of this bug. ***
Comment 2 Amanda 2010-07-05 22:31:03 UTC
Created attachment 165317 [details]
GIMP initial error screen

This is the first error message when I click on the canvas with the text tool (any font, any file).
Comment 3 Amanda 2010-07-05 22:32:15 UTC
Created attachment 165318 [details]
Detail report from Microsoft when GIMP crashes

After the initial error screen this is the detail report for the crash.  I couldn't expand the box so I tried to get the info I thought was important...
Comment 4 Amanda 2010-07-05 22:33:55 UTC
I'm having the same issue.  See attachments above to see what happens on my computer and to view the detail report from the crash (as best I could).  The file it says is having issues: 

  Application Version:	2.7.1.0
  Application Timestamp:	4c29b579
  Fault Module Name:	libglib-2.0-0.dll
  Fault Module Version:	2.24.1.0
  Fault Module Timestamp:	4c07b57b
  Exception Code:	40000015
  Exception Offset:	000000000004c72a

I'm on Win7 Home Premium, 64-bit.
Comment 5 Michael Schumacher 2010-07-08 05:41:27 UTC
*** Bug 623791 has been marked as a duplicate of this bug. ***
Comment 6 Michael Schumacher 2010-07-10 13:48:27 UTC
I can't reproduce this with my own git master build on XP SP3.
Comment 7 Rick Yorgason 2010-07-10 14:37:30 UTC
If it makes any difference, I was using the gimp-win build at http://sourceforge.net/projects/gimp-win/files/GIMP%20%2B%20GTK%2B%20%28development%20rel.%29/GIMP%202.7.1/.
Comment 8 LightningIsMyName 2010-07-10 17:49:26 UTC
I believe I found a possible reason for this bug - the transparent canvas overlay widgets. To check my intuition I tried some other tools which use the canvas overlays (Curves tool in full-screen mode) and I got exactly the same error message... (Using the 2.7.1 build from gimp-win at sourceforge)

I'll try to build the master on windows and check again.
Comment 9 Michael Schumacher 2010-07-10 19:05:11 UTC
Looks like this is caused by the ms-windows theme of GTK+. It does not happen if you don't use this theme engine - the price is an ugly UI, of course.
Comment 10 Amanda 2010-07-11 10:55:40 UTC
(In reply to comment #6)
> I can't reproduce this with my own git master build on XP SP3.

It seems to be a Vista/Win7 issue, as that's what I run, as does Rick Yorgason.
Comment 11 Amanda 2010-07-11 10:57:13 UTC
(In reply to comment #9)
> Looks like this is caused by the ms-windows theme of GTK+. It does not happen
> if you don't use this theme engine - the price is an ugly UI, of course.

So for those of us who run windows...  and aren't familiar with compiling this ourselves (yes, it's sad, but true), is there a way to get it to work?  Right now I'm using gimp 2.6.8 (or the one before 2.6.9 because that one crashes with the font tool for other reasons).  I can keep using it until the issue is fixed, but I was just wondering.
Comment 12 Michael Schumacher 2010-07-11 13:00:29 UTC
*** Bug 624099 has been marked as a duplicate of this bug. ***
Comment 13 Martin Nordholts 2010-07-12 13:10:48 UTC
Michael, if it's a bug in the GTK+ theme engine, could you add relevant info to this bug report so we can move it to GTK+?
Comment 14 Michael Schumacher 2010-07-12 14:51:54 UTC
I guess that's just the GTK+ version, everything else should already be mentioned here. 

Reassigning to gtk+.
Comment 15 Rick Yorgason 2010-07-19 00:20:00 UTC
(In reply to comment #11)
> So for those of us who run windows...  and aren't familiar with compiling this
> ourselves (yes, it's sad, but true), is there a way to get it to work?

In the etc directory in your Gimp installation, edit the gtkrc file and replace 'MS-Windows' with 'Tango'.  Seems to fix the crash for me.
Comment 16 Tor Lillqvist 2010-07-19 05:42:38 UTC
He means the gtkrc file in the etc\gtk-2.0 folder. Note that it is a plain text file, don't attempt to edit it with Word or something like that, and that its name indeed does not have any extension ("type"), its name is just "gtkrc".

Anyway, replacing "MS-Windows" with "Tango" is pointless as Tango isn't a theme, but an icon theme. That is a different thing. It is wrong and ineffective to put an icon theme name as the gtk-theme-name setting. (And, as far as I know the GIMP installer doesn't even come with the Tango icon theme.) Just commenting out the gtk-theme-name line, or using whatever random bogus theme name instead of MS-Windows, would have the same effect: The default gtk theme gets used.
Comment 17 Tor Lillqvist 2010-07-19 05:51:47 UTC
Rick, are you running the 32- or 64-bit GIMP?

What version of GTK+ is 2.7.1 shipped with?
Comment 18 Rick Yorgason 2010-07-19 21:57:43 UTC
I'm running the 64-bit version.  I'm not certain which version of GTK+ is shipped with 2.7.1, but my best guess is 2.10.0.  This guess is based on the fact that there's a folder named 'lib\gtk-2.0\2.10.0'.  Is there a better way to find the version?
Comment 19 Rick Yorgason 2010-07-19 22:08:44 UTC
Oh, just to be clear, 2.7.1 appears to be shipped with a 64-bit and 32-bit version, so it should automatically install the 64-bit version if you're running a 64-bit version of Windows.  I just double-checked with the dumpbin tool, and it did indeed install the 64-bit version on my machine.
Comment 20 Tor Lillqvist 2010-07-19 22:20:37 UTC
No, the name of the lib\gtk-2.0\2.10.0 folder does not indicate the version of GTK+. Check the Properties of libgtk-win32-2.0-0.dll, it should tell what version it is. Or run gimp with the -v command-line option.
Comment 21 Rick Yorgason 2010-07-19 22:24:59 UTC
Thanks; it's 2.20.1.
Comment 22 Michael Schumacher 2010-07-22 18:26:33 UTC
*** Bug 624992 has been marked as a duplicate of this bug. ***
Comment 23 Michael Schumacher 2010-07-24 08:54:31 UTC
*** Bug 625158 has been marked as a duplicate of this bug. ***
Comment 24 Michael Schumacher 2010-07-26 21:33:42 UTC
*** Bug 625352 has been marked as a duplicate of this bug. ***
Comment 25 Michael Schumacher 2010-07-31 22:26:48 UTC
*** Bug 625733 has been marked as a duplicate of this bug. ***
Comment 26 Aneesh Nandam 2010-07-31 22:51:36 UTC
What more information is needed other than the libgtk-win32-2.0-0.dll version number? It's 2.20.1 on my installation as well. I'm also having this problem on Windows 7 x64.
Comment 27 Jim Michaels 2010-08-01 03:32:33 UTC
I am on windows XP SP3 32-bit.  same error as was stated originally.
Comment 28 Aneesh Nandam 2010-08-01 19:40:01 UTC
I'm setting up cygwin with MinGW in an attempt to recompile GIMP 2.7.1 from source and see if I still have problems...I've never compiled from source in Windows, and it's a huge pain. I can't find any documentation on how to compile GIMP in windows, so any tips would be nice. I've been working off of a guide to compiling Pidgin in windows.
Comment 29 Tor Lillqvist 2010-08-02 05:55:56 UTC
You need to work on your googling skills then. I found several tutorials on building GIMP with MinGW. Of course, none of them is proably really up-to-date, very little on the web is. But then, part of the skills necessary in programming is to be able to adapt to changes.

Anyway, if you have never built anything at all with MinGW before, or you have never built anything that uses a configure script and makefiles, then you need to start your training with something simpler than GIMP.

Also, do avoid mixing Cygwin and MinGW.

Cygwin is not required to build GIMP on Windows, and in fact, especially if you are new to building software like GIMP on Windows, mixing Cygwin and MinGW will just lead to strange errors and confusion. (Just one example of potential confusion:  note that the GTK+ stack for Cygwin that is officialy available for Cygwin uses an *X11* backend, i.e. it requires an X11 server to run GUI programs, i.e. not at all the same as with GIMP for Windows.) Cygwin should be seen as a completely separate operating system that just happens to run on top of Windows. Code built for Cygwin and code built for Windows (with MinGW, or Microsoft's compiler, or other Windows compilers) are different kinds of beasts.

Anyway, as the actual error messages here comes from the GTK+ library, not GIMP, you would need to build the whole GTK+ stack for debugging, not just GIMP.
Comment 30 Aneesh Nandam 2010-08-03 02:50:55 UTC
I see, well I set up a Lubuntu virtual machine and installed MinGW to cross compile on that system. I was able to compile babl, gegl, and gimp, but I don't really understand what I need to do to cross compile for windows. Any tips on that would be helpful.

But then again, you did say error messages from the GTK+ library are needed, so I guess it's more work then just that.
Comment 31 blogmonkeyh 2010-08-03 15:14:10 UTC
why are you doing this, if you try to build the gimp yourself would more errors occur from that? Also i found a file that comes with the gimp 2.7.1 source telling how to build the gimp. i wish i knew the name of it, but i have forgotten. it has no file extension, so that might help you find it.
Comment 32 Michael Schumacher 2010-08-06 07:30:47 UTC
*** Bug 626157 has been marked as a duplicate of this bug. ***
Comment 33 LightningIsMyName 2010-09-17 06:48:02 UTC
*** Bug 629892 has been marked as a duplicate of this bug. ***
Comment 34 Michael Natterer 2010-10-29 16:28:18 UTC
*** Bug 629276 has been marked as a duplicate of this bug. ***
Comment 35 Michael Schumacher 2010-12-08 16:01:55 UTC
*** Bug 636785 has been marked as a duplicate of this bug. ***
Comment 36 Michael Schumacher 2011-01-16 22:35:58 UTC
*** Bug 639676 has been marked as a duplicate of this bug. ***
Comment 37 Tobias Mueller 2011-03-04 17:28:28 UTC
Reopening as the information requested in comment 17 has been provided.
Comment 38 Michael Schumacher 2011-03-20 18:36:18 UTC
*** Bug 644022 has been marked as a duplicate of this bug. ***
Comment 39 Michael Schumacher 2011-06-21 18:17:51 UTC
*** Bug 653100 has been marked as a duplicate of this bug. ***
Comment 40 trlkly 2011-08-30 11:35:43 UTC
I cannot reproduce this bug on the partha.com unnofficial Win32 build of 2.7.3 (2011-08-06), despite using the MS-Windows theme. This bug may be OBSOLETE.

If anyone wants to confirm, note that the appropriate file to change is in etc\gimp\2.0, as there is no gtk folder.
Comment 41 trlkly 2011-08-30 11:54:36 UTC
Update on the above: however, adding the option does not seem to actually modify the theme, so I may have spoke too soon.
Comment 42 Michael Schumacher 2011-09-23 21:10:00 UTC
*** Bug 659903 has been marked as a duplicate of this bug. ***
Comment 43 msdobrescu@gmail.com 2011-09-26 07:05:46 UTC
Hello,

I have the same problem on Gimp 2.7.3 on Windows 7 x64 Enterprise.

Problem signature:
  Problem Event Name:	APPCRASH
  Application Name:	gimp-2.7.exe
  Application Version:	2.7.3.0
  Application Timestamp:	4e5bf19f
  Fault Module Name:	libglib-2.0-0.dll
  Fault Module Version:	2.28.8.0
  Fault Module Timestamp:	4e20a38e
  Exception Code:	40000015
  Exception Offset:	000000000005113d
  OS Version:	6.1.7601.2.1.0.256.4
  Locale ID:	1033
  Additional Information 1:	ddc0
  Additional Information 2:	ddc026eda8dbd72e642fcebf560e68bc
  Additional Information 3:	71d5
  Additional Information 4:	71d5603b5ffc96217f4e3353a529b83c

Read our privacy statement online:
  http://go.microsoft.com/fwlink/?linkid=104288&clcid=0x0409

If the online privacy statement is not available, please read our privacy statement offline:
  C:\Windows\system32\en-US\erofflps.txt
Comment 44 Thomas Winwood 2011-12-14 12:11:28 UTC
This bug still affects Partha's build of GIMP 2.7.4 (using libwimp.dll from GTK+ 2.24.8).

D:\Applications\GIMP\bin>gimp-console-2.7.exe -v
GNU Image Manipulation Program version 2.7.4
git-describe: Unknown, shouldn't happen

using GEGL version 0.1.9 (compiled against version 0.1.9)
using GLib version 2.30.2 (compiled against version 2.30.2)
using GdkPixbuf version 2.24.0 (compiled against version 2.24.0)
using Pango version 1.29.4 (compiled against version 1.29.4)
using Fontconfig version 2.8.0 (compiled against version 2.8.0)
using Cairo version 1.10.2 (compiled against version 1.10.2)
Comment 45 Michael Natterer 2011-12-14 12:37:10 UTC
What GTK+ version is this? You don't just copy libwimp.dll around, do you?
Comment 46 Jim Michaels 2011-12-15 03:02:49 UTC
this is from:
https://sourceforge.net/projects/gimp-win/files/GIMP%20%2B%20GTK%2B%20%28development%20rel.%29/GIMP%202.7.1/
I am going to try to contact the developer about this.  I usually get no responses from this person.  he's the guy who develops the windows version of GIMP listed on gimp.org.
Comment 47 Jim Michaels 2011-12-15 03:14:25 UTC
https://sourceforge.net/users/jernejs/ is the developer of the windows version of GIMP.
Comment 48 Jernej Simončič 2011-12-15 13:56:44 UTC
I can confirm that this bug still affects GTK+ 2.24.8 (from the OpenSuSE repository - specific version mingw32-gtk2-2.24.8-1.5.noarch.rpm). Tested both 32 and 64-bit versions, on Windows XP (32-bit, Zune theme) and Windows 7 (32 and 64-bit, with classic and Aero themes) when gtkwimp engine is in use.

Gdk:ERROR:gdkgc-win32.c:753:get_impl_drawable: code should not be reached

Also, I'm not a developer of GIMP on Windows - I only provide the installer. I do respond to pretty much every e-mail I receive, however if you send me a message through SourceForge, they nearly always reject the reply with "User does not exist" - this is not something I can fix.
Comment 50 Jernej Simončič 2011-12-17 15:03:00 UTC
Created attachment 203729 [details]
Partially drawn toolbar in GIMP

I can confirm that GIMP doesn't crash anymore, but the floating toolbar that appears doesn't always draw properly - see attached image.
Comment 51 Michael Natterer 2012-01-08 02:17:41 UTC
Please open a new bug for the new problem.