03-11-2011 05:38 AM
When I say amusing I mean I took a few hours to find it and then laughed...
If you have a diagram disable structure without an 'enabled' case LabVIEW throws and error and won't run, flags the structure and tellins you to add an 'enabled' case. This happens even if the structure is empty. Fair enough.
If you a a diagram disable structure without an 'enabled' case in a disabled case of another diagram disable structure (with an enable case) then Labview won't run the vi but will only say : 'Labview needs more memory to compile vi', and won't flag the structure. It will then often crash...
This seems odd for several reasons:
1) I don't think this used to be the case - I found the bug importing an old .vi which used to work.
2) Logically an enable case isn't necessary - suppose I want to disable all the cases?
3) Why is code in a disabled case making any difference anyway?
Anyway - hope this saves somebody a few hours
Luke
03-11-2011 07:34 AM
@Jester_v01 wrote:
When I say amusing I mean I took a few hours to find it and then laughed...
...
3) Why is code in a disabled case making any difference anyway?
Anyway - hope this saves somebody a few hours
Luke
Whay answer require somebodt sitting in that conference room when the decision were made but...
WHen the Disable structure was introduced a bug entered whenre "Source Distributions" would fail to take into concideration code in the disabled structure. Since the disabled structure was (?) intended (?) to affect if code got compiled or not but was not (?) intended (?) to influence if code was part of the Source Distribution this was called ab ug and I think fixed. Others have since realized the bugging behaviour was actually a bug and what they thought was a feature was really a bug.
So I suspect you have found another corner case not concidered in that conference room years ago.
Just my guess. If you have a better one please share.
Ben
03-11-2011 07:45 AM - edited 03-11-2011 07:52 AM
I reproduced the issue on several machines with LV versions 2009 and 2010. I filed a CAR on this, the ID is 288450.
Regarding question 3: Effect of code in disabled diagrams:
During edit time, those cases must be accessible. Therefore, LV does load all components of those disabled cases into memory as well.
You can do a simple test on this:
- Open a new VI.
- Insert a diagram disable structure
- Insert a "Write to Spreadsheet File.vi in the Disabled case of this diagram disable structure
- Select View >> VI Hierarchy in the menu
Be assured that the elements in disabled cases do not find their way into the compiled code, since they are part of disabled case. But the development environment does load all elements contained within the structure, regardless of the case, into memory....
hope this helps,
Norbert
[EDIT] Increased readablity....i hope