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 162742 - winicon save plug-in crashes on "8 bpp, 1-bit alpha, 256-slot palette"
winicon save plug-in crashes on "8 bpp, 1-bit alpha, 256-slot palette"
Status: RESOLVED FIXED
Product: GIMP
Classification: Other
Component: Plugins
2.2.x
Other All
: Normal normal
: 2.2
Assigned To: GIMP Bugs
GIMP Bugs
: 165337 166645 168956 168971 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2005-01-02 20:21 UTC by Mukund Sivaraman
Modified: 2018-02-05 14:08 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Mukund Sivaraman 2005-01-02 20:21:35 UTC
I'm using a local compiled GIMP version 2.2.0. dindinx in #gimp reproduced this
using current CVS.

Steps to reproduce:

1. Create 16x16 RGB image filled with background color
2. Save as .ico
3. Select "8 bpp, 1-bit alpha, 256-slot palette"

The plug-in will terminate.

The option "8 bpp, 1-bit alpha, 256-slot palette" should not be displayed in
this case for the image type.
Comment 1 Sven Neumann 2005-01-03 10:24:18 UTC
I can reproduce the crash here. I don't understand however why the plug-in
should not offer to save in this particular format.
Comment 2 Sven Neumann 2005-01-03 10:35:10 UTC
SaveICO (filename=0x8056e60 "/home/sven/foo.ico", image=1) at icosave.c:361
361           palette[i * 4 + 2] = cmap[i * 3];
Comment 3 Mukund Sivaraman 2005-01-03 13:29:44 UTC
Sven: I thought the plug-in quit, but didn't crash out. If it quit cause it
didn't like that option "8 bpp, 1-bit alpha, 256-slot palette", then it should
unlist that option.

If it crashed out, then it should be fixed instead.

Comment 4 Sven Neumann 2005-01-03 20:00:51 UTC
The plug-in crashed.
Comment 5 weskaggs 2005-01-26 22:06:08 UTC
*** Bug 165337 has been marked as a duplicate of this bug. ***
Comment 6 Sven Neumann 2005-02-08 13:03:19 UTC
*** Bug 166645 has been marked as a duplicate of this bug. ***
Comment 7 Sven Neumann 2005-02-08 13:41:41 UTC
2005-02-08  Sven Neumann  <sven@gimp.org>

	* plug-ins/winicon/icosave.c (ico_image_get_reduced_buf): fixed
	bug in save routine for 256-slot palette (bug #162742).
Comment 8 Manish Singh 2005-03-02 09:14:04 UTC
*** Bug 168956 has been marked as a duplicate of this bug. ***
Comment 9 Manish Singh 2005-03-02 18:28:26 UTC
*** Bug 168971 has been marked as a duplicate of this bug. ***
Comment 10 kat.amsterdam 2018-02-05 12:36:15 UTC
There is a regression bug in 2.9 that shows this exact behavior on the Windows 7 development version.

Steps to reproduce.

Download the Cisco Favicon from their website
https://www.cisco.com/web/fw/i/logo-open-graph.gif

Open it in Gimp 2.9

Choose. File... Export...

change the name to

cisco.ico

Click Export

Leave PNG Compression unchecked.

Choose any of the export options
1bpb 
4bpb
8bpb
24bpb
32bpb

Crash

(gimp-2.9.exe:9856): GLib-GIO-CRITICAL **: g_content_type_is_a: assertion 'supertype != NULL' failed

(gimp-2.9.exe:9856): LibGimpBase-WARNING **: gimp-2.9.exe: gimp_wire_read(): error
plug-in 'file-ico.exe' aborted before sending its procedure return values
Comment 11 Jehan 2018-02-05 14:08:37 UTC
(In reply to kat.amsterdam from comment #10)
> There is a regression bug in 2.9 that shows this exact behavior on the
> Windows 7 development version.
> […]

Hello,

I encountered some plug-in crash with your steps indeed, though the errors were different here. Anyway I fixed what looked to be the problem in my case. Could you test last master code?

If that didn't fix your crash, please do not try to revive a 10+ year old bug report anymore. Just open a new bug report with the bug information. Thanks! ;-)

commit 42eaf588fde9d44d6b7ccd9cdb7eacfab35fe210 (HEAD -> master, origin/master, origin/HEAD)
Author: Jehan <jehan@girinstud.io>
Date:   Mon Feb 5 15:00:17 2018 +0100

    plug-ins: ico export crashes on indexed images.
    
    It seems the current code simply forgot to break on indexed types and
    therefore hit some g_return_*if_reached() code breaking the logics.
    Looking further, I see some code taking care of indexed images and
    converting them to RGB. And testing after adding breaks looks like it
    works just fine.
    So I am assuming this was just forgotten breaks indeed, and not on
    purpose not allowing indexed images (if that were the intent though,
    this is not how it should be done).

 plug-ins/file-ico/ico-dialog.c | 1 +
 plug-ins/file-ico/ico-save.c   | 5 +++++
 2 files changed, 6 insertions(+)