Bug in ExtCompReader - wrong datatype of variable startOffset (int/long)
Brought to you by:
crechner,
markus-renner
Hey together,
today i found a bug in the ExtCompReader.java -> readNumberValues(...) function, regarding the datatype of startOffset variable (line 233), currently the java datatype is int, i'm pretty sure it should be long.
In the readStringValues(...) function you use already long for startOffset.
This leeds to errors with external files greater than ~2GB.
If you need more information or something, please give a me feedback.
Kind regards
Michael Stoll
Hello Mr. Stoll,
thank you for this report! I will look into it and let you know, whether this is really a bug or dependent on the ODS version. The datatype for the startOffset was changed from int to long in the past, so it may be that we missed to adjust this in this case or it depends on the correct ODS version. Please send me the base model version you are using in this context so I can better check. Thank you!
Best regards,
Markus
Hey Markus,
the change of the datatype of start_offset from DT_LONG(A_INT32) to DT_LONG_LONG(INT_64) was from base version 29 -> 30. The library reads it correct, but the value is then stored in a java int (same as INT32), but this cuts off values for DT_LONG_LONG.
Relevant code from lib (ExtCompReader.java -> from line 232):
We created lib by our own and changed to (like in readStringValues-function) :
This was working for us ;)
Kind regards
Michael
Hi Michael,
ok, that seems to be a bug indeed. I will integrate your solution in the next fix version. Thank you very much for this helpful input!
Best regards,
Markus
The bug is fixed now in version 1.3.3, thank you again for reporting it!