LabVIEW Crashes When Using a SubVI While Passing a 2D Variant Array

Updated Jan 16, 2025

Reported In

Software

  • LabVIEW

Issue Details

I am passing 2D array of Variant data types with different dimension size into a subVI to write the data inside a binary file. When running the Main VI LabVIEW crashes and automatically closes.

See the LV Crash 2D variant project file attached for the LabVIEW 2024 Q3 version. Here are the block diagrams of the Main VI and Sub VI.

  • Main VI

Main VI.jpg

  • Sub VI

sub VI.jpg

Solution

The crash happens when passing a 2D subarray that is effectively empty. The first dimension size is 1, the second dimension size is 0. So it is a 1x0 array.

This behavior is a bug and it will be fixed in future versions of LabVIEW.

You can use the reference method as a workaround, or avoid passing an array of variants via SubVI.

Workaround.jpg