seg fault with HT codestream
I get a seg fault in Ubuntu when using ojph_expand compile from current master branch with the HTJ2K J2C file in the attached zip
root@79f3152c1012:/usr/src/openjph/build# ../bin/ojph_expand -i ht_2160p_10_layers.j2c -o ht_2160p_10_layers.j2c.tif
Segmentation fault
I created this file with Kakadu v.8.2.1 using the following command:
kdu_compress -i 3840x2160_10bit_444_BT709_SDR.tif -o ht_2160p_10_layers.j2c Cmodes=HT -rate 1 Clayers=10 -no_info
Hi Mike,
Thank you for discovering this bug; I will fix soon.
Kind regards, Aous.
If the seg fault is caused by the presence of placeholder passes, one idea is that you could read the number of layers field in SGcod, and if the value is greater than 1, the decoder could fast fail with a descriptive error message like "codestream contains X quality layers and decoding multiple quality layers is not currently supported"

Thanks Mike. This is a good idea; I should implement it. I also must fix the bug causing the segmentation fault -- it is a bug.