Closed GoogleCodeExporter closed 9 years ago
I can see following: "libpng error: Invalid image width" right before the
crash."
When trying to load all images from that pack. So it seems that there is a
broken(?)
png included
Program received signal SIGSEGV, Segmentation fault.
_IO_new_fclose (fp=<value optimized out>) at iofclose.c:57
57 iofclose.c: No such file or directory.
in iofclose.c
(gdb) bt
#0 _IO_new_fclose (fp=<value optimized out>) at iofclose.c:57
#1 0x00007ffff742c236 in ReadPNG (filename=0x7fffffff36b0
"/home/xxx/.local/share/mupen64plus/hires_texture/SMASH BROTHERS/Text/Go!/SMASH
BROTHERS#5C1181A2#0#3_all.png", img=0x7fffffff2590)
at liblinux/pngrw.c:144
#2 0x00007ffff73b0546 in GetImageInfoFromFile (pSrcFile=0x7fffffff36b0
"/home/xxx/.local/share/mupen64plus/hires_texture/SMASH BROTHERS/Text/Go!/SMASH
BROTHERS#5C1181A2#0#3_all.png",
pSrcInfo=0x7fffffff47f0) at TextureFilters.cpp:963
#3 0x00007ffff73b2571 in FindAllTexturesFromFolder (foldername=0x7fffffff5940
"/home/xxx/.local/share/mupen64plus/hires_texture/SMASH BROTHERS/Text/Go!/",
infos=..., extraCheck=true, bRecursive=true)
at TextureFilters.cpp:1115
#4 0x00007ffff73b1f38 in FindAllTexturesFromFolder (foldername=0x7fffffff7bd0
"/home/xxx/.local/share/mupen64plus/hires_texture/SMASH BROTHERS/Text/",
infos=...,
extraCheck=false, bRecursive=true)
at TextureFilters.cpp:1029
#5 0x00007ffff73b1f38 in FindAllTexturesFromFolder (foldername=0x7fffffff8da0
"/home/xxx/.local/share/mupen64plus/hires_texture/SMASH BROTHERS/", infos=...,
extraCheck=false, bRecursive=true)
at TextureFilters.cpp:1029
#6 0x00007ffff73b287c in FindAllHiResTextures () at TextureFilters.cpp:1297
#7 0x00007ffff73b2b6a in InitExternalTextures () at TextureFilters.cpp:1352
#8 0x00007ffff73a4c8d in StartVideo () at Video.cpp:299
#9 0x0000000000427c18 in emulationThread (_arg=<value optimized out>) at
main/main.c:881
#10 0x0000000000429709 in main (argc=3, argv=0x7fffffffe028) at main/main.c:1616
Original comment by sven@narfation.org
on 21 Sep 2009 at 3:43
It is a reorder problem due to the fact that the order of execution of the
initialisation is not given. The libpng and setjump/longjmp documentation states
clearly that the state of each variable must not be known after a longjump. I
will
upload a patch for that later, but check for another problem before that. I
will also
try to fix that problem for the bmp reader
Original comment by sven@narfation.org
on 21 Sep 2009 at 5:56
Fix can be found at
http://git.debian.org/?p=collab-maint/mupen64plus.git;a=tree;f=debian/patches;hb
=master
It should also fix the read of png on amd64 doesn't work at all. Please test
patch on
top of current svn as their are other highres related bug fixes included.
Original comment by sven@narfation.org
on 21 Sep 2009 at 7:34
Attachments:
muellhierrein, thanks for the patch. setjmp/longjmp is evil. But for sake of
least
modification, I fixed the setjmp/longjmp code by declaring variables as volatile
rather than adding all the custom error handling code. Committed in rev 1411.
Can
someone please test this to verify that the fix works?
Original comment by richard...@gmail.com
on 29 Sep 2009 at 5:18
Seems to work good enough. Forced some failures and didn't crashed.
Original comment by sven@narfation.org
on 29 Sep 2009 at 8:12
excellent, thanks.
Original comment by richard...@gmail.com
on 30 Sep 2009 at 2:01
Original issue reported on code.google.com by
darkmags...@gmail.com
on 20 Feb 2009 at 11:18