Crash while reading pixels of a JPEG image, but only in Mac OS X
Original Reporter info from Mantis: sekelsenmat
-
Reporter name: Felipe Monteiro de Carvalho
Original Reporter info from Mantis: sekelsenmat
- Reporter name: Felipe Monteiro de Carvalho
Description:
Hello,
My program which works perfectly under Windows, crashes in Mac OS X while loading a JPEG image using TJPEGImage. I read the corresponding code, but FCL doesn't come with debug info, so I can't step into it.
Here is the stack trace
Breakpoint 1, 0x0002069f in fpc_raiseexception ()
(gdb) bt
#0 0x0002069f in fpc_raiseexception ()
#1 0x000fe59d in FPREADJPEG_JPEGERROR$J_COMMON_PTR ()
#2 0x00121d20 in JERROR_ERREXIT1$J_COMMON_PTR$J_MESSAGE_CODE$LONGWORD ()
#3 0x000fe9b0 in FPREADJPEG_TFPREADERJPEG_$_INTERNALREAD$TSTREAM$TFPCUSTOMIMAGE_READPIXELS ()
#4 0x000fe7c3 in FPREADJPEG_TFPREADERJPEG_$__INTERNALREAD$TSTREAM$TFPCUSTOMIMAGE ()
#5 0x000f5838 in FPIMAGE_TFPCUSTOMIMAGEREADER_$__IMAGEREAD$TSTREAM$TFPCUSTOMIMAGE$$TFPCUSTOMIMAGE ()
#6 0x000d7a3b in TFPIMAGEBITMAP__READSTREAM (ASTREAM=0x1651d60, ASIZE=148859, this=0x1668480) at ./include/fpimagebitmap.inc:146
#7 0x000c53a3 in TRASTERIMAGE__LOADFROMSTREAM (ASTREAM=0x1660480, ASIZE=148859, this=0x1668480) at ./include/rasterimage.inc:447
#8 0x000c5283 in TRASTERIMAGE__LOADFROMSTREAM (ASTREAM=0x1660480, this=0x1668480) at ./include/rasterimage.inc:423
#9 0x000c0f73 in TGRAPHIC__LOADFROMFILE (FILENAME=0x1668438, this=0x1668480) at ./include/graphic.inc:248
#10 0x00044bbb in TFORM1__BUTTON1CLICK (SENDER=0x174a0c0, this=0x174a8e0) at mainform.pas:39
Steps to reproduce:
Just run the attached program and use it to load the jpeg image which comes in the zip file. It will crash.
Mantis conversion info:
- Mantis ID: 16983
- OS: Mac OS X
- OS Build: 10.4.9
- Platform: MacBook
- Version: 2.4.0
- Fixed in version: 2.6.0