07-07-2016 05:58 AM - edited 07-07-2016 06:17 AM
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
07-07-2016 09:03 AM
A question and a comment.
Bob Schor
07-08-2016 05:10 AM
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.
07-08-2016 06:53 AM
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.
07-08-2016 09:13 AM - edited 07-08-2016 09:15 AM
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:
07-08-2016 09:36 AM
Would it work to make a DLL from the code on the working windows, and call the code from the DLL?