LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

Debugger crashing after F5

Hello,

 

We could reproduce this hang with WebBrowser project on a particular machine whereas on most machines the hang doesn't happen. Since you could reproduce the hang with this project the cause might be the same but it's not 100% sure. In case of WebBrowser project the culprit was a window from the ActiveX control.

 

Constantin

0 Kudos
Message 31 of 49
(3,647 Views)

Hello Constantin,

 

please remember that I don't use ActiveX controls in my projects.

 

Best regads

Gunther

0 Kudos
Message 32 of 49
(3,639 Views)

I know you don't use ActiveX control and that's why I'm no sure the reason of the hang is the same as for WebBrowser project. The fact that WebBrowser hangs on your machine make me think there might be a common reason though.

For your project the hang happens all the time for a breakpoint or once in a while? Do you have pretty much the same uir in a case when the hang happens an one when it doesn't?

0 Kudos
Message 33 of 49
(3,632 Views)

I opened the WebBrowser example and stepped through code but couldn't get this one to hang on my machine.  Curious.

0 Kudos
Message 34 of 49
(3,623 Views)

Hello,

 

For WebBrowser project the issue was with an window with WS_EX_NOACTIVATE Extended Style.

I've created a cvi project attached that searches if there is such window int the program that might cause the hang. You could try this to see if you have this kind a window:

- Build the cvi project from attachement

- Cause cvi debugger to hang

- When it hangs run the program you built from attachement

- In Process ID box enter the process id of the program you are debugging (you can take it from task manager)

- Click on Get Windows button. If you have a window with WS_EX_NOACTIVATE extended style you should have a red item in the list

Window Style.png

 

Constantin

 

 

Message 35 of 49
(3,590 Views)

Hi, I seem to be having the same issue with a project I converted from CVI 8.1. After looking through some of the other threads regarding crashes on resume (watch variables, etc), I finally came accross this post regarding the extended style. I added another button to your program that runs the same code, but clears that window bit using:

 

newStyle = extStyle & !WS_EX_NOACTIVATE;
//LONG WINAPI SetWindowLong(
// _In_ HWND hWnd,
// _In_ int nIndex,
// _In_ LONG dwNewLong
//);
SetWindowLong(hWnd, GWL_EXSTYLE, newStyle);

 

This fixes the issue of CVI hanging on resume with the affected application. I can't figure out what is setting that bit for the style, it's not an option in the UIR editor. I have several panels which seem to have that bit set. The only way I can think of having this thing work would be to use an async timer and call my repair function every 500ms or so any newly displayed panels get fixed before the user interacts and causes a debug event... pretty crappy "solution".

 

It seems that all windows that have a tab control are affected, as well as a windows with an embedded IMAQ window, and one that has a child.

 

Any ideas?

0 Kudos
Message 36 of 49
(3,441 Views)

After playing with this all night, I noticed that clearing the bit from the style causes a blank window to be created in the taskbar. With Win7 Aero Peek on, you can hover and get a preview of the position and shape of the window. I noticed that the window had a single menubar button on it as well that was generated by TeamViewer. Disabling the QuickConnect button stopped the NOACTIVE windows that I was seeing and thus the crashes.

 

To disable the TeamViewer QuickConnect button, you can click it and select "Disable for this application" OR you can disable for all by right-clicking the teamviewer tray icon and selecting Toggle QuickConnect button.

 

 

0 Kudos
Message 37 of 49
(3,421 Views)

sivanov, so is your problem solved by disabling TeamViewer?

ElectroLund and Gunther, did you have a chance to run the program I posted?

 

Constantin.

0 Kudos
Message 38 of 49
(3,407 Views)

Constantin, my issue did indeed go away after disabling the TeamViewer QuickConnect buttons.

 

I now have another issue that I didn't have with CVI8.1, so I'm debating whether I should start another thread or not... You seems pretty knowledgeable, so I want to ask you:

 

I have a project that uses NI libraries (vision and imaqdx amongst others) and two 32bit libraries (one is for a USB motion controller and the other for an ethernet motion controller). In CVI8.1, this compiles and runs fine, but in CVI2013, it compiles but when I execute it, I get a Visual C++ Runtime Error: R6030 -CRT not initialized. I uninstalled and re-installed all of the VC++ redistributables from 2005 to 2013 with no luck. I also removed my AVG antivirus and replaced it with MSE with no luck. UAC is off on this machine.

 

1) I have a small test application with just the ethernet library (and some NI libraries but NOT the vision) and it runs fine in CVI2013

2) If I use just the USB library, my project (which also uses the vision library) works fine

2) If I use just the ethernet library, my project (which also uses the vision library) has the VC++ error

 

Do you have any ideas?

 

Stan.

0 Kudos
Message 39 of 49
(3,399 Views)

Hello Stan,

 

Please start a new thread. I do not know the answer for your problem.

You could add a screenshot with the error. Also, if you could provide a sample project that reproduce the problem would be helpful.

 

Constantin.

0 Kudos
Message 40 of 49
(3,388 Views)