LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Bug in LabVIEW 2017, 2018, 2019 and 2020: Arithmetic operation returns incorrect result for large arrays

Like Bert, I get this error as soon as the number of elements is bigger than 2147483647 (7FFFFFFF).

 

It's curious that Add and Subtract are bugged, but Increment and Decrement work.

 

This is on LabVIEW 2019 Sp1 19.0.1f3. and an i7-6700HQ.

Message 11 of 13
(667 Views)

@ngene wrote:

@FireFist-Redhawk wrote:

I ran your VI in 2017 and got the correct result. 2017 64 bit Professional, Windows 10 Enterprise, 64GB onboard RAM.

 


Interesting and more confusing.

These are the results we get for different array dimensions in LV17.

(dimension size) x (dimension size 2) >> Output

1k x 3M >> 1   (incorrect)

2k x 3M >> 11 (correct)

3k x 3M >> 11 (correct)

4k x 3M >> 1   (incorrect)

5k x 3M >> 11 (correct)

5.1k x 3M >> 1 (incorrect) 


Well first off, let's all agree that you can initialize an array with a total number of elements greater than max(I32). I initialized a 10k by 3M array (30 billion elements) just fine. So that settles that.

 

The add function though, is indeed behaving a little weird on large arrays. After I initialize a 2k x 3M array, the add doesn't happen starting at index1 568, index2 around 1,303,000 (didn't wanna crash LV by adding code to figure out exactly where):

Spoiler
FireFist-Redhawk_0-1599565710027.pngFireFist-Redhawk_1-1599565764211.png

Initializing a 3k x 3M array, this same thing happens at index1 = 136, index2 ~ 2,060,000:

Spoiler
FireFist-Redhawk_2-1599566099212.png

But, BUT, initializing a 1k x 3M array, the add fully completes:

Spoiler
FireFist-Redhawk_3-1599566219634.png

Not sure exactly what is happening, but seeing as I'm getting different results than the OP, I'm guessing computer hardware is making some sort of difference. What is your processor and onboard RAM?

Redhawk
Test Engineer at Moog Inc.

Saying "Thanks that fixed it" or "Thanks that answers my question" and not giving a Kudo or Marked Solution, is like telling your waiter they did a great job and not leaving a tip. Please, tip your waiters.

0 Kudos
Message 12 of 13
(658 Views)

@FireFist-Redhawk wrote:

@ngene wrote:

@FireFist-Redhawk wrote:

I ran your VI in 2017 and got the correct result. 2017 64 bit Professional, Windows 10 Enterprise, 64GB onboard RAM.

 


Interesting and more confusing.

These are the results we get for different array dimensions in LV17.

(dimension size) x (dimension size 2) >> Output

1k x 3M >> 1   (incorrect)

2k x 3M >> 11 (correct)

3k x 3M >> 11 (correct)

4k x 3M >> 1   (incorrect)

5k x 3M >> 11 (correct)

5.1k x 3M >> 1 (incorrect) 


Not sure exactly what is happening, but seeing as I'm getting different results than the OP, I'm guessing computer hardware is making some sort of difference. What is your processor and onboard RAM?


Initially we've got the feedback from the customer with LV20, but not sure about their HW.

Then on our side we identified and reproduced the bug on the following 2 PCs:

  1. Desktop - Core i7-8700k, 32GB, Win 10 Pro
  2. Laptop - Core i7-10750H, 32GB, Win 10 Home.
Making LabVIEW Smrter and Faaster
0 Kudos
Message 13 of 13
(651 Views)