yade-dev team mailing list archive
-
yade-dev team
-
Mailing list archive
-
Message #14540
fixing crash after toggling intrAllWire
-
To:
"yade-dev@xxxxxxxxxxxxxxxxxxx" <yade-dev@xxxxxxxxxxxxxxxxxxx>
-
From:
Janek Kozicki <cosurgi@xxxxxxxxx>
-
Date:
Thu, 24 Jan 2019 20:35:27 +0100
-
Face:
iVBORw0KGgoAAAANSUhEUgAAADAAAAAwBAMAAAClLOS0AAAALVBMVEUBAQEtLS1KSkpRUVFXV1dYWFhjY2Nzc3N3d3eHh4eKioqdnZ24uLjLy8vc3NxVIagyAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAB3RJTUUH2AIVEzgS1fgQtQAAAjRJREFUOMtt1DFv00AUAOAzFQNbjigSyoQaRaBMhKgLUyKXpVNNeUpk9vyDqFJhQ1kiBuaqAwJCqvPtSLY7RlTn5+5IdnYkkt/AOyfxXVLe5vf53Z1875kd34tOEax8djmj6GyjhB5bxz50GdsVZr9fqRjZwAtKOJw5Wqs2MMZ16ALHsaDncF7xAHix1oEFHAB8f+pRjcO4gfZDykcYzbiucRolOLUJ6kjA0xtVt+A6TySlM0RajIpK6DzwKZ/nOYbF/gclHMo1ZOHYY/+Ha+AWuM+3oMS4eeqYzZ8FiCltgUqI8cd2wwAVpJk+8LWYjBtnJdQpHQqJMd4Oxt4bU9ESiFGc5hkqaH74asAX4iabP5I5gZ+qjgGlJCqZa3h3lxhoeVcSE1qLQC4sqKOK9MGW9E3izFqqHokoztLFEgXg31sbZEKnWi2T74A4NxfVQqlkjKtcAWD+zcArFEES01dR0E/nnV0IgugmDd/2L84sOAouRBBHEc7gtc8teDkRlE0iNQPo2w3Xhh/D4TCIQ4LRLoTvgwjj6RRgavdurxYGMaIuGOyAW/PpNlCcU9/93AHenAWYjPoAwa+G3e3to/MgFNTAEKvKDjzuCzHTnY3qqdXtx24VijzQfZ0yewZ5cwRFQaa+mIYr1uI0I76+3W4xhlvoVRwOA0Fdl64HlJnxP6T8YpX/Lga4Wv4A3ErrU5oTfN7Mu/llXMl8RXEPji/lQkN3H7qXqgC2By47EXeU/7PJ/wPxRKMnuZwIeAAAAABJRU5ErkJggg==
Hi all,
While investigating examples/PotentialParticles/cubePPscaled.py I had a crash
when toggling intrAllWire.
That was due to trying to draw an interaction to a body which has been deleted.
So in OpenGLRenderer.cpp:227 I added a safeguard to not draw such interactions.
But there is still a bug looming in there:
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?
I marked all these places in this commit, so that it will be easier to discuss it:
https://gitlab.com/yade-dev/trunk/commit/8eca8eb7121491df25639d8fc7b966acef1c92c0
Also these messages:
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.
best regards
Janek Kozicki
Follow ups