People need tracebacks...

bigjhnny

07-05-2006 04:34:03

Sorry for my frustration here....

PyOgre's been wonderful so far. It's let me focus on game design and not get in the way of coding. However, I'm to the point where this bug in "no tracebacks in framelisteners" is really slowing me down....

Here is my question:

1. I'm using pyogre 1.06 build, has anyone found a solution to this and if not what can I do to help? (I don't know that I am capable really.... but I might as well try it cuz I'm not going far!)

2. Does anyone have this kind of problem using the pyogre1.2 build? Reason I didn't use pyogre1.2 is because of a couple of functions in material manipulation not run correctly, but hell if pyogre1.2 gives me tracebacks, I'll willing to trade :shock:

Any comments? Thanks!

futnuh

07-05-2006 23:18:04

For what it's worth, I'm using the CVS pyOgre + Dermont's patches with Dagon Ogre, and the issue you mention still exists ...

willism

08-05-2006 14:06:19

One workaround that I did was to put a "try: ... except:..." right inside the framelistener's event handling methods, to catch problems before they get lost outside of the framelistener. That way I was able to print out relevant debugging information in the "except: " block of code.

I know it's a hack, but it worked well enough for me to fix the bugs in the project I was working on.

Another solution would be to not use the framelistener. You can write your game logic on the "outside" of the render loop, by calling RenderSingleFrame(), instead of having your logic called by the render loop.

bigjhnny

13-05-2006 02:55:17

One workaround that I did was to put a "try: ... except:..." right inside the framelistener's event handling methods, to catch problems before they get lost outside of the framelistener. That way I was able to print out relevant debugging information in the "except: " block of code.


The "relevant debugging information" doesn't include a traceback does it? I was only able to print out the one line exception. Trying to re-raise the exception hangs the system.

Is that the case for you?

willism

17-05-2006 22:15:20

Here's how to get a traceback out of an exception:


from sys import exc_info
from traceback import extract_tb

...

try:
# Do your thing
except:
the_traceback = extract_tb(exc_info()[2])



This will give you a list of tuples. Each tuple represents a step in the traceback, and contains:

(file_name, line_number, function_name, line_of_code)

dermont

19-05-2006 09:11:40

Have you tried pyogre 1.0.6-0 SVN. I thought Clay fixed the ogre exception in pyogre 1.0.6-0 SVN. Do you have an example of this?. If it's still a problem I'll log it as a bug.

As for the Dagon patch yep the Exception stuff needs updating.