03-30-2010 07:41 AM
03-30-2010 08:04 AM
03-30-2010 09:05 AM
Actually Mark, I think the best way to work around the issue is to remove that ProcessSystemEvents from the MainPanel callback. That is exactly what I was seeing in the crash dump. That ProcessSystemEvents is being called for *every* event that gets sent to the main panel (except EVENT_CLOSE of course). This can cause an incredibly deep stack because you are never allowed to leave that function as long as events keep coming in to that panel (and mouse events alone could potentially cause this stack corruption).
In your particular case, the EVENT_MOUSE_POINTER_MOVE was actually being generated by moving the mouse over a non-active panel, which I'm assuming was your main panel - not the popup panel.
I would be confident in saying that removing that one ProcessSystemEvents would solve all of these crashes. That call to ProcessSystemEvents should be entirely unnecessary anyways, as long as you are managing the main panel's events with RunUserInterface. The reason for this is that as soon as you remove that ProcessSystemEvents, the function will return immediately for all events, and then be back in RunUserInterface which internally calls ProcessSystemEvents.
I have also filed a bug report to fix a bug that allowed this recursion to continue in our run-time when it should have been stopped. The bug ID is 217094.
NickB
National Instruments