LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

General Protection Fault - RTE 9.0.1

Hmm seems I spoke too soon Nick.  After some poking I have been able to successfully crash one of the other panels in the same manner.  I will continue some poking on my end, but I think we can stick the fork in this one!
0 Kudos
Message 11 of 13
(1,071 Views)
Sorry Nick, hopefully this will be my last question.  Am I correct in the assumption that the more top-level panels we kick off the more likely we are to see this problem?  This could explain why this issue is seen more on some projects then others (since, assuming I'm right that the previously posted callback is the root issue, and that callback is in every project we use....)
0 Kudos
Message 12 of 13
(1,068 Views)

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 

0 Kudos
Message 13 of 13
(1,064 Views)