GNOME Bugzilla – Bug 162742
winicon save plug-in crashes on "8 bpp, 1-bit alpha, 256-slot palette"
Last modified: 2018-02-05 14:08:37 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.
I can reproduce the crash here. I don't understand however why the plug-in should not offer to save in this particular format.
SaveICO (filename=0x8056e60 "/home/sven/foo.ico", image=1) at icosave.c:361 361 palette[i * 4 + 2] = cmap[i * 3];
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.
The plug-in crashed.
*** Bug 165337 has been marked as a duplicate of this bug. ***
*** Bug 166645 has been marked as a duplicate of this bug. ***
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).
*** Bug 168956 has been marked as a duplicate of this bug. ***
*** Bug 168971 has been marked as a duplicate of this bug. ***
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
(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(+)