Flip Exception

BlitzMax Forums/MiniB3D Module/Flip Exception

BLaBZ(Posted 2011) [#1]
I've been getting an exception thrown only in release mode,

It occurs when Flip is called and when an entity has been freed using FreeEntity(Mesh)

I'm not really sure whats going on


H&K(Posted 2011) [#2]
Only looking at b3d

1) I am assuming you are not freeing then filpping the same entity

2) Freeentity doesnt free references to that entity, nor references to children of that entity.

Now minib3d

One would assume therefore that debug has handle/entity existence checks, but release not.

IF you are saying you only get these errors when flip is used at some point, and then Free is used, Then look at the code for flip, and see what it is doing about children


BLaBZ(Posted 2011) [#3]
Awesome! Turns out 3DSound was attaching itself to the Fliphook,

Thank you very much :)


jkrankie(Posted 2011) [#4]
Could you explain this more? What and where is this 3DSound?

Cheers
Charlie


Kryzon(Posted 2011) [#5]
@H&K: I think he meant Flip as in buffer-flip, not FlipMesh.

@Jrankie: 3DSound is a module by Ziggy to implement a Blitz3D-like system of 3D sounds and listeners using OpenAL.
Looking at the source of this module I can see there is a line where it adds a Hook function to the FlipHook event. This function calls for the update of the 3D sound system, and I imagine Ziggy used this FlipHook as a way to keep updating the system every frame (since it's something that is likely to be happening every frame), instead of having the programmers manually call the update function.

Last edited 2011


H&K(Posted 2011) [#6]
@Kryzon, thanks mate ;(

Its not like I get "Awesome"s all the time, that I can afford you just pointing out I was simply lucky.

(Thou in my defence it did need to be some handle attaching itself to the command)

Last edited 2011