LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Labview crashing when trying to load a dll

Hello All,

I try to call a dll from labview (8.5, 8.6.1 or 2011) and labview is crashing when labview is trying to load the dll.

The dll is located in the same directory as the calling vi.

When I use an executable (that was created using labview) to call this dll everything is working OK.

I use a Win7 OS. A week ago everything was working fine, the only change that was done is that I uninstall the executable program and latter on installed it back.

The dll is part of this executable.

I know that this sound as realy windows voodoo problems but I hope someone had a similar problem.

I tested the same dll with the same applications on other PC and they are all working with no problems (including an XP OS)

 

If any other information is required please let me know.

0 Kudos
Message 1 of 7
(2,352 Views)

You need to elaborate a bit more about the relationship between the executable, LabVIEW and the dll. I.e. how is this exe installed and uninstalled (do you delete a file or call an installer)? When you uninstalled it did it delete the dll as well? Maybe you installed a newer version of the dll and that's why it crashes. Is this a exe that you built yourself. Are you on and is LabVIEW 64/32 bit? What is this dll call doing?

I'd start by looking at the dll prototype and see if anything has changed and then double check that LabVIEW calls it correctly. It might help if you post the dll function as it was exported and the part of the VI that calls it.

0 Kudos
Message 2 of 7
(2,348 Views)

The exe is created using labview 8.5, the dll is built from labWindows CVI. The installer of the exe is created using "NSIS (Nullsoft Scriptable Install System, is a tool that allows programmers to create such installers for Windows.)

To uninstall the exe I used windows remove programs tool.  

The installer is actually extracting all files related to this exe (including the dll) into a main folder where this exe is also stays.  The uninstalled deletes all files including all dlls.

This dll has only one version and it was not change for several years (the same dll with the same exe is working on other machine and was working on my machine previous to the uninstalled – installed steps)

The Labview is a 32bit and also the OS. The purpose of the dll is to present a contour graph.

If I copy the same dll to another machine it works fine.

I hope this information elaborate in some way the problem.

If you need any further information please let me know.

0 Kudos
Message 3 of 7
(2,338 Views)

I added also a test vi "Contour Plot test.vi" with the dll "ContourPlot.dll" and also the sub dlls that this dll requires.

The labview version of this vi is 2011.

I also attached the report that the labview creates when it crashes

I hope this will also help

 

Thanks

Lior

Download All
0 Kudos
Message 4 of 7
(2,334 Views)

I ran it and it didn't crash on my computer (Win7, 32bit LabvIEW, 64bit OS). I couldn't really see anything from the crash dump other than there was an access violation.

 

You said that there's only one version of the dll. Were you referring to the "ContourPlot.dll" only? If the other dlls (in that folder) have more than one version it's possible that one of them are different than what the top level dll is expecting. Either way, I'd search the whole computer for these dlls and make sure that they exists only in one folder so that you know for sure what is being loaded.

 

The only other thing I can think of is to run process monitor (http://technet.microsoft.com/en-us/sysinternals/bb896645.aspx) on LabVIEW both when it crashes and when it doesn't and try to compare them. You can post the log if you wish.

 

Matt

0 Kudos
Message 5 of 7
(2,330 Views)

Hi Matt,

The problem is somehow related to my PC, Also I when I run this dll on other computer (win XP or Win 7) it works fine.

Since I uninstalled and then re-installed the exe this crashing problem started and no matter what version of labview I run, labview crash when I call the dll.

There is only one version of the "ContourPlot.dll" and the other CVI dlls on my pc.

I will try to take the actions that you suggested and update if there is any change.

 

Thanks

Lior

0 Kudos
Message 6 of 7
(2,326 Views)

I have seen this before. Make very sure that you do not have two copies of this DLL on your computer. If you have one in memory and try to access one from a different place then you see this happen.

Tim
GHSP
0 Kudos
Message 7 of 7
(2,321 Views)