Resizing TK Windows

I have written a few TK windows for my project. When running them by themselves the resizing works fine. But if I add it to my panda project it crashes miserably. I have noticed that the directtools window suffers from the same problem. This is the output:


Fatal Python error: PyEval_RestoreThread: NULL tstate

This application has requested the Runtime to terminate it in an unusual way.
Please contact the application's support team for more information.
Fatal Python error: PyEval_RestoreThread: NULL tstate

This application has requested the Runtime to terminate it in an unusual way.
Please contact the application's support team for more information.

I was wondering if anyone has looked into this problem at all and might know the solution. I was kinda hoping that you guys planned to fix this in the next release.

:laughing:

I’ve never seen this problem before. I can resize the Direct windows in my version of Panda without any troubles.

I don’t have the CMU build, though; it’s possible there’s something wrong in that particular build. I dimly remember we had to compile a special version of Python with threading disabled to make it play nice with Tk a while back. But I think we’re now using an out-of-the-box version of Python 2.4 here a the VR Studio, and it appears to be working fine.

David

Could one of you guys at CMU confirm this is happening for them? It is happening on multiple machines for me. I’m currently using the latest version of panda (1.2.3) although it was happening in 1.2.1 as well. I’m also running the version of python in the third-party folder. The problem isn’t with the panda direct GUI its with the external TK windows like the one used by the scenegraph viewer.

I’m seeing the same error on win32 in Panda3D 1.2.3 (downloaded from the panda3d.org site).

It appears to happen only when I resize the “Direct Session” window (i.e. the main browser window), and only when the engine is currently running (i.e. run() has been called and has not been interrupted with Ctrl-C). Resizing the Pos/Hpr window and resizing the session window when the engine is interrupted both work fine.

Hopefully, that can help someone more familiar with the direct codebase narrow down the problem. The question to answer: what state is the Direct Session window touching that the pos/hpr window isn’t?

wiredmessiah, could you tell us what the TK windows you are using show or do? It may help narrow the list of things that could cause that error.

Take care,
Mark

I also have some windows that can resize and others that can not. The ones that will crash on resizing are more complex. I can’t seem to find exactly what makes these windows different. When I first looked into this it seemed to have something to do with the TK event processing. When I have more time to debug this I will try to identify the source of the crash. I was just hoping that perhaps this issue has already been looked into by someone else. :smiley: