See here for the proper LabVIEW bug reporting procedure.
Tags |
(This content has not been tagged yet)
|
![]() |
Nov 27 2006, 11:49 PM
Post
#1
|
|||
|
I've come back for more. Member Posts: 2 Joined: 27-November 06 Member No.: 6991 Using LabVIEW Since:2002 LV:8.0.1 ,7.1 ,6.1
|
When wiring variables of different types into a "build array" function, i.e. when automatic type casting is used, LabVIEW can crash completely or the resulting array can contain incorrect values.
The details depend on the exact configuration of the input for the build array function. LV 8.01 and LabVIEW 8.20 (I discovered this using 8.01) seem to be affected on WinXP, Mac OSX (PPC) seems to be not affected. This is a pretty nasty bug because instead of crashing it can result in incorrect numeric results and is then really hard to allocate because usually one does trust really essential basics of the programming language like automatic type casts. P.S.: I posted this already in the NI forums but I thought this might be interesting...
TestBuildArrayCastCrash.vi ( 8.53K )
Number of downloads: 180
TestBuildArrayCastIncorrectResult.vi ( 16.27K )
Number of downloads: 165
|
||
|
|
|||
| Ad |
Nov 27 2006, 11:49 PM
Post
#
|
||
|
|
|
||
|
|
|||
Nov 28 2006, 06:57 AM
Post
#2
|
||||
![]() CCT It Premium Member ![]() Posts: 1331 Joined: 13-June 05 From: Woerden, Netherlands Member No.: 2399 Using LabVIEW Since:2001 LV:8.5.1 ,6.1 ,8.2.1
My Blog
My Gallery
|
It looks like the constant folding is doing very weird.
If you use execution highlighting, you will see that the for-loop will run just once... N will be 100 and I will stay 0 But if I change the contant to a complex type (cxt/cdb/csg) it will run 100 times (I=99) Extended and double will run as well, other file types not... However if I forced a data change to I32 I saw that I went to 1 and then got this: oops EDIT: what is the NI-forums discussion link? Ton This post has been edited by tcplomp: Nov 28 2006, 07:09 AM --------------------
|
|||
|
|
||||
Nov 28 2006, 08:28 AM
Post
#3
|
|||
|
I've come back for more. Member Posts: 2 Joined: 27-November 06 Member No.: 6991 Using LabVIEW Since:2002 LV:8.0.1 ,7.1 ,6.1
|
It looks like the constant folding is doing very weird. My guess is that it's some kind of buffer overflow when allocating memory for the array that uses automatic type casts. This would explain why sometimes weird stuff happens and sometimes it crashes. In this example the loop gets "damaged". QUOTE EDIT: what is the NI-forums discussion link? http://forums.ni.com/ni/board/message?boar...ssage.id=217205 I think this is a very grave bug. Fortunately it is restricted to certain input configurations and to the combination of complex double with integers (all kinds) and singles. I didn't test very thoroughly though. Christian
|
||
|
|
|||
Nov 28 2006, 10:58 PM
Post
#4
|
|||
![]() More Active NI ![]() Posts: 32 Joined: 28-September 06 Member No.: 6320 Using LabVIEW Since:2003 LV:8.20 ,. ,.
|
This was reported to R&D (#43Q7NJPT) for further investigation. Thanks for bringing it to our attention.
|
||
|
|
|||
Nov 29 2006, 01:42 PM
Post
#5
|
|||
|
Certified Kool-Aid Kid Premium Member ![]() Posts: 1155 Joined: 6-December 02 From: Pittsburgh PA USA Member No.: 29 Using LabVIEW Since:1998 LV:7.1 ,. ,.
|
This was reported to R&D (#43Q7NJPT) for further investigation. Thanks for bringing it to our attention. Adam, Thank you very much for updating this thread! Ben
|
||
|
|
|||
![]() ![]() |
| Time is now: 22nd November 2008 - 07:36 AM |