[Insight-developers] JPEG2000 segfault and warnings

Gaëtan Lehmann gaetan.lehmann at jouy.inra.fr
Fri Mar 4 07:51:57 EST 2011


Hi,

Those warnings, on SunOS

"/export/home/glehmann/src/tests/ITK/Utilities/openjpeg/jp2.h", line  
80: warning: enumerator value overflows INT_MAX (2147483647)
"/export/home/glehmann/src/tests/ITK/Utilities/openjpeg/jp2.h", line  
87: warning: enumerator value overflows INT_MAX (2147483647)

can be fixed by replacing the (too large) value 0x80000000 by  
0x40000000 in the enums at the lines 80 and 87

   JP2_STATE_UNKNOWN    = 0x40000000
   JP2_IMG_STATE_UNKNOWN    = 0x40000000

Another option is to not use an enum to store those values.
I don't know which one is the best.

But this doesn't fix the segfault, unfortunately. Here is the  
backtrace I get for the test itkJPEG2000Test00:

Running: ReviewCxxTests itkJPEG2000ImageIORegionOfInterest /home/papha/ 
glehmann/src/ITK/Testing/Data/Input/Bretagne1.j2k /home/papha/glehmann/ 
src/ITK/build/Testing/Temporary/Bretagne1_RegionTest01.tif 160 120 320  
240
(process id 21237)
WARNING: In /home/papha/glehmann/src/ITK/Code/Review/ 
itkJPEG2000ImageIO.cxx, line 299
JPEG2000ImageIO (0x0000000003bdcfa0): file does not specify color  
space, assuming sRGB

t at 1 (l at 1) signal SEGV (no mapping at the fault address) in  
free_unlocked at 0xfffffd7ffdcd13c2
0xfffffd7ffdcd13c2: free_unlocked+0x00a2:       movq     (%rcx),%rsi
Current function is allocate_buffers
   796       opj_aligned_free(t1->data);
(dbx) where
current thread: t at 1
   [1] free_unlocked(0x44e6bf0, 0x0, 0x0, 0x4b0, 0x3bc57a0,  
0x3bc44e0), at 0xfffffd7ffdcd13c2
   [2] free(0x0, 0x0, 0x0, 0x0, 0x0, 0x0), at 0xfffffd7ffdcd1300
=>[3] allocate_buffers(t1 = 0x3bc57a0, w = 40U, h = 30U), line 796 in  
"t1.c"
   [4] t1_decode_cblk(t1 = 0x3bc57a0, cblk = 0x3bc44e0, orient = 1U,  
roishift = 0, cblksty = 0), line 980 in "t1.c"
   [5] t1_decode_cblks(t1 = 0x3bc57a0, tilec = 0x3bd8fd0, tccp =  
0x3e211d0), line 1231 in "t1.c"
   [6] tcd_t1_decode(p_tcd = 0x3bc41c0), line 1736 in "tcd.c"
   [7] tcd_decode_tile(p_tcd = 0x3bc41c0, p_src = 0x3e22530 "\xcf 
\xa3D", p_max_length = 91429U, p_tile_no = 0, p_cstr_info = (nil)),  
line 2087 in "tcd.c"
   [8] j2k_decode_tile(p_j2k = 0x3bdce10, p_tile_index = 0, p_data =  
0x4405b60 "\xe0\xcb\xbd^C", p_data_size = 921600U, p_stream =  
0x3bd9450, p_manager = 0x3e091b8), line 8618 in "j2k.c"
   [9] opj_decode_tile_data(p_codec = 0x3e09170, p_tile_index = 0,  
p_data = 0x4405b60 "\xe0\xcb\xbd^C", p_data_size = 921600U, p_stream =  
0x3bd9450), line 481 in "openjpeg.c"
   [10] itk::JPEG2000ImageIO::Read(this = 0x3bdcfa0, buffer =  
0x3c28150), line 546 in "itkJPEG2000ImageIO.cxx"
   [11] itk::ImageFileReader<itk::Image<unsigned char, 
2U>,itk::DefaultConvertPixelTraits<unsigned char> >::GenerateData(this  
= 0x3827a70), line 414 in "itkImageFileReader.txx"
   [12] itk::ProcessObject::UpdateOutputData(this = 0x3827a70, _ARG2 =  
0x3bd0940), line 978 in "itkProcessObject.cxx"
   [13] itk::DataObject::UpdateOutputData(this = 0x3bd0940), line 410  
in "itkDataObject.cxx"
   [14] itk::ImageBase<2U>::UpdateOutputData(this = 0x3bd0940), line  
283 in "itkNeighborhood.h"
   [15] itk::ProcessObject::UpdateOutputData(this = 0x3bc8750, _ARG2 =  
0x3828410), line 928 in "itkProcessObject.cxx"
   [16] itk::DataObject::UpdateOutputData(this = 0x3828410), line 410  
in "itkDataObject.cxx"
   [17] itk::ImageBase<2U>::UpdateOutputData(this = 0x3828410), line  
283 in "itkNeighborhood.h"
   [18] itk::ImageFileWriter<itk::Image<unsigned char,2U>  
 >::Write(this = 0x3bd0b70), line 334 in "itkImageFileWriter.txx"
   [19] itk::ImageFileWriter<itk::Image<unsigned char,2U>  
 >::Update(this = 0x3bd0b70), line 155 in "itkImageFileWriter.h"
   [20] itkJPEG2000ImageIORegionOfInterest(argc = 7, argv =  
0xfffffd7fffdff880), line 97 in "itkJPEG2000ImageIORegionOfInterest.cxx"
   [21] main(ac = 7, av = 0xfffffd7fffdff880), line 1112 in  
"ReviewCxxTests.cxx"
(dbx)

But I really don't know what to do with that, as I don't know openjpeg  
at all...

Gaëtan

-- 
Gaëtan Lehmann
Biologie du Développement et de la Reproduction
INRA de Jouy-en-Josas (France)
tel: +33 1 34 65 29 66    fax: 01 34 65 29 09
http://voxel.jouy.inra.fr  http://www.itk.org
http://www.mandriva.org  http://www.bepo.fr

-------------- next part --------------
A non-text attachment was scrubbed...
Name: PGP.sig
Type: application/pgp-signature
Size: 203 bytes
Desc: Ceci est une signature ?lectronique PGP
URL: <http://www.itk.org/mailman/private/insight-developers/attachments/20110304/5e1b2945/attachment.pgp>


More information about the Insight-developers mailing list