Panda3d crashes when I use my code, but want to translate the problem report I got from it (Solved)

I guess this is a first for me, yeah, panda3d crashed on me, which I understand, it’s my code that did so, but this is where my issue begins, when panda3d crashes in this case, it does not leave a error on the python console like it should, instead it closes the window and the mac OS X Problem Report window comes up.

And this window shows detailed information about my computer and some memory addresses that I do not fully understand, luckily I saved the report on a RTF file, and normally I would just post it here, but I,m afraid that it might contain too much information, so I,m asking if a panda3d developer can translate it for me so I can find out what went wrong.

I’ll send it through this forum’s message system, in the meantime, I,m going to take some guesses on my own tomorrow on what went wrong, and thank you to anyone who is willing to help.

Feel free to send it to me privately.

It would also be helpful to know what exact Panda3D version you are using, and what your code is doing at the point that it crashes.

I believe it’s 1.10.0, but did you want to whole project or just the script?, for now I will send just the script and report in a zip to you in message.

Hi there,

I forgot about this, sorry. Could you tell me which precise Panda version you have? I cannot reproduce the precise issue, and I recall fixing a similar crash in the past.

You can find this out with this code:

import panda3d

And this would also be helpful:

from panda3d.core import PandaSystem

Not a problem, but perhaps maybe the problem only exists with my particular copy? I,ll use your codes and get back to you soon, thanks

Edit: well that was quick, the codes I used yielded this.


Are you running your program from a terminal? (Presuming that OSX allows this–I’m not all that familiar with that OS.) If not, doing so might allow you to see any error output that is being produced.

it’s from IDLE, so I guess the default python IDE, it works really nice for me with all the color coding and tools such as indenting and finding.

Edit: I forgot to mention that IDLE does not crash, only the panda3d window (which just closes abruptly) which perplexes me, since panda3d will usually freeze and feed IDLE the issue in which I can correct.

rdb, heads up, I provided my latest code with the aforementioned glitch, this time caused by the clear() command.
-Downloads Collected-
in this demo, all you need to do is walk to the snowy area for it to load the next segment and move a bit for the crash to happen.

You are using an outdated, unstable version of Panda3D; a pre-release from the end of September. In particular, you are missing out on a fix made in October which fixed a crash very similar to your crash report.

Please update to the final release of 1.10.0, or even a pre-release of 1.10.1:

It looks like the issue may well be fixed, but for reference:

That’s fair, and I’m not suggesting that you stop using that.

However, when you have issues like this, in which output isn’t displayed for long enough for you to see it, it might be helpful to perform a once-off run from the terminal. That is, open a terminal, navigate to your program directory (or, if the OS allows it, open the terminal directly at that directory), then run your program using Python. (Something like “python3 .py”. The name of the Python command might differ on your OS; I don’t know.) That way the terminal should stay open after the crash, allowing you to read the error message.

PS: Have you looked into the PyCharm IDE? It looks like it might have a Mac version, and I’ve found that its console output tends to stay visible after a crash. If you simply prefer IDLE, that’s fair enough! I just offer PyCharm as a potential alternative, in case you’re not aware of it. :slight_smile:

rdb, just a quick question, how would I go about updating panda3d? do I reinstall it? because if that is the case, I used pip install for panda3d, so I don’t know this would work.

EDIT: I tried to run the dmg file you lead me to, and it said upgrade, so I installed, but when I ran panda3d and checked the version it was the same, so I guess pip installs must be upgraded differently?

Thaumaturge: well the thing about mac is, it’s likes the meddle with the text by auto correcting it automatically as you are typing, especially in textedit (which can be a vary bad thing for my txt files), in IDLE it does not do so, I don’t know if PyCharm would give mac that ability or not, I guess I would have to look into it.

Yeah, no, don’t install both the .dmg and the pip version. That’s trouble. There’s no easy way to uninstall the dmg, so you’ll have to manually delete the /Developer/Panda3D directory.

To upgrade the pip version, you can do:

pip install -U panda3d

okay i did what you told me, and the dev1806 disappeared, is this good?
Edit: well it appeared to work, the game is slower, is that normal?

Given that autocorrect isn’t being used in IDLE, I’d be very surprised if it were used in PyCharm. After all, both are development IDEs, not writing tools, as I imagine textedit is primarily intended to be.

I suggest giving PyCharm a shot, and seeing how you feel about it. If you try it and find that you don’t like it, or that autocorrect is indeed active in it, how much have you lost?

But how integrated is pycharm with panda3d? and what features are in it? also autocorrect (or typos to be exact) can be pretty devastating, I once wasted 2 hours on a problem only to find out it was a typo later one, and more recent a issue slipped by at first only speed bump me later on.

Glad to hear that the issue is fixed in the public release version. :slight_smile:

I’m not sure why the game is slower for you (it runs at a steady 60fps for me). Perhaps you had a custom Panda3D configuration file active in the previous version, eg. that enabled the multi-threaded pipeline or so?

Profiling your application with PStats, the two biggest performance bottlenecks are collisions and event handling; event handling particularly because there seem to be a lot of “again” events sent every frame, which should generally be avoided. As for the collisions, there are probably quite some optimizations possible on this front.

(Before I begin, note that I use PyCharm on Linux, so I don’t know with confidence whether it differs on Mac. I doubt it, but I’d like to note that uncertainty, just in case.)

I’m not quite sure of what you mean by this. It picks up the Panda modules and offers completion suggestions (which is not the same as autocorrect, please note!) and parameter information, if that’s what you mean. What else does IDLE offer?

Wow, quite a lot. o_o

Let’s see… completion suggestions and parameter information, as noted above, debugging tools such as breakpoints and stepping through code, a built-in console (plus a Python prompt, should you want to run a few lines of code quickly), version-control integration, and, well, a ton more, I think.

(And if it seems overwhelming at first, I imagine that you can just ignore most of the menus and suchlike, using it simply until you’re comfortable enough to try its more-advanced features.)

True, but it also seems like something that might be easy to test: just open up a new document, and type something incorrectly. See how, if at all, PyCharm responds. (I’m guessing that it will be perfectly happy with the misspelled version. As I said, it’s an IDE, a programmer’s tool. It makes little real sense that it would incorporate autocorrection–unlike the OS-provided text-editor, where it at least makes some sense.)

As I tried PyCharm, I liked it; for me, the most useful was aligning indents (formatting). However, I prefer Notepad ++, this is not exactly an IDE.

rdb, another weird thing is the library folder did not appear when I deleted the previous, from what I read is panda3d compiles that folder to run better, maybe it is loading directly off the egg files? and not compiling bam though the library folder? right now i,m attempting to adjust my code to function at 30FPS, if that works then there will be no issues.

Thaumaturge, so I just checked out pycharm’s website and it appears to be also a paid program as well as a free one, the issue I have with these kind of situations is the free editions usually tend to be stripped down versions of the paid one, so if I were to try, I would use the paid version just in case it had a important feature I needed and to avoid heartache.

serega-kkz, that sounds like a really good feature that did not see in IDLE.

That’s fair, but… let me say that I use the free version, and I have yet to struggle with it. At the least it seems likely to be far more feature-rich than the IDE that you’re currently using, so you’d likely be gaining features even if you didn’t get all of them.

If you’re concerned, however, take a look at their “features” page: it seems to give a comparative list of the features available in the two versions:

Another set of features that comes to mind is PyCharm’s refactoring tools: they allow you to quickly rename a variable or class, and have that new name automatically replaces usages of the old name (across multiple files, I think!).

Yet another: it will show you variables that aren’t being used, by colouring them grey.

Oh! And quick browsing between project files, or skipping to a given class or method within a file, via a side-bar!

There are lots of features, in short. :slight_smile:

I don’t recall whether I’ve used it, but quite a few people seem to like Notepad ++, from what I gather. :slight_smile: