LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Calling cygjpeg6b.dll crashes LabVIEW everytime, no matter the chosen settings in Configure. Anyone know why?

I am trying to access the DLL cygjpeg6b.dll for fast internal compression and decompression of images int jpegs (without saving to files). I intend to use these compressed images to reduce network use in a code written to pass images from webcams between two linked computers.
I do not wish to use the IMAQ functions, hence my interest in this DLL.
However, no matter what I set in the Configuration for this DLL call, LabVIEW crashes immediately on clicking OK. Anyone know why? I presume I am calling it incorrectly, but I do not know why.
0 Kudos
Message 1 of 9
(3,738 Views)
Riggy wrote:
> Calling cygjpeg6b.dll crashes LabVIEW everytime, no matter the chosen
> settings in Configure. Anyone know why?
>
> I am trying to access the DLL cygjpeg6b.dll for fast internal
> compression and decompression of images int jpegs (without saving to
> files). I intend to use these compressed images to reduce network use
> in a code written to pass images from webcams between two linked
> computers.
> I do not wish to use the IMAQ functions, hence my interest in this
> DLL.
> However, no matter what I set in the Configuration for this DLL call,
> LabVIEW crashes immediately on clicking OK. Anyone know why? I presume
> I am calling it incorrectly, but I do not know why.

If you have tried the different calling conventions, are sure the data
types
are correct, you most probably call a function which expects an
array or string buffer to write some data into. Such buffers need to be
allocated always by the caller (e.g. LabVIEW in this case) BEFORE the
function is called.

So make sure you understand what the function expects, and allocate a
buffer big enough so the function can properly write into some memory.
Allocation of buffers in LabVIEW is most easily done with the Initialize
Array function and the resulting array is passed to the input terminal
for the according parameter on the Call Library Node.

Rolf Kalbermatter
Rolf Kalbermatter  My Blog
DEMO, Electronic and Mechanical Support department, room 36.LB00.390
Message 2 of 9
(3,737 Views)
Thank you Rolf for responding.
I do not get the opportunity to attempt to connect anything to the input terminals as LabVIEW crashes before returning me to the block diagram. Here are the steps I take...

1) Start a New VI.
2) Goto the Diagram.
3) Create ADVANCED -> CALL LIBRARY FUNCTION
4) Double click to enter the CONFIGURATION options
5) Select the Dynamic Link Library "cygjpeg6b.dll"
6) Select a function from the Function Name list.
7) Set the calling convention to Stdcall (have tried both stdcall and C)
😎 Set the parameters and their types (I have tried all possible combinations here to attempt to match the DLLs requirements, including Adapt to Type option).
9) Click OK

Result: LabVIEW crashes and exits completely without warning. Therefor
e I know the problem is not the diagram as I am not given the chance to link to the terminals or run the VI.
0 Kudos
Message 3 of 9
(3,737 Views)
Riggy wrote:

> Thank you Rolf for responding.
> I do not get the opportunity to attempt to connect anything to the
> input terminals as LabVIEW crashes before returning me to the block
> diagram. Here are the steps I take...
>
> 1) Start a New VI.
> 2) Goto the Diagram.
> 3) Create ADVANCED -> CALL LIBRARY FUNCTION
> 4) Double click to enter the CONFIGURATION options
> 5) Select the Dynamic Link Library "cygjpeg6b.dll"
> 6) Select a function from the Function Name list.
> 7) Set the calling convention to Stdcall (have tried both stdcall and
> C)
> 😎 Set the parameters and their types (I have tried all possible
> combinations here to attempt to match the DLLs requirements, including
> Adapt to Type option).
> 9) Click OK
>
> Result: LabVIEW cras
hes and exits completely without warning.
> Therefore I know the problem is not the diagram as I am not given the
> chance to link to the terminals or run the VI.

In that case there is something seriously fishy about the DLL. It most
probably won't work in any other application because the only thing
LabVIEW should be doing on OK is calling LoadLibrary() for the DLL. If
that already crashes the DLL has a serious problem in itself with
initializing. It could be that it doesn't find another dependant DLL or
device driver or simply a bug.

Rolf Kalbermatter
Rolf Kalbermatter  My Blog
DEMO, Electronic and Mechanical Support department, room 36.LB00.390
0 Kudos
Message 4 of 9
(3,737 Views)
Oh.
Ok, well, thanks for your advice Rolf, I guess I'll have to work on an alternative solution.

Cheers 🙂
0 Kudos
Message 5 of 9
(3,737 Views)
Hi,

I gather the following from the problem you are having.

1) The DLL seems to be corrupt.

2) Labview would only load the particular DLL when you select it.

3)Since this is a thirdparty dll,the support on this would be limited.

Hope this is of help.

Best Regards

Atul Wahi
Applications Engineer
www.ni.com
0 Kudos
Message 6 of 9
(3,737 Views)
Hi,

The dll seems to be part of Cygwin, so the support is probably not that
limited! I bet you can even get the source code...

Regards,

Wiebe.


"Applications Engineer" wrote in message
news:506500000005000000B4BE0100-1079395200000@exchange.ni.com...
> Hi,
>
> I gather the following from the problem you are having.
>
> 1) The DLL seems to be corrupt.
>
> 2) Labview would only load the particular DLL when you select it.
>
> 3)Since this is a thirdparty dll,the support on this would be limited.
>
> Hope this is of help.
>
> Best Regards
>
> Atul Wahi
> Applications Engineer
> www.ni.com
0 Kudos
Message 7 of 9
(3,737 Views)
Top posting fixed!

Wiebe@CARYA wrote:

> "Applications Engineer" wrote in message
> news:506500000005000000B4BE0100-1079395200000@exchange.ni.com...
>>
>>3)Since this is a thirdparty dll,the support on this would be limited.
>>
>
> The dll seems to be part of Cygwin, so the support is probably not that
> limited! I bet you can even get the source code...

I'm sure he was refering to support available through NI.

Rolf Kalbermatter
Rolf Kalbermatter  My Blog
DEMO, Electronic and Mechanical Support department, room 36.LB00.390
0 Kudos
Message 8 of 9
(3,737 Views)
I have the same problem when I try to call a dll I have.  However, I know for a fact that the dll is not corrupted because I am able to use another application that uses the same dll.  Has anybody figured out why LabVIEW crashes?
S G
Certified LabVIEW Architect, Certified TestStand Architect, Certified Professional Instructor
0 Kudos
Message 9 of 9
(3,528 Views)