USNavalResearchLaboratory / simdissdk

SIMDIS SDK
Other
114 stars 39 forks source link

Fast Mouse/Keyboard Events Crash Qt/SIMDIS Application #106

Closed faculaganymede closed 3 months ago

faculaganymede commented 4 months ago

This is a long shot, but just in case someone ran into the same issue or may have some ideas.

Mouse and keyboard work fine in my SIMDIS standalone application. However, after integrating with Qt, fast mouse and keyboard events cause the Qt/SIMDIS application to crash.

I'm capturing the mouse and keyboard events from my Qt main GUI and then send the events to SIMDIS for updating the 3D scene. For example, holding Shift + Up Arrow zooms in to the scene. If I hold Shift and press/release Up Arrow slowly, then it works fine zooming incrementally. If I hold Shift and press/hold Up Arrow (or press/release Up Arrow too fast), then the application crashes. It seems the key events are sent too fast from Qt to SIMDIS to cause the crash (I tried adding a small time delay but didn't help).

Also, the left and right mouse keys work fine for pan and rotate, however, scrolling the middle mouse wheel to do zooming immediately crashes the applications.

emminizer commented 4 months ago

Sorry there aren't enough details to reproduce here. We've not seen anything similar. This is going to depend heavily on how you integrate your Qt/SIMDIS app together and how you write your key handler. I'm not sure why speed from Qt to main GUI would matter since Qt should be in the same thread as your renderer, so there shouldn't be any threading or race conditions.

Are you saying that when you scroll with middle mouse, even in the Qt examples with no modifications, you're getting a crash?