LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

CVI2013 crashes when using .dll on *some* computers

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.

0 Kudos
Message 1 of 11
(5,365 Views)

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

0 Kudos
Message 2 of 11
(5,356 Views)

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:

 

Untitled.png

0 Kudos
Message 3 of 11
(5,351 Views)

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

 

0 Kudos
Message 4 of 11
(5,324 Views)

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.

 

2015-04-01 10-01-09_Window Style.png

 

As far as TeamViewer goes, we do not use it at all.  We just use standard mstsc to remote into computers and whatnot.

0 Kudos
Message 5 of 11
(5,308 Views)

Hello,

 

Could you try debugging the dll without using remote desktop and whatnot to see if the hang happens.

 

Constantin

0 Kudos
Message 6 of 11
(5,306 Views)

I just ran it locally and got the same crash and the same result in the WindowStyle project as my earlier screenshot.

0 Kudos
Message 7 of 11
(5,302 Views)

I meant the project you have trouble with, not WebBrowser. WebBrowser should fail anyways.

 

Constantin

0 Kudos
Message 8 of 11
(5,289 Views)

Yes, that is what I did.  Appologies, I was referring to the first screenshot.

0 Kudos
Message 9 of 11
(5,279 Views)
Use dependancy walker utility and determine what dependant components are referenced by the dll. Then determine the sizes and versions of the dependant files and see I'd you can see any variances between machines. That solves my issues the majority of times.
Jattie van der Linde
Engineering Manager, Software & Automation
TEL Magnetic Solutions Ltd
Message 10 of 11
(5,245 Views)