10-06-2008 01:40 PM
Solved! Go to Solution.
10-06-2008 02:01 PM - edited 10-06-2008 02:03 PM
While I don't know what changed between version, it seem to run fine if you allocate outside the loop, e.g. as follows.
(You don't need the case structure, seqence structure, and the "first run?" primitive.)
(I agree there is something fishy. If you do execution highlighting, the memory error occurs once the data reaches the inner case structure boundary).
10-06-2008 02:16 PM
Right you are, Christian.
However, I need the data in an uninitialised shift register. (Therefore the "first run" and so on in my VI.) Basically, this VI is part of a data cache that allows to write and read data to and from it.
On the other hand: Reading the error message in LabVIEW 8.6 more carefully, I see: "VI ... was stopped at Case Structure".
Removing the case structure was a good approach to get rid of the error - but it doesn't solve my issue.
What else might be the reason for the misbehaviour. Or is there anything I should consider when moving to 8.6?
Regards, Guenter
10-06-2008 02:36 PM - edited 10-06-2008 02:39 PM
I agree there is clearly something wrong, and I suspect that there was a slight change on how memory is allocated in this specific case.
The buffer allocation dots look identical in 8.5 and 8.6, so it looks like a bug.
You should report this to NI.
(I placed a note in the monthly bug thread)
10-06-2008 02:49 PM - edited 10-06-2008 02:50 PM
I agree this is strange and deserves more looking into. There is one workaround that seems to help that will not change the functionality of your code. Instead of using a While Loop and uninitialized shift registers, you can use feedback nodes and no while loop. The attached example has the same behavior as your code, but doesn't give an out-of-memory error.
It appears the only reason this works is not that I'm just using Feedback Nodes, but that I'm wiring the 2D array through from the Feedback Node to the Resize Array function, not a 2D array constant. If I wire it the other way, it fails the same way.
Example saved in LV86.
10-06-2008 02:50 PM
Thanks for your note in the note in the monthly bug thread, Christian.
I just searched ni.com for a hint on how to report a bug but I could not find anything meaningful (except for ~4000 matches dealing with bugfixes). Is there an official link existing where bugs are usually posted?
Regards, Guenter
10-06-2008 02:57 PM
Right you are, Jarrod. Using feedback nodes solves this issue. Thanks, Guenter
10-06-2008 03:16 PM
Guenter Mueller wrote:I just searched ni.com for a hint on how to report a bug but I could not find anything meaningful (except for ~4000 matches dealing with bugfixes). Is there an official link existing where bugs are usually posted?
To contact NI about a bug, look here. In the lower left corner (product feedback) is a "request support" link. Click it and choose e-mail support.
Of course the monthy bug thread gets scanned regularly by NI, so a quick liink there is probably sufficient unless you need to submit some proprietary code that should not be public.
It looks like Jarrod is on it already, so we're fine. 😄
10-06-2008 03:25 PM
Good to know: "Request support" is the official way. (I have been there but did not intend to use it for a bug report.)
As Jarrod is now aware of this "feature" and the monthly bug thread too, I will not produce any further waste of information.
Thanks for your assistance.
10-06-2008 03:40 PM - edited 10-06-2008 03:43 PM
OK Jarrod's, solution works because newer labview versions have a "globally initialize" option that allows assigning a datatype to the shift register, something we cannot do in the original code if we wire across the reshape node.
However, there's a solution for that. If we add a "third" (dummy!) case that is never used except for defining the datatype of the SR, things also work fine with plain old shift registers. Try it!
It might be easier to modify your code this way. Less work, maybe! (just wire across the reshape node, add an extra case and insert "boolean to 0,1" after "fist run?" )
No more memory errors!!! 😄