Problems with Tlist

Blitz3D Forums/Blitz3D Programming/Problems with Tlist

Sonic(Posted 2006) [#1]
I really am at my wits end with this problem, and I honestly don't know whether to post it here or in the bug reports!

I am using Bmax v1.10 on OSX 10.3, and don't yet want to move to the next version. But perhaps it could solve it, and I will try if nothing else works.

Basically, I am using a TList in my AI that contains goals (integer constants), and calling methods such as contains() to see which goals are further down the line. I only ever call these methods on a non-null, non-empty list with the integer constant as the 'value:Object' parameter.

It always crashes on contains(), with a 'null object / method' error. As far as I can tell (although I can't be certain as I usually run non-debug for speed. Another odd problem in this game is the huge difference in speed between these modes, something I didn't have with previous games, some more graphically intensive.)

What I can see in the debugger is that the correct values are held in the AI's methods, that the list exists and is not empty, and here's the killer...

... contains() seems to be looking for the existence of a TFont, and one with no 'value field'!

It doesn't always crash, different things seem to trigger it, even adding a completely unconnected line of code can solve it - until I type more (unrelated) code that throws it again. I haven't altered the AI code at all, besides double-checking all the references to the list in it.

Can anyone help me? I could really use some new lines of thinking, as I really have explored all avenues. Perhaps there is some kind of memory leak, and things are being overwritten, but I wouldn't know what to look for. I had no such problems in my scrolling platform game, and have used much the same framework.

Thanks,
Sonic.


Ross C(Posted 2006) [#2]
Still in the wrong forum :o)


Sonic(Posted 2006) [#3]
LOL! I'm sorry - same mistake, different day - I just went to my browser history because I thought I didn't actually post it yesterday before my modem cut out.

Moderators please delete this thread.


Ross C(Posted 2006) [#4]
Sok ;o) you just won't get much help from us lowly blitz3d owners :o)