From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

How to localize cause of GPF at RunUserInterface (unknown position)

Hallo,

 

I'm facing the random GPF pointed to the RunUserInterface thread at unknown position; unfortunately the condition of the crash is really random (sometime suddenly after the initialization the application, sometimes after quite log run, sometimes after mouse cursor pointing to tooltip, ...).

 

The developed application (under CVI 2012 SP1 as 32-bit app for Win) is quite complex user interface to distributed control system using external dll library as the data layer. This library is running it's own threads and I'm using the multithreading library TSQ concept to get data from data layer.

 

Have anyone some hints to reveal the cause?

 

I've digged this, this, and this - but not have no success to follow the hints. After the crash (release mode) there isn't obvious "crash dump" Windows dialog. Iinstead of this a dialog box to start the (CVI) debugger appears - but it leads again in the blind way. After start of the CVI, there is message no debugging information (?), "unknown position at thread id  XYZ ..." (note the XYZ corresponds the main thread id again).

 

Thanks for any help!

 

George

0 Kudos
Message 1 of 6
(3,565 Views)

HI,

excuse me for inaccuracy and misleading claims - the GPF has already known address position (in this case 0x41DF10) - but not location clarifications (like foo() function ...).

George

0 Kudos
Message 2 of 6
(3,549 Views)

Hello,

I'v made some investigation around (please see attached pictures) and there is some question.

 

- Firstly (according the RunUserInterface_error.png) - is the pointed address of crash (like "... fault at address ..." related to the address in map file?

 

- If so, how is the GetCtrlToolTipAttribute function invoked? May be there problem with the duplicated panels and duplicate tab panels with tooltip activated? Is the tooltip functionality multi-thread safe?

 

- Secondly (see RunUserInterface_error_1.png) - could someone help me how to interpret the WinDbg debug message? I'm absolutely intact beginner in this ...

 

Thank's all

 

George

Download All
0 Kudos
Message 3 of 6
(3,541 Views)

Does the error raises when you are duplicating a panel? Tooltips have been moved to User Interface library so now their code is not public, but before they were included in the Programmer's Toolbox and I seem to remember that they were using panel and control callbackData parameters to operate, chaining some data to them. This can give some problem when duplicating the panel, so you may try uninstalling the tooltip before duplicating the panel and reinstalling it afterwards both on original and new panel controls: hopefully this will prevent the error.

 

No info on WinDbg here: it's a complete mistery to me too Smiley Embarassed



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 4 of 6
(3,533 Views)

Hello,

thanks Roberto for your concern!

 

Unfortunately there isn'n any explicit and direct relation to the gui operation (there involve duplicating of tab panels with tooltip enabled, creating the panels from hidden template - again with the tooltips etc.)

 

But! If I'm not on wrong path, there are circumstances indicating a problem in toolbox library - see the attached picture (I'v gained a little progress in collaboration with WinDbg and Dr. Watson ... Smiley Happy). On the left is WinDbg interpretation of crash dump, on the right is the map file content.

 

Thread list sems to be correct, I'v found ThreadsId of some used threads, the 000:1244 belongs to mainTheadId.

 

The call stack probably shows activity of tool tip function:

 

cvirte!clock + 0x9F3

cvirte!clock + 0x60A

cvirte!SetIdleEventRate + 0x7A3

cvirte!SetIdleEventRate + 0x23F

Siimon + 0x27204

Siimon + 0x1A780

 

I'm a little confused discrepancy with the table of symbols (map file) - the offsets of function doesn't perfect match. Could someone knowledgeable shed light on this, please?

 

Or is it just a coincidence and I have nothing to do with tooltip and I'm facing problems with overwriting memory or something similar?

 

Thank for any expert voice!

 

George

0 Kudos
Message 5 of 6
(3,525 Views)

Hello,

 

I've found mix use of function dealing with tooltips:

 

Get/SetCtrlToolTipAttribute() (from Programmer's Toolbox Library)

and

Get/SetCtrlAttribute(...,ATTR_TOOLTIP_TEXT/ATTR_DISABLE_CTRL_TOOLTIP...)

 

After replacing the function from Programmer's Toolbox Library the problem disappears...

May be I've missing some information from documentation, but I had considered that in the case of toolstip caution is no need when using functions from the Programmer's Toolbox...

 

Regards,

George

0 Kudos
Message 6 of 6
(3,483 Views)