LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Strange crash with Intel FFT in Windows XP x64: only when first starting LabVIEW and opening VI, not when opening VI by double-clicking

When I use the Intel FFT libraries(MKL), I seem to have a strange crash whenever I start allocating the Intel DFTI descriptors. I call a DLL from LabVIEW 8.2.1, in which these functions are used. I am working on Windows XP x64. This seems like a bug which was present in these libraries, but I got the libraries where the bug was resolved.

The strange things is that, when I open LabVIEW and then open the VI, LabVIEW crashes from the moment I allocate an Intel Dfti descriptor. But when I just double-click the VI and open it this way, I can run the VI without a crash! I already removed the DLLs in \Program Files (x86)\National Instruments\Shared\MKL\MKL70 to see if they were the cause. But even without them, I still get the crash.

I know there was a strange crash in the previous version of Intel MKL when calling a DLL and allocating this type of descriptor, so it seems like somewhere LabVIEW still uses old versions of some of these DLLs. But even then, can this explain the difference in behaviour between opening the VI through LabVIEW or directly? And if so, were could I find these DLLs? I've already searched from them everywhere.
0 Kudos
Message 1 of 4
(2,637 Views)
Interesting effect... I guess, may be something wrong with entry point of the DLL. In the DLL you may have DllMain function, which will be called with DLL_PROCESS_ATTACH (or DLL_THREAD_ATTACH) parameter when you open the VI, which contains DLL call.
I will suggest to try do not call MKL DLL directly, but create your own wrapper DLL, where MKL DLL will be called. May be this will solve your problem (may be not). Also you can put the messages boxes into case inside of DllMain function and see possible differences between opening the VI through LabVIEW or direct open.
 
best regards,
Andrey.
 
0 Kudos
Message 2 of 4
(2,633 Views)
Well, I already used a wrapper DLL too, and this gives the same effect.

Do you have any idea what kind of message could give me interesting info?

Just for completeness, this does NOT happen on my XP x>86 machine. Also not when I call the DLL from any other non-LabVIEW exe. Let us hope this has nothing to do with OpenMP, since I remember having issues calling OpenMP DLLs from LabVIEW. From then on I started implementing my own threads. But with Intel FFT I do not have that choice.

But still, the crash reminds me of what happened with the previous release of these libraries, so i am still thinking about a version conflict.


0 Kudos
Message 3 of 4
(2,628 Views)
Update:

- Opening the single VIs directly by double-clicking indeed solves the crash: from then on I can run all VIs using the libraries without any problem. So LabVIEW must do something strange when it is opened.

- Linking my DLLs statically against the Intel libraries ALSO solves the prolbem. So this seems to indicate LabVIEW loads some dynamic library which screws up everything. But only on x64 systems Smiley Mad. This bloats my DLL, but currently I do not see another work-around.

Anyone has any more ideas? Otherwise I can always submit some test case to LabVIEW support.
0 Kudos
Message 4 of 4
(2,607 Views)