Closed bitsgalore closed 4 years ago
Some more details: most of these files fail with something like this:
File "/home/johan/jpylyzer/jpylyzer/boxvalidator.py", line 1335, in validate_contiguousCodestreamBox
tileIndex] = tilePartsPerTileFound[tileIndex] + 1
KeyError: 2048
For the first file the value of numberOfTilesExpected turned out to be a negative number, which was caused by xOsiz being >> xsiz. Setting the computed number of tiles to a minimum value of 1 prevents the crash for some images, but no for all. Below tables shows the result after this first fix:
Image | status |
---|---|
0290cb77c5df21828fa74cf2ab2c84d8.SIGFPE.d25.31.jp2 | OK |
2539.pdf.SIGFPE.706.1712.jp2 | KeyError (1335) |
26ccf3651020967f7778238ef5af08af.SIGFPE.d25.527.jp2 | OK |
2.pdf.SIGFPE.706.1112.jp2 | KeyError: 16384 (1335) |
4035.pdf.SIGSEGV.d8b.3375.jp2 | KeyError: 1 (1335) |
edf_c2_1000234.jp2 | UnboundLocalError: local variable 'commentIsValid' referenced before assignment (2018) |
edf_c2_1015644.jp2 | KeyError: 2048 (1335) |
gdal_fuzzer_unchecked_numresolutions.jp2 | OK |
issue427-null-image-size.jp2 | OK |
Note the completely unrelated error for edf_c2_1000234.jp2.
Happens for some files in 'input' folder in https://github.com/uclouvain/openjpeg-data. Occurs for both jpylyzer 1.18 and latest dev version.