Strange behaviour

Regan Heath regan at netmail.co.nz
Thu Jun 7 15:59:02 PDT 2007


Simen Haugen Wrote:
> I just encountered a strange bug that I'm having problems reproducing as a 
> test case.
> 
> I used an associative array to store some data lengths, and in my code, I 
> was accessing an element not in the array. In debug mode, this code did not 
> fire ArrayBoundsError and worked (returning 0 I guess), but in release mode 
> it crashed. Any ideas why this might have happend? 

Was the key to the AA a char[] and do you .dup the key when you store values?  If not, is it possible that you have modified the char[] you used for the key, this can have some unexpected results and behaviour.

That's all I can think of.

Regan Heath


More information about the Digitalmars-d-learn mailing list