LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Can't compile? Try harder!

I just had a real "What the....?" moment with LabVIEW.

 

We have had occasional problems in the past with VIs I have committed to our SVN repository where I could open it fine but my co-workers had trouble opening the code containing the VI.  We would get error messages "Invalid size in _InstSize: 23" six times and then "float stack ref 0 out of range" once with "float stack  out of range" about 20 times.

 

Weird thing is that I just re-installed windows and LV on my computer and suddenly I started getting the errors also.  "OK, my old LV installation was a bit corrupt" I thought.  But then a bit of a WTF moment.

 

I changed my compiler optimisations from the default "5" to "8" (where I had it before) and suddenly the VI doesn't compile any more and the error messages come back.  Switch back to "8", it compiles, switch back to "5" and it won't.

 

Our code is a RT VI with a timed loop, many inlined sub-VIs and several classes.  What on earth is different between compiler optimisation levels 5 and 8 which could cause this?  I will try to find out exactly which compiler optimisation levels work and which don't.

 

Oh, and this is LV 2012 SP1 (32 bit) on Windows 7 (64-bit) BTW.

0 Kudos
Message 1 of 5
(3,278 Views)

Optimisation level 1,2,3,4,5 do NOT compile, 6,7,8,9,10 DO compile.

 

An important extra note, the Compiled Code Compelxity metric for the VI in question is 5.1 so that probably explains the differentiation between >5 and <=5.

0 Kudos
Message 2 of 5
(3,258 Views)

NI Error report Number

 

ff86e13c-dfb6-403b-83ae-96fa4ac38edf

 

contains data relevant to this problem I believe.

0 Kudos
Message 3 of 5
(3,188 Views)

Hello Intaris,

 

are you using the "In Range and Coerce" function, if yes insert a conversion to U32 into the three input wires.

 

There are a request to this and LV 2012 SP1.

compiler error: Invalid size in _instSize = 23

 

Hope it helps.

best regards
Alexander
Message 4 of 5
(3,086 Views)

Ah, that could be it indeed.

 

I'll give it a whirl and see if the problems go away.  Funny that it seems to also be dependent ont he compilation complexity settings......

 

Shane

0 Kudos
Message 5 of 5
(3,056 Views)