12-03-2010 07:01 AM
Hi everyone,
I use LabView 2010 with the NI Vision package for various image processing tasks. I wanted to generate a .net assembly, but stumbled upon an error building it.
The image shows the VI I wanted to export for test purposes.
However, when I want to build the assembly, I get an error:
Error 1172 occurred at Error calling method NationalInstruments.LabVIEW.VIParser.VIParser.SetVIInformation, (System.Reflection.TargetInvocationException: Ein Aufrufziel hat einen Ausnahmefehler verursacht.
Inner Exception: System.IndexOutOfRangeException: Der Index war außerhalb des Arraybereichs.)
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.
System.IndexOutOfRangeException in AB_Engine_InteropAssembly_ProtoDefined.vi->AB_InteropAssembly.lvclass:Build.vi->AB_Engine_Build.vi->AB_Build_Invoke.vi->AB_Build_Invoke.vi.ProxyCaller
I would much appreciate any help in finding the source of this error. When I build the assembly as a shared library, no problems arise.
Thanks in advance,
George
01-11-2011 07:33 AM
I had a similar error and the reason was a broken build specification. Try to create a new build specification for the interop assembly . Modifying the existing build spec was not succesfull.
Maybe it's a LV2010 bug.
Hope it helps
Christian
01-11-2011 09:33 AM - edited 01-11-2011 09:35 AM
Similar problems with multiple TKs
Working with R&D, the GPS TK, NI Audio TK and SM TK encounter the simillar issues. We suspect it is an installer issue related to this report.
Essentially, you may predict this behavior will exist for TKs that install with the "For latest" option. That is, you can automatically install support for
8.5
8.6
Latest
Current workaround is to build .NET interops or DLLs that require these toolkits with LabVIEW 8.6.1
R&D? can you add to this summary?
01-11-2011 09:44 AM
Edit
CAR 221903
03-16-2016 10:13 AM
Along these lines I'm pretty sure I got this error, because I had deleted one of the VI outputs that was (of course) still referenced in the function prototype.
Error 1172 occurred at Invoke Node System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation.
Inner Exception: System.NullReferenceException: Object reference not set to an instance of an object.
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.
System.NullReferenceException in AB_InteropAssembly.lvclass:Build.vi->AB_Engine_Build.vi->AB_Build_Invoke.vi->AB_Build_Invoke.vi.ProxyCaller
10-03-2017 12:21 PM
Yes, I got this error when I deleted (in my case) a VI input. You then have to remove the VI from the "Exported VIs" list in the assembly properties and re-add it to correct the prototype.
10-03-2017 12:38 PM
@JonP wrote:
Yes, I got this error when I deleted (in my case) a VI input. You then have to remove the VI from the "Exported VIs" list in the assembly properties and re-add it to correct the prototype.
Jon, Check the post dates above 😉
10-03-2017 03:44 PM
Jon, Check the post dates above 😉
Yes, I saw the dates, but this error is still occurring in LabVIEW 2015 at least - I found this post when I Google'd it - so any information I can add is surely relevant. I'm not sure why people seem to think that it is bad form to reply to an old post, even if it is just to confirm that a suggested fix works.