LAVA Forums Buy cool LAVA gear Forums RSS Feed

Welcome Guest ( Log In | Register )

Tags
(This content has not been tagged yet)
 
Reply to this topic Start new topic
> LabVIEW crashes with pre-allocated array
JFM
post Jan 19 2007, 10:48 AM
Post #1


Extremely Active
****

Member
Posts: 369
Joined: 24-August 06
Member No.: 5958
Using LabVIEW Since:1995
LV:8.5 ,8.2.1 ,7.1.1
Sweden Nothing Selected Nothing Selected


I reported this bug december 2005, and just recently checked if it was still present in LabVIEW 8.2 (sorry I don't have a CAR for this one).

/J
-------
The Problem.vi contains a pre-allocated array, that is populated by using a second array that is auto indexed in a FOR loop.

The crash:
  1. LabVIEW crashes when closing the Problem.VI after it has been run.
  2. LabVIEW also crashes sometimes, if you edit and try to save a VI (Caller vi), that has the Problem.VI in its sub-vi hierarchy (Caller VI must be run first in order to crash))
Attached Image

Solution:
Change the dimension size input (Initialize array) from constant to control (this changes the type of the array wires)
  • the pre-allocated array changes from "1-D fixed size array [100] of" to "1D array of".
  • the output from the Array subset node changes from "1-D bounded-size (sub) array [100] of" to "1-D (sub)array of"
In LabVIEW 7.1.1, I have the FPGA toolkit installed, maybe this is forcing LabVIEW to use a special version of the "Initialize array" node?
Attached File  LV7_1_1_Loop_bug.zip ( 14.16K ) Number of downloads: 98


This post has been edited by JFM: Jan 19 2007, 11:04 AM

--------------------
Wired but not weird...


Tags
(This content has not been tagged yet)
Go to the top of the page
+Quote Post
Ad
post Jan 19 2007, 10:48 AM
Post #















Tags
(This content has not been tagged yet)
Go to the top of the page
Quote Post
rolfk
post Jan 19 2007, 10:56 AM
Post #2


<customize this text>
*****

Premium Member
Posts: 1060
Joined: 9-April 04
From: Rotterdam
Member No.: 349
Using LabVIEW Since:1992
LV:8.5.1 ,8.2.1 ,7.1.1
Netherlands Switzerland Nothing Selected


QUOTE (JFM @ Jan 19 2007, 05:48 AM) *
I reported this bug december 2005, and just recently checked if it was still present in LabVIEW 8.2 (sorry I don't have a CAR for this one).

/J
-------
The Problem.vi contains a pre-allocated array, that is populated by using a second array that is auto indexed in a FOR loop.

The crash:
  1. LabVIEW crashes when closing the Problem.VI after it has been run.
  2. LabVIEW also crashes sometimes, if you edit and try to save a VI (Caller vi), that has the Problem.VI in its sub-vi hierarchy (Caller VI must be run first in order to crash))
Attached Image

Solution:
Change the dimension size input (Initialize array) from constant to control (this changes the type of the array wires)
  • the pre-allocated array changes from "1-D fixed size array [100] of" to "1D array of".
  • the output from the Array subset node changes from "1-D bounded-size (sub) array [100] of" to "1-D (sub)array of"
In LabVIEW 7.1.1, I have the FPGA toolkit installed, maybe this is forcing LabVIEW to use a special version of the "Initialize array" node?
Attached File  LV7_1_1_Loop_bug.zip ( 14.16K ) Number of downloads: 98


The idea about FPGA might be interesting here. Earlier versions of LabVIEW did not support (or should I say use) fixed sized arrays although the typedescriptor explicitedly had this feature documented as long as the document about Typedescriptors exists. FPGA was to my knowledge the first environment really needing fixed size arrays so they pushed that.
The particular problem you see also seems a bit like pains of the early attempts to get the constant folding optimization into LabVIEW. Not sure if the FPGA Toolkit adds this feature to the LabVIEW environment but I rather think that it is there independant of the existence of the FPGA Toolkit (but can't currently check as I have the FPGA Toolkit also installed).

Rolf Kalbermatter


Tags
(This content has not been tagged yet)
Go to the top of the page
+Quote Post
JFM
post Jan 23 2007, 05:52 AM
Post #3


Extremely Active
****

Member
Posts: 369
Joined: 24-August 06
Member No.: 5958
Using LabVIEW Since:1995
LV:8.5 ,8.2.1 ,7.1.1
Sweden Nothing Selected Nothing Selected


CAR# 3SL9US00.

/J

--------------------
Wired but not weird...


Tags
(This content has not been tagged yet)
Go to the top of the page
+Quote Post
robijn
post Jan 23 2007, 03:17 PM
Post #4


Very Active
***

Member
Posts: 165
Joined: 9-February 05
From: region Eindhoven, the Netherlands
Member No.: 1555
Using LabVIEW Since:2008
LV:7.1.1 ,8.5.1 ,8.2.1
Netherlands Nothing Selected Nothing Selected


I've seen something related (most probably already reported too). It seems an array control or constant can remember that it was wired to a fixed size array. Then when you paste it somewhere else, the array wire does not allow to be changed size anymore. I was unable to remove the problem changing control/wire properties or by setting FPGA options off and restarting LV.

Workaround: create the wire/control again from scratch.


Tags
(This content has not been tagged yet)
Go to the top of the page
+Quote Post

Reply to this topicStart new topic

 




Time is now: 9th January 2009 - 12:58 AM