03-30-2015 08:40 AM
So I have made a .dll in LabVIEW that I inted to use in CVI (you can reference this thread for some additional info about it) and it worked just fine on the computer I created it on. Trouble started when I began testing it on other machines. A little background of my set up might be helpful so here it is. I work in a HIL lab and we have a few different test setups including NI, dSPACE, and some proprietary testers. We use CVI to run test scripts and this .dll is used to control relays via USB.
The issue I am seeing is something I haven't seen before and am somewhat clueless as how to debug - I think it potentially could be a CVI problem. When this .dll and .lib are added to my project and I set a break point, everything seems to work fine. I step through my code and everyone runs as expected (.dll related functions as well as any other part of the program), but as soon as I hit the "Continue" button or the "Go to Cursor" button CVI freezes and subseqently crashes. The debug .exe stays open (but crashed) and I can't kill the process with Windows - I eventually have to restart the computer. My program will run just fine without break points and will let me step through to the end of the program if I have already set a break point.
I have run the same exact project on multiple computers and so far it has only happened with computer that have dSPACE/Matlab software insalled. I'm not sure if that is significant (it shouldn't make a difference) but it's another detail to report. I have tried CVI2013 SP2 on one of the dSPACE computers and that did not help (the rest of the computers still have SP1).
I've also looked through my LabVIEW .dll build settings, made adjustments, and rebuilt to see if that would help and it has had no effect.
Any input, direction, advice, etc. would be helpful. I'm stumped. Thanks in advance.
03-30-2015 11:05 AM
Hello,
It seems to be the same issue as in this other thread
The cause could be some windows with WS_EX_NOACTIVATE Extended Style.
You can start reading starting with page 4 because there are a lot of replies in there 🙂
Constantin
03-30-2015 12:31 PM
I read through from page and did as suggested by running that program you posted. Nothing in red came up and everything seemed okay. Here is a screenshot:
03-31-2015 11:44 AM
Can you try WebBrowser example(samples\userint\activex\WebBrowser.csw) to see if the debugger hangs?
Put a breakpoint for example on Refresh() callback. Run the program and push the refresh button, the breakpoint should be hit. See if continuing execution the hang happens.
Do you use TeamViewer on the computer you see the hang(see this reply)?
Other than that I have no other ideas.
Constantin
04-01-2015 10:04 AM
I just ran that example and set the breakpoint at Refresh(). It definitely hangs there and acts the same way as my project when I hit continue.
As far as TeamViewer goes, we do not use it at all. We just use standard mstsc to remote into computers and whatnot.
04-01-2015 10:08 AM
Hello,
Could you try debugging the dll without using remote desktop and whatnot to see if the hang happens.
Constantin
04-01-2015 10:25 AM
I just ran it locally and got the same crash and the same result in the WindowStyle project as my earlier screenshot.
04-02-2015 02:19 AM
I meant the project you have trouble with, not WebBrowser. WebBrowser should fail anyways.
Constantin
04-02-2015 07:38 AM
Yes, that is what I did. Appologies, I was referring to the first screenshot.
04-05-2015 03:56 PM