CloudCompareStereo crashes on redraw()

For any question about plugins!
Post Reply
PhilipK
Posts: 6
Joined: Tue Apr 14, 2020 12:02 pm

CloudCompareStereo crashes on redraw()

Post 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.
daniel
Site Admin
Posts: 7713
Joined: Wed Oct 13, 2010 7:34 am
Location: Grenoble, France
Contact:

Re: CloudCompareStereo crashes on redraw()

Post 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)
Daniel, CloudCompare admin
PhilipK
Posts: 6
Joined: Tue Apr 14, 2020 12:02 pm

Re: CloudCompareStereo crashes on redraw()

Post by PhilipK »

Hello,

I understand - thank you very much for your quick reply!
I will try out your solution and post the result here.
PhilipK
Posts: 6
Joined: Tue Apr 14, 2020 12:02 pm

Re: CloudCompareStereo crashes on redraw()

Post 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.
Post Reply