[Customdrawn] Trying "Customdrawn"

Michael Schnell mschnell at lumino.de
Mon Apr 2 11:31:26 CEST 2012


On 04/02/2012 10:56 AM, Michael Schnell wrote:
>
> Maybe I can replace the the damn "with" notation by the actual 
> variable names, to have the debugger show me the values.
>
I did some test:

in TTload Line 261:

Loop with n = 0 runs fine

n= 1:
Tag is calculated to 1195656518
it crashes within GetULong when calculating "Checksum"

in GetUlong
frame_cursor is 20
current_frame shows lots of data
at position 20 I see:
162, 64, 158, 152, 0, 0, 1, 88, ...

It crashes when trying to leave the function GetULong,

Here the Disassembly Window shows that after returning from GetUlong, 
the code checks whether the result is negative (highest bit set) and 
initializes a Range Check error in this case.

This is correct, as Checksum is defined as a (signed) long.

So I suppose the problem is that Checksum in Fact should be defined as 
ULong. (Same supposedly is true for "Tag" as well).

So for a try I changed the code in TTLoad to call GetLong() instead. 
(acknowledging the supposedly erroneous fact that Checksum is signed)

This overcomes this problem, but now I get the range check error in line 
498. when calling GetShort().

This code quite obviously is a bit buggy.

I suppose the working variant has been compiled with range check disabled.

I tried to disable range check in the project option, but I get the 
range check exception nonetheless.

Hope this helps,
-Michael




More information about the Customdrawn mailing list