Strange DIM problem

Previous topic - Next topic

MrTAToad

When exiting my game, I found that it was crashing in NTDLL.DLL for some reason - and only in release mode.

So, after tracking it down, this call :

Code (glbasic) Select
self.podium.Destroy()

which calls

Code (glbasic) Select
FUNCTION Destroy%:
DIM self.podiumPos[0]
ENDFUNCTION


was the cause for some reason.  Change that line to use REDIM, and all was fine...

At the moment, I think the cause is due to something else, which I'm currently looking into...

With further investigation, it looks like SORTARRAY is the culprit for some reason :

Code (glbasic) Select

SORTARRAY self.podiumPos[],ADDRESSOF(sortPodiumPos)

FUNCTION sortPodiumPos:a AS tPodiumPos,b AS tPodiumPos
IF a.score.text$<b.score.text$ THEN RETURN 1
IF a.score.text$>b.score.text$ THEN RETURN -1
RETURN 0
ENDFUNCTION

Kitty Hello

If you can reproduce that - do not touch it and send me an email, please.

MrTAToad

Will do - I'll make the complete project directory available for you :)