GNOME Bugzilla – Bug 56837
ICO loader crash - assert
Last modified: 2010-07-10 04:05:42 UTC
hi this is duplicate of GdkPixbuf bug in ximian's bugzilla http://bugzilla.ximian.com/show_bug.cgi?id=2065 i was not sure if someone is watching there so i copied that here gtk+ HEAD from today here is the assert and i'll attach the image (its also in the URL) Visual type = direct color, depth = 24, ff0000:ff00:ff; score=9100 Visual type = true color, depth = 24, ff0000:ff00:ff (system); score=9111 Chose visual type=true color depth=24, image bpp=32, lsb first lt-testpixbuf (pid:8839): ** ERROR **: file io-ico.c: line 352 (DecodeHeader): assertion failed: (State->LineBuf != NULL) aborting... Trace/breakpoint trap (core dumped)
Created attachment 693 [details] the crasher
small addition the patch from sandmann@daimi.au.dk http://bugzilla.gnome.org/showattachment.cgi?attach_id=737 attached to http://bugzilla.gnome.org/show_bug.cgi?id=50187 improves the situation now the loader dosnt crash lt-testpixbuf (pid:4053): ** WARNING **: Error loading image: Failed to load image '/home/yaneti/favicon.ico': Not enough memory to load icon i guess this is also a bug but at least its not crashing
this got worse again: todays cvsVisual type = direct color, depth = 16, f800:7e0:1f; score=8100 Visual type = direct color, depth = 16, f800:7e0:1f; score=8100 Visual type = true color, depth = 16, f800:7e0:1f (system); score=8111 Visual type = true color, depth = 16, f800:7e0:1f; score=8101 Chose visual type=true color depth=16, image bpp=16, lsb first lt-testpixbuf (pid:23004): ** CRITICAL **: file gdk-pixbuf.c: line 149 (gdk_pixbuf_new): assertion `height > 0' failed lt-testpixbuf (pid:23004): ** ERROR **: file io-wbmp.c: line 281 (gdk_pixbuf__wbmp_image_load_increment): assertion failed: (context->pixbuf) aborting... Trace/breakpoint trap (core dumped)
*** Bug 61045 has been marked as a duplicate of this bug. ***
here is another ico crasher comming from the duplicate above http://www.diario16.es/favicon.ico right now i am unable to test with HEAD so please excuse me if its working
Fixed on CVS.
Reopening because this bug refers to the GTK+/gdk-pixbuf version, not to the stable branch of gdk-pixbuf where it was indeed fixed.
just wanted to add that indeed all these are valid icons here is another testcase http://phpclasses.upperdesign.com/favicon.ico
The last testcase (the php icon) seems to be not valid. Inserting g_message ("Icon %d of %d: w %d h %d c %d --> score %d", I+1, IconCount, ThisWidth, ThisHeight, ThisColors, ThisScore); DumpBIH(Data + ((Ptr[15]<<24) + (Ptr[14]<<16) + (Ptr[13]<<8) + (Ptr[12]))); after the assignment to ThisScore in the IconCount loop in DecodeHeader yields the following, which seems to indicate that the ICO header is broken for the last contained image: Message: Icon 1 of 4: w 16 h 16 c 256 --> score 262400 biSize = 40 biWidth = 16 biHeight = 32 biPlanes = 1 biBitCount = 8 biCompress = 0 biSizeImage = 288 biXPels = 0 biYPels = 0 biClrUsed = 256 biClrImprtnt= 0 Message: Icon 2 of 4: w 32 h 32 c 256 --> score 263168 biSize = 40 biWidth = 32 biHeight = 64 biPlanes = 1 biBitCount = 8 biCompress = 0 biSizeImage = 1152 biXPels = 0 biYPels = 0 biClrUsed = 256 biClrImprtnt= 0 Message: Icon 3 of 4: w 48 h 48 c 256 --> score 264448 biSize = 40 biWidth = 48 biHeight = 96 biPlanes = 1 biBitCount = 8 biCompress = 0 biSizeImage = 2688 biXPels = 0 biYPels = 0 biClrUsed = 256 biClrImprtnt= 0 Message: Icon 4 of 4: w 64 h 64 c 256 --> score 266240 biSize = 0 biWidth = -16842752 biHeight = 0 biPlanes = 0 biBitCount = 65279 biCompress = 0 biSizeImage = -67174400 biXPels = 0 biYPels = -67174400 biClrUsed = 0 biClrImprtnt= -65536 biSize = 0 biWidth = -16842752 biHeight = 0 biPlanes = 0 biBitCount = 65279 biCompress = 0 biSizeImage = -67174400 biXPels = 0 biYPels = -67174400 biClrUsed = 0 biClrImprtnt= -65536
Opening the php icon in the MSVC++ resource editor gives the same impression: three valid images, followed by rubbish. I don't know if we should "fix" the ico loader to fall back to one of the lower score images if it finds rubbish.
What needs fixing for now is assertion failures or crashes; if it fails to load ico formats it doesn't know about; that can be left for later.
With 1.3.12, the crashers attached above give: testpixbuf (pid:3656): ** WARNING **: Error loading image: Failed to load image 'animations/ico1.ico': Not enough memory to load icon and testpixbuf (pid:3657): ** WARNING **: Error loading image: Failed to load image 'animations/ico2.ico': Icon has zero height which looks like nice GError returns to me, so I guess this bug can be closed.
Closing this now.
*** Bug 75888 has been marked as a duplicate of this bug. ***
*** Bug 78717 has been marked as a duplicate of this bug. ***
*** Bug 83548 has been marked as a duplicate of this bug. ***
*** Bug 84753 has been marked as a duplicate of this bug. ***
*** Bug 85012 has been marked as a duplicate of this bug. ***
*** Bug 85903 has been marked as a duplicate of this bug. ***
*** Bug 109664 has been marked as a duplicate of this bug. ***
*** Bug 112845 has been marked as a duplicate of this bug. ***
The URL field has been removed from bugzilla.gnome.org. This URL was in the old URL field, and is being added as a comment so that the data is not lost. Please email bugmaster@gnome.org if you have any questions. URL: http://www.joystick.fr/favicon.ico
This bug was marked RESOLVED without a resolution, which Bugzilla does not allow (and so I am fixing it). It is assumed that the bug was intended to be marked as FIXED. If the bug should have some other resolution, please change its resolution.