OGRECave / ogre

scene-oriented, flexible 3D engine (C++, Python, C#, Java)
https://ogrecave.github.io/ogre/
MIT License
3.93k stars 970 forks source link

unload samples crashes SampleBrowser in debug mode #1813

Open Joilnen opened 3 years ago

Joilnen commented 3 years ago

In commit e40a8b1e2c8b0962c7f99fed998db97e0a63472a I get crash when I click "unload samples" and got this messages

ninstalling plugin: DefaultSamplesPlugin Plugin successfully uninstalled Unloading library /home/joilnen/ogre3d_devel/ogre3d-1.12.11/build/lib/DefaultSamples Uninstalling plugin: PlaypenTestPlugin Plugin successfully uninstalled Unloading library /home/joilnen/ogre3d_devel/ogre3d-1.12.11/build/lib/PlayPenTests SampleBrowser: /home/joilnen/ogre3d_devel/ogre3d-1.12.11/OgreMain/include/OgreMath.h:708: static T Ogre::Math::Clamp(T, T, T) [with T = long unsigned int]: Assertion `minval <= maxval && "Invalid clamp range"' failed. Aborted (core dumped)

Joilnen commented 3 years ago

I think this issues doesn't happen only in debug mode, probably it is not the best fix, but the problem seems to be fixed if this asssert line in OgraMath.h, commented, I got no more crashes, how I think it is not the best fix, I only send you a diff to you figure out what I mean.

diff.txt