Tim Bradt - 2012-05-21

When I am using a rectangle with the y at 150,  x at 0 and height and width at 150, I get a seg fault when it reaches a certian point in the decoding phase.

Here is my gdb session when it hits that point:

Program received signal SIGSEGV, Segmentation fault.
0x00002aaaaaab22a7 in CDecoder::DequantizeValue (this=<optimized out>, band=<optimized out>, bandPos=4294967183, 
    quantParam=<optimized out>) at Decoder.cpp:438
438             band->SetData(bandPos, m_currentBlock->m_value[m_currentBlock->m_valuePos] << quantParam);

Here is the back trace:

#0  0x00002aaaaaab22a7 in CDecoder::DequantizeValue (this=<optimized out>, band=<optimized out>, bandPos=4294967183, 
    quantParam=<optimized out>) at Decoder.cpp:438
#1  0x00002aaaaaab2807 in CDecoder::Partition (this=0x60d3d0, band=0x60d778, quantParam=0, width=<optimized out>, 
    height=<optimized out>, startPos=-113, pitch=113) at Decoder.cpp:251
#2  0x00002aaaaaabb270 in CSubband::PlaceTile (this=0x60d778, decoder=..., quantParam=0, tile=<optimized out>, tileX=0, tileY=1)
    at Subband.cpp:221
#3  0x00002aaaaaab4b9e in CPGFImage::Read (this=0x7fffffffd738, rect=<optimized out>, level=0, cb=
    0x4015f4 <GetVars(double, bool, void*)>, data=0x0) at PGFimage.cpp:501
#4  0x0000000000401a73 in PGF::pgfreader::ReadFile (this=0x7fffffffd730, level=0, x=150, y=150, width=150, height=150)
    at pgfreader.cpp:80
#5  0x00000000004014e4 in main () at main.cpp:16

Additional Info: The size of the picture is 600x450