PDA

View Full Version : Python TransformMatrix crash


bleair
2007-08-04, 15:13
The wiki page mentions:
[MAJOR - HIGH PRIORITY] Python interpreter (and python scripts/libraries) - work in progress (in early stages). Open Issues:

* Start the same script a few times and it crashes
* Some crashes in TransformMatrix

I searched and browsed some of the tracker entries but I didn't see an obvious bug. Can someone give me a description of a python script that will trigger the crash via TransformMatrix?

thanks

yuvalt
2007-08-04, 15:43
I did not fix that relates to the TransformMatrix a few weeks ago but I think jmarshall reversed the fix and fixed something else. It could be that this is fixed already. jm?

jmarshall
2007-08-05, 02:11
Hi,

I added some asserts, and also some runtime checks on the size of the stack.

Ideally those runtime checks shouldn't be required - the stack should never be empty when RemoveTransform() is called (and similarly when AddTransform() is called)

The problem with python IIRC was that the initial window startup did some resolution setting via SetScalingResolution() or whatever it is which used to kill the transform stack. As python is doing stuff (loading windows etc.) from a separate thread, this could cause the transform stack to be empty while we're rendering from the main thread. I fixed that, but am not 100% sure whether the bug is gone, though it hasn't asserted for me on testing, but then again I don't tend to test python stuff all that much ;)

The issue should at least be resolved with the checks that are in place now anyway, so can probably be removed from the wiki.

If and when we hit asserts there, we should look into why and fix it.

Cheers,
Jonathan