CHorn Posted November 27, 2006 Report Share Posted November 27, 2006 When wiring variables of different types into a "build array" function, i.e. when automatic type casting is used, LV 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 LV 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...Download File:post-6991-1164671256.viDownload File:post-6991-1164671267.vi Quote Link to comment
Ton Plomp Posted November 28, 2006 Report Share Posted November 28, 2006 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 Quote Link to comment
CHorn Posted November 28, 2006 Author Report Share Posted November 28, 2006 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". 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 Quote Link to comment
Adam Kemp Posted November 28, 2006 Report Share Posted November 28, 2006 This was reported to R&D (#43Q7NJPT) for further investigation. Thanks for bringing it to our attention. Quote Link to comment
Grampa_of_Oliva_n_Eden Posted November 29, 2006 Report Share Posted November 29, 2006 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 Quote Link to comment
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.