Page 1 of 1

CloudCompareStereo crashes on redraw()

Posted: Tue Apr 14, 2020 12:13 pm
by PhilipK
Hello,

I'm currently developing a custom plugin.
One of the implemented features is to rotate the view around the current object.
Therefore I spawn an animation-thread (new QT Thread), calculate the rotation matrix and then call the following code line (inside the animation-thread):

Code: Select all

m_app->getActiveGLWindow()->redraw();
With standard CloudCompare (v2.10.2) the plugin works well, but with CloudCompareStereo (v2.10.2) the plugin crashes when "redraw()" is called.

Re: CloudCompareStereo crashes on redraw()

Posted: Tue Apr 14, 2020 5:31 pm
by daniel
The 'stereo' version uses a quite different OpenGL context and drawing surface (to support quad buffer rendering, etc.).

I'm not sure it is safe to call 'redraw' directly in a separate thread. Can you try with a 'queued' signal? (so that the call is made from the main application thread)

Re: CloudCompareStereo crashes on redraw()

Posted: Wed Apr 15, 2020 8:58 am
by PhilipK
Hello,

I understand - thank you very much for your quick reply!
I will try out your solution and post the result here.

Re: CloudCompareStereo crashes on redraw()

Posted: Wed Apr 15, 2020 12:31 pm
by PhilipK
Hi Daniel,

Thank you for your advice - finally I solved it just by calling the animation code and

Code: Select all

m_app->getActiveGLWindow()->redraw();
within a QTimer which I started from the main Plugin thread.