xinxinlx / openjpeg

Automatically exported from code.google.com/p/openjpeg
Other
0 stars 0 forks source link

opj_skip_from_file error #314

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
In openjpeg.c the function opj_skip_from_file passes the number of bytes as an 
OPJ_OFF_T which is 8 bytes,
but the parameter of the standard FSEEK function is a long which is 4 bytes.

As a consequence, the WHENCE parameter is taken in the second part of the 8 
bytes, and is 0,
which means SEEK_SET, instead of SEEK_CUR.

The final result is that the function opj_jp2_skip_jp2c  positions the file at 
address 8 instead of
skipping 8  bytes from current position.

Original issue reported on code.google.com by cutanet....@gmail.com on 25 Mar 2014 at 3:00

GoogleCodeExporter commented 9 years ago
You are either using a brain dead compiler or are using weird compilation 
flags. In both case we are missing information to actually determine why cmake 
introspection mecanism failed in your case. Closing as invalid.

Original comment by mathieu.malaterre on 25 Mar 2014 at 3:43

GoogleCodeExporter commented 9 years ago
I have spent two hours investigating the problem to see where it comes from. I 
dont appreciate that you merely dismiss the issue as invalid. I just compiled 
the sources with the standard commands, and do not use weird compile flags. 
There is obviously a problem somewhere since OPJ_OFF_T is ALWAYS defined as 
64bits in the source of openjpeg.h,  even where the operating system uses 
32bits addresses...

Original comment by cutanet....@gmail.com on 25 Mar 2014 at 5:00

GoogleCodeExporter commented 9 years ago
That was my goal here. With this comment, I am sure that in a few dozens 
iterations, I'll be able to have a proper bug report (openjpeg version, 
compiler version, system version, exact command line used, strace output, 
valgrind output...). So I'll continue being extremely rude, of course if you 
were to give me those infos in the first place this would have been a lot less 
fun of course.

Original comment by mathieu.malaterre on 25 Mar 2014 at 5:04

GoogleCodeExporter commented 9 years ago
I have fixed the problem for myself.  Just wait for another user reaching the 
problem to have it again in your issue list.

Original comment by cutanet....@gmail.com on 25 Mar 2014 at 5:08

GoogleCodeExporter commented 9 years ago

Original comment by mathieu.malaterre on 26 Mar 2014 at 2:57

GoogleCodeExporter commented 9 years ago

Original comment by mathieu.malaterre on 26 Mar 2014 at 2:58