01-07-2015 04:10 AM
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
01-07-2015 05:05 AM
Hello Constantin,
please remember that I don't use ActiveX controls in my projects.
Best regads
Gunther
01-07-2015 05:47 AM
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?
01-07-2015 10:06 AM
I opened the WebBrowser example and stepped through code but couldn't get this one to hang on my machine. Curious.
01-16-2015 10:35 AM
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
Constantin
02-24-2015 05:03 PM - edited 02-24-2015 05:27 PM
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?
02-25-2015 07:56 AM
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.
02-25-2015 11:30 AM
sivanov, so is your problem solved by disabling TeamViewer?
ElectroLund and Gunther, did you have a chance to run the program I posted?
Constantin.
02-25-2015 01:47 PM
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.
02-26-2015 02:42 AM
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.