LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

GPF error on picture ring with Ctrl+Home keys

Solved!
Go to solution

I am facing a strange behaviour while upgrading an application of mine, with GPF error occurring when I press Ctrl+Home keys with focus on a picture ring:

Screenshot 2017-02-18 00.20.33.png

The address location remains the same all times when I work within the IDE; when I create the executable the error message does not show but the program crashes.

 

In system event viewer I see the following record that points to the runtime engine:

Nome dell'applicazione che ha generato l'errore: #######.exe, versione: 33.3.0.0, timestamp: 0x58a77f5d
Nome del modulo che ha generato l'errore: cvirte.dll, versione: 15.0.1.239, timestamp: 0x57636f1f
Codice eccezione: 0xc0000005
Offset errore 0x0010100d
ID processo che ha generato l'errore: 0x2054
Ora di avvio dell'applicazione che ha generato l'errore: 0x01d28970f82e4fbd
Percorso dell'applicazione che ha generato l'errore: C:\############.exe
Percorso del modulo che ha generato l'errore: C:\Windows\system32\cvirte.dll
ID segnalazione: 407fae2c-f564-11e6-8305-00c2c6885ebd

I stripped down the application to the minimum sample program attached that exhibits the behaviour. While doing so, I found that a similar error occurs if I operate the picture ring in the UIR editor, but with a more serious error that crashes the IDE:

Screenshot 2017-02-18 00.20.04.png

 

It seems to me that only Ctrl+Home key combination is critical: I attempted other combinations without problems (Ctrl+I, Ctrl+End, Ctrl+Enter, Ctrl+Fx keys...).

 

Anybody has some clue to address this error?

 

I'm currently working on a Win7Pro machine with CVI 2015SP1 installed.

 



Proud to use LW/CVI from 3.1 on.

My contributions to the Developer Community
________________________________________
If I have helped you, why not giving me a kudos?
Message 1 of 7
(3,330 Views)

Hello Roberto,

 

Unfortunately there is no solution to this crash other to using other controls. I determined the issue was introduced in CVI 2012 and created CAR ID 631752.

Thank you for reporting the issue and sorry for the inconvenience.

 

Constantin

0 Kudos
Message 2 of 7
(3,267 Views)
Solution
Accepted by RobertoBozzolo

That's bad news! Smiley Sad The problem is that if you have an active picture ring you are likely to get this error since you cannot prevent the operator to press such keys.

 

Fortunately, it seems that swallowing the keypress event in case of Ctrl+Home key combination is enough to prevent the error from happening.

case EVENT_KEYPRESS:
	virtualKey  = GetKeyPressEventVirtualKey (eventData2);
	modifierKey = GetKeyPressEventModifiers  (eventData2);
	if (modifierKey == VAL_MENUKEY_MODIFIER && virtualKey == VAL_HOME_VKEY) return 1;

Can you confirm this?

 

If the workaround is valid, we will need to add this piece of code in any project that makes use of picture ring controls. Do you know if there are other key combinations that may cause this to happen?

Is there any forecast on when this problem will be addressed?



Proud to use LW/CVI from 3.1 on.

My contributions to the Developer Community
________________________________________
If I have helped you, why not giving me a kudos?
Message 3 of 7
(3,262 Views)

Swallowing the keypress indeed avoids the issue. Kudos for finding this workaround!

The problematic keys are "Home" and "Page Up". Ctrl doesn't have to be press for the crash to occur.

0 Kudos
Message 4 of 7
(3,252 Views)

Thanks, so I'll swallow these two keys regardless the presence of some modifier key added.

Keep us informed on corrections for this subject



Proud to use LW/CVI from 3.1 on.

My contributions to the Developer Community
________________________________________
If I have helped you, why not giving me a kudos?
0 Kudos
Message 5 of 7
(3,248 Views)

This error is listed as solved in CVI2017 bug fix list



Proud to use LW/CVI from 3.1 on.

My contributions to the Developer Community
________________________________________
If I have helped you, why not giving me a kudos?
Message 6 of 7
(3,035 Views)

I didn't even know CVI2017 had been released yet, but there it is on the NI site, available for download.  Was there an announcement that I missed?

0 Kudos
Message 7 of 7
(3,028 Views)