LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Empty array size bug?

Hello,

 

Array Size function returns a non zero values for an empty 2-D array.  Please see attached VI (LV2009).

 

Can any one explain this?

0 Kudos
Message 1 of 5
(2,880 Views)

I can confirm this bug also exists in LV2010. The reported dimensions are 51x0. Bizarre.

 

If you change that control to an indicator and create an "empty" constant, the constant also contains the errant data... creating a new indicator from this constant yields the same bum data and the 51x0 dimension. So, the source of the bug must be within the underlying data.

0 Kudos
Message 2 of 5
(2,875 Views)

A thread you may find worth reading

 

Build Array from 2D to 3D.  Unexpected size.

Message 3 of 5
(2,871 Views)

Ravens, from that link Snamprogetti's comment on 4-28-2010 "If you create a constant from one of these weird arrays, the constant will not have the non-zero size." contradicts my findings "If you change that control to an indicator and create an "empty" constant, the constant also contains the errant data."

0 Kudos
Message 4 of 5
(2,865 Views)

It does seem to contradict, but I'm not so sure his description there accurately describes what he was doing.  He just says creates a constant from the "weird arrays", but really doesn't say where he was sourcing the constant from.

 

I found that if I create a constant from the indicator like you did, I get the 2x0 array.

If I create a constant from the wire going to the indicator, I get the 0x0 array (which sounds like what he got.)

 

(I told you that you'd find it worth reading.  Smiley Wink)

0 Kudos
Message 5 of 5
(2,853 Views)