← Back to team overview

yade-dev team mailing list archive

Re: fixing crash after toggling intrAllWire

 



On 1/24/19 8:35 PM, Janek Kozicki wrote:
A body can get deleted between lines 227 and line 238 in OpenGLRenderer.cpp
And I am right now not sure what happens if we requestErase from separate thread.
Because OpenGLRenderer runs in separate thread.

Also this code seems to be a duplicate of similar codes in Dispatching.cpp:123
and InteractionLoop.cpp:73
Maybe better to move these four lines (check if body was deleted, then
requestErase interaction) somewhere and just call this function from
these three places?
The fact is that BodyContainer::erase() is already requestErase'ing.
I wonder if those checks in interactionLoop and Dispatching couldn't be simply removed. Can a body vanish without being erased? Interactions management evolved with time and each update was implemented defensively. We end up with over-defensive code, seems to me.
Something to check carefully after freeze maybe.



InteractionLoop.cpp:73 action: Body #76 vanished, erasing intr #76+#97!
InteractionLoop.cpp:73 action: Body #21 vanished, erasing intr #21+#96!
InteractionLoop.cpp:73 action: Body #21 vanished, erasing intr #21+#2!

Are really spamming the terminal. Yes they are nice. But we should do something
about default setting of LOG_DEBUG messages to not spam people who don't
understand what's going on. Actually that was a reason for which
I marked some examples as either suspicious or not working. And that
wasn't an error introduced by the author of the example.
Should definitely not appear. A remaining of the times when logging was more fine-grained and LOG_DEBUG was silent by default.

Bruno




References