LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

png getrawdata.vi: Not working Windows 8.1 (or higher) but working on win 7 or lower

Hello All,

 

I have a small problem: certain VI not working that I use to read PNGs, get alpha data and to draw the (semi transparant) image over a background.

Vi is working fine when I am running the code on win 7, on win 8 it thows an error.

Error occurs in the deflate stream read (array offset, count)

 

Anyone any idea how to fix it?

VI is part of the PNG tools package.

 

 

 

 

 

 

Error 1172 occurred at Invoke Node System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation.
    Inner Exception: System.InvalidOperationException: Reading from the compression stream is not supported.

Possible reason(s):

LabVIEW:  A .NET exception occurred in an external assembly. For information about correcting this error, copy the following exception (in bold), and search the Microsoft Developer Network (MSDN) Web site or the Web for a possible explanation.
=========================
LabVIEW:  A .NET exception occurred in an external assembly. For information about correcting this error, copy the following exception (in bold), and search the Microsoft Developer Network (MSDN) Web site or the Web for a possible explanation.
System.InvalidOperationException in PNG GetRawData.vi

 

 

 

png get raw data problem.png

 

0 Kudos
Message 1 of 6
(3,298 Views)

A question and a comment.

  • What is "the PNG tools Package"?  I went to the LabVIEW Tools Networks and there was no package (in the 2015 collection) with PNG in the title (or at least VIPM found none).
  • I recall seeing Error 1172 and being "fooled" by the error message, but couldn't remember the circumstance (it's right on the edge of my memory, darn it -- maybe having to do with reentrancy, or Strict typing, or something like that?).  While looking through the Web to jog my memory (not very helpful!), I did come across a note that said "The error went away when we did Run as Administrator".  I doubt this is your problem, but give it a try ...

Bob Schor

0 Kudos
Message 2 of 6
(3,274 Views)

Hi Bob,

 

Thanks for the suggestions. I tried setting Labview to run as administartor - no luck-.

My guess would be there is something different in the Win7 and windows 8.1 method I am using.

 

When compiled on the windows 8.1 and run on windows 7 pc or older, this piece of code always doesnt work (so the VI is not broken, but it will throw this error).

 

I included the whole library. I think I got it from the forum here long time ago.

 

 

0 Kudos
Message 3 of 6
(3,258 Views)

Error 1172 simply means there was an exception returned when calling .NET code. The specific exception details are shown in the text. Specifically, "Reading from the compression stream is not supported". I don't know anything about this, but I would start with searching for that to see if other people ran into this.


___________________
Try to take over the world!
0 Kudos
Message 4 of 6
(3,254 Views)

When I compile the code into an exe on a WIN 7 pc for example and run on the problem PC (win 8.1), then it works suddenly.

The other way around; compiling the code on win 8.1 running on win 7 or lower leaves the code broken.

 

So it is possible for the code to work on the win 8 pc. I can't find any relating the error (already googled at first). I'm also not a genius with .net (to say the least) so I really don't know where to look.

 

EDIT:

 

This seems to be the same problem more or less:

 

http://forums.ni.com/t5/LabVIEW/Weird-behaviour-with-NET-constructor-node-and-GZipStream/td-p/290090...

0 Kudos
Message 5 of 6
(3,248 Views)

Would it work to make a DLL from the code on the working windows, and call the code from the DLL?

0 Kudos
Message 6 of 6
(3,242 Views)