directx8 failure

Panda is crashing on a particular text box we’re using, but not on other machines. The crash comes after we create and dispose of several windows (2-3 times).

Debug spew:

After the above pops out, the debugger kicks in:

Similar to the problems in these two threads:

discourse.panda3d.org/viewtopic … dxdisplay8
discourse.panda3d.org/viewtopic … dxdisplay8

…with the notable difference that they launched Panda using OpenGL, while we loaded DX8.

Probably has something to do with the graphics board or its driver…

Intel 82852/82855 GM\GME Graphics Controller
64MB Video RAM
Panda 1.4.2

We load pandadx8, and use pandagl and tinydisplay as auxillary in case dx8 isn’t available.

I’m going to try running it in OpenGL to see if that will work, but I’m still wondering why its having problems with DX8. We have machines that have less video memory than this unit, so it’s a bit odd that its complaining about running out of memory.

OpenGL doesn’t seem to cause this crash for us… What could be the reason for the dx8 problem? Are there any workaround that allow us to use dx8 without modifying Panda’s source?

It sounds like either a bug in pandadx8, or in your graphics driver.

Graphics drivers are, of course, notoriously buggy. Panda’s dx8 support is also known to be buggy, especially with regards to opening and closing windows. I suspect it’s not cleaning up the framebuffer memory it allocates with each window, so it’s a gradual leak, and after you create and destroy a few windows eventually it runs out of graphics memory.

Or, possibly, the leak is in the driver, and not in Panda. That’s also possible, especially because you say the same problem doesn’t happen on other machines with less graphics memory.

Have you tried it with dx9 instead?

David

dx9 has caused us trouble on a wider variety of machines… Graphical glitches, and python crashing when we attempt to exit the application.

Doing some more testing reveals that the problem may lie in pandadx8. The only difference being that, on other machines, a significantly larger number of windows being closed and opened before a display driver error occurs. Looks to be some sort of memory leak when a window is closed. I’m not sure if its something in our script or in Panda, but it seems unlikely that it would be script-related, unless we missed some documentation that requires us to explicitly do cleanup when a window is closed (which while not unheard of in Python, isn’t supposed to be an issue due to gc)…

Well, you do need to call base.removeWindow() to explicitly close a window in code, or to close an offscreen buffer, and release all of its resources properly. When a window is closed by a user (via the close button), this should be done automatically, though.

David

Also note that pandadx9 support may be somewhat improved on the cvs trunk–I don’t know what version you were testing with previously, but the latest might be worth a look.

The pandadx8 but is probably something stupid and simple to fix–though the code itself is a mess and hard to read. If you feel up to the challenge of tracking down the bug, we’d certainly appreciate it!

David