Interesting one...

Archives Forums/Blitz3D Bug Reports/Interesting one...

BlitzSupport(Posted 2005) [#1]
Run this in debug mode, and it correctly catches the lack of camera/cube on MoveEntity. Uncomment the two REM'd lines, and it neither crashes nor gives a debug error, despite the fact that the handles are still supposedly pointing to nothing!

Graphics3D 640, 480

cam = CreateCamera ()
FreeEntity cam

;CreateCamera ()
MoveEntity cam, 0, 0, 0

cube = CreateCube ()
FreeEntity cube

;CreateCube ()
MoveEntity cube, 0, 0, 0

End


Thinking about it, I guess the new entities get created at the old handle addresses by chance, so maybe more of a 'quirk' than a bug, since handles aren't zeroed by design... ?


big10p(Posted 2005) [#2]
That's a bona fide bug, as far as I'm concerned.


*(Posted 2005) [#3]
when coding never leave anything to chance, so this is a bug ;)