SpaceNav3D
SpaceNav3D copied to clipboard
100% reproducible crash if you are moving w/spacemouse while changing maps
I installed this plugin by checking out from github on a windows machine into the Plugins folder and building the plugin myself. I built master d2f63632f3b0e734. I am using Unreal 4.18 on Windows 10.
If I open my project, the plugin works. However, if I am "touching" the SpaceMouse and I use File->Open Level, such that the camera is panning at the moment the old level closes and the new level opens, the Unreal Editor crashes. I saw this first by accident (I did not realize I was touching the spacemouse) and then a second time on purpose. It appears to repro 100%. When it crashes, the Minidump indicates that the problem is on this line
It appears this "GWorld" structure has been deleted as part of map closure, but the plugin has not noticed and is still trying to operate on it. I can provide you the minidump etc if it is helpful.
Thanks, I'll look into it. I might have to remove that GWorld->HasBegunPlay() test entirely if there is no mechanism to test if GWorld is valid or not. The Spacemouse will still continue to work when testing a level (as a game controller), but may behave slightly differently if the plugin is used in an actual game - but nobody is using it that way yet, as far as I know!
One thing I'd wonder is whether you get an event when the map shuts down which you can use to flag things. Another thing I'd wonder (I did not get a chance to look in a debugger) is whether your objects are still valid. Since you have the destructor for ~FSpaceNav3DController commented out it's not clear to me what prevents ProcessMessage from being invoked on a deleted object.
I think I fixed it - I was able to reproduce the problem, and then made the change. Let me know if the fix I pushed worked!
I used the answer to this question to help with the solution (assuming it works!): https://answers.unrealengine.com/questions/256170/getting-world-in-a-editor-plugin.html