Jump to content

[SOLVED] Double precision build error in editor_controls.h update


photo

Recommended Posts

Hi,

 

Similar to my other bug report from this week, I've found a problem in editor_controls.h, where there's a conversion error between dvec3 and vec3. Prior to the call Unigine::getPlayerMouseDirection, there's a declaration of p0, and p1 which is vec3 rather than Vec3. This definitely causes a problem on the update cycle in certain use cases and is more serious since its repeated and can end up putting numerous errors in your log file/console fairly quickly. Additionally the velocity is declared as vec3 - I'm not sure if this should be Vec3 but I've changed our local copy to reflect this and haven't seen any problems after this change.

 

cheers

 

Craig

Link to comment

I found reproduction pretty difficult, generally I had to move the mouse focus in and out of the Unigine window, random mouse clicks - in the end I couldn't actually reliably figure out a use case that reproduced it. When I did reproduce, if you look at the code paths at line 592 and 642 of editor_controls.h these were where the problem occurred (I had to put some trace writes in the script to track it down to this point). So if you can follow the editor code around these lines, you guys might have a better idea of how to reproduce. And if you look at the interface of Unigine::getPlayerMouseDirection, it takes Vec3 instead of vec3, so the type mismatch is understandable.

Link to comment
  • 2 weeks later...
×
×
  • Create New...