Panda 1.9 (dev) on Win 7 x64

Here Call stack and output of “notify-level spam”
debug.7z (4.83 KB)

Thanks, this is helpful! The combination of debug log and call stack allowed me to deduce that the error is occurring when we call into the NVIDIA Cg library to query support for Cg.

I’m wondering if there is perhaps a conflicting version of cg.dll or cgGL.dll on your system somewhere? If so, could you try renaming it so that only Panda’s copy is used?

Also, your glxinfo log was helpful as well. It shows that primitive restart index is supported, but only the NVIDIA extension thereof (wouldn’t have guessed that, since you have an AMD card) instead of the standard ARB version. This is a good lead. I’ll look deeper into this.

My apologies; to explain myself, I had hoped that the two problems might be connected (and thus that fixing one would fix both), and thought that the discrepency between log files might have been worth mentioning.

@rdb You are right. I’ve found installed Cg toolkit. After uninstalling it error is disappeared. Unfortunately I don’t remember which version of Cg Toolkit was installed. When I downloaded and installed version from nvidia site I was not able to reproduce problem again.
Reinstalling Cg Toolkit solved both problems: importing ShowBase and importing panda3d.core before importing ShowBase.

Notice: before I uninstalled Cg I found that problem with importing panda3d.core appears between 22 and 24 feb. (202-205 build)


I checked in some changes earlier that disable the use of the old GL_NV_primitive_restart_index extension to supply primitive restart capabilities. If some drivers do not reliably support it, it’s clearly not worth it. (Your drivers provide OpenGL 3.0, even though your card supports 3.3. The core version of primitive restart support, which is presumably more reliable, was not introduced until OpenGL 3.1.)

So, I think that all issues are now resolved, unless I missed something. I’m not sure what we can do about the Cg issue in a way that benefits others except for documenting that this could be a potential cause for crash.

Thanks so much for bringing up and helping to diagnose these issues!

I tryed to build and install this revision (on Ubuntu):

But seems it no affect on my video card ( Can I check somehow what’s happening?
Also about drivers - I saw the same picture on Win 7, but on Win 7 I have the latest official driver from ATI unlike Ubuntu with the opensource Gallium.

Odd - in both cases it is still fixed with the configuration variable?

Can you get debug output of “notify-level-glgsg debug” in both systems (with primitive restart enabled, of course)?

Ouch, I am sorry for mistake. On Win 7 and latest build which you provide here Panda 1.9 (dev) on Win 7 x64 smiley is Ok. Smiley was disfigured on version which I used before (build 08 oct), when couldn’t to run latest version. Though on Ubuntu something still wrong.
Attached log from three versions Ubuntu, Win - latest, Win - 08 oct
test.7z (4.12 KB)

And is the issue fixed on Ubuntu by setting “gl-support-primitive-restart-index false” in /etc/Config.prc?

Yes, on Ubuntu using gl-support-primitive-restart-index false in Config.prc or

loadPrcFileData("", "gl-support-primitive-restart-index false")

solve the problem.

Okay… I see it reports support for GL_ARB_ES3_compatibility, which we actually prefer to use for primitive restart index, over GL_NV_primitive_restart. Maybe your driver just implements it buggily, which is not surprising given that you have the open-source drivers.

I just found this bug: … i?id=84835

So, maybe we just have to parse “Gallium” in the driver string and change behaviour based on that.

If it’s a bug in the Gallium driver, then I think that we do not need to make “hack” for it because it can be fixed in future. I think that notice in the documentation or/and release notes about problems with Gallium and “gl-support-primitive-restart-index” parameter is quite enough.
Thank you so much for for solving this bugs, now I can continue experiments with blender->panda conversion.

I decided to make the code check if the GL_RENDERER string starts with “Gallium”, and if so, disable this feature. I don’t want Panda to mysteriously produce the wrong results, even if this is a driver bug.

I’m unable to test, of course, so I don’t know if this is actually effective.

Ok, thanks, I’ll check it as it will be possible.

Seems all ok with latest GIT snapshot.

Thanks so much!

Just for the record, I checked in some changes for 1.10 that make us no longer call any Cg functions at initialization, but only when the first Cg shader is compiled. This should at least safeguard those applications that don’t use Cg from this crash, and if it does occur it will occur when loading a Cg shader, giving a clue what the problem might be if it happens for others.