AssertionError in threadSimpleManager.cxx if frame rendered after long delay

Bug #644914 reported by Craig Macomber
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Panda3D
Fix Released
Undecided
David Rose

Bug Description

If I call graphicsEngine.renderFrame() after a very long delay (perhaps hours), I get:
AssertionError: record._thread->_run_ticks >= record._tick_count at line 734 of panda/src/pipeline/threadSimpleManager.cxx

This is an issue in the case where the application is left blocked (by a wx dialog in my case) and then unblocked much later. In my case, if the user leaves a dialog open, and comes back much later and closes it, Panda3D crashes. I'm not sure how long it takes, but its less than several hours, and more than 4 minutes. Due to the excessive time required to test this, I have not verified if this is only an issue for the first frame (which is when it occurred for me the 2 times I produced it).

Produced both times in Panda3D 1.7.0 on Mac.

Revision history for this message
David Rose (droklaunchpad) wrote :

This is a simple case of integer overflow in the thread accounting code. The assertion will happen if you pause for more than 2^31 ticks, where a tick is 1/1000000 second, so a pause of 2148 seconds, or about 35 minutes, will be sufficient to cause the crash.

Fix committed.

Changed in panda3d:
assignee: nobody → David Rose (droklaunchpad)
status: New → Fix Committed
milestone: none → 1.7.1
Revision history for this message
Treeform (starplant) wrote : Re: [Bug 644914] [NEW] AssertionError in threadSimpleManager.cxx if frame rendered after long delay

Those blocking dialogs are evil, could also time out your network
connections, maybe close open file handles etc...
Its a valid bug, but i don't think panda3d was designed to be "paused"
like this. This is on Mac OSX right?

On Tue, Sep 21, 2010 at 10:18 PM, Craig Macomber
<email address hidden> wrote:
> Public bug reported:
>
> If I call graphicsEngine.renderFrame() after a very long delay (perhaps hours), I get:
> AssertionError: record._thread->_run_ticks >= record._tick_count at line 734 of panda/src/pipeline/threadSimpleManager.cxx
>
> This is an issue in the case where the application is left blocked (by a
> wx dialog in my case) and then unblocked much later. In my case, if the
> user leaves a dialog open, and comes back much later and closes it,
> Panda3D crashes. I'm not sure how long it takes, but its less than
> several hours, and more than 4 minutes. Due to the excessive time
> required to test this, I have not verified if this is only an issue for
> the first frame (which is when it occurred for me the 2 times I produced
> it).
>
> Produced both times in Panda3D 1.7.0 on Mac.
>
> ** Affects: panda3d
>     Importance: Undecided
>         Status: New
>
> --
> AssertionError in threadSimpleManager.cxx if frame rendered after long delay
> https://bugs.launchpad.net/bugs/644914
> You received this bug notification because you are subscribed to
> Panda3D.
>

Revision history for this message
Treeform (starplant) wrote : Re: [Bug 644914] Re: AssertionError in threadSimpleManager.cxx if frame rendered after long delay

Wow light speed, go go David!

On Wed, Sep 22, 2010 at 7:35 AM, David Rose <email address hidden> wrote:
> This is a simple case of integer overflow in the thread accounting code.
> The assertion will happen if you pause for more than 2^31 ticks, where a
> tick is 1/1000000 second, so a pause of 2148 seconds, or about 35
> minutes, will be sufficient to cause the crash.
>
> Fix committed.
>
>
> ** Changed in: panda3d
>     Assignee: (unassigned) => David Rose (droklaunchpad)
>
> ** Changed in: panda3d
>       Status: New => Fix Committed
>
> ** Changed in: panda3d
>    Milestone: None => 1.7.1
>
> --
> AssertionError in threadSimpleManager.cxx if frame rendered after long delay
> https://bugs.launchpad.net/bugs/644914
> You received this bug notification because you are subscribed to
> Panda3D.
>

rdb (rdb)
Changed in panda3d:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.