GNOME Bugzilla – Bug 141841
GIMP crashes in the "Save Image" dialog box
Last modified: 2004-07-31 21:55:44 UTC
I load an image, make some changes, and choose "Save as..." to save it to a different file. In the "Save Image" dialog box, I double-click on a directory name, and this error window pops up: GLib-ERROR **: gmem.c:140: failed to allocate 2147483649 bytes aborting... Dismissing that, I get another: Microsoft Visual C++ Runtime Library Runtime Error! Program: C:\Program Files\GIMP-2.0\bin\gimp-2.0.exe The application has requested the Runtime to terminate it in an unusual way. Please contact the application's support team for more information. Dismissing that, the GIMP terminates without giving me a chance to save my work. This problem is repeatable: I follow the same sequence of actions and I always get the same behaviour.
Sounds like a problem in GtkFileSel but before we reassing the report, we need some more information. Is it lways the same directory name you click on? Did you try other folders?
This does not happen with all directories, but seems to happen with a specific directory, with which the "Open Image" dialog box also crashes. I suspected it to be a problem related to Korean characters in the filenames, but it worked all right when I tried other directories which had files with Korean-character filenames.
This looks like a duplicate of bug 141124. If you could specify the exact directory names under which you get the crash to occur, it may prove useful in debugging this problem.
Yes, it seems like a duplicate of bug 141124. I get the same problem with Open File dialog. I was lucky to be able to pick out a single filename that causes this problem. I'm using a Korean version of Windows XP, whose native codepage is 949. The filename is "미현.rtf", which is [b9 cc c7 f6 2e 72 74 66] in the native code page. When I deleted the file from the directory and tried again, GIMP did not crash. I hope this may help with debugging.
A follow-up to the previous comment: the "&#xxx;" stuffs in the filename are not exactly what I entered. I entered two Korean letters, and since they could not be represented in the ISO-8859-1 character set, they were sent encoded as such. It should be clear from the hexadecimal codes anyway.
What locale is the user using at all? Is it an UTF-8 locale? Are the G_BROKEN_FILENAMES or G_FILENAME_ENCODING environment variables set at all?
Neither do I know what G_BROKEN_FILENAMES or G_FILENAME_ENCODING environment variables are, nor could I see any of them listed in the output of "set" command in the Windows command prompt. I don't know how I can check which locale is in use in Windows XP, but I can see that code page 949 is in use when I type the "chcp" command. Is it the information that is needed? (AFAIK the Korean version of Windows uses a locale that is a superset of EUC-KR -- at least the encoding used for filenames is so.)
Well, if you are not using UTF-8 for your filenames you need to tell GTK+ applications about that. If you are using gtk+-2.4, please set G_FILENAME_ENCODING to whatever encoding you are using. That should fix your problem.
*** This bug has been marked as a duplicate of 141124 ***
Ignore the comments about G_BROKEN_FILENAMES and G_FILENAME_ENCODING. These are not used on Windows, as filenames are always encoded (when using the "normal" C library API) in the system codepage.