Jump to content

Unflatten from String crashing LabVIEW


Recommended Posts

Posted

I'm trying to make sure that I'm not out in left field. I've got a SR# with NI Tech support and would like a second opinion while he looks at it.

I've narrowed down to the code in the attached VI causing problems for me. The VI will cause LabVIEW to, at best, stop responding (including window updates), or, at worst, go away. By go away I mean it vanished from Task Manager with no message as to why. I didn't see a known issue with LV 2010 SP1 (which is what I'm using) on this. I get proper behavior if I put in a i32 constant or an array of i32s, so it's something about having an array of clusters of the elements I'm using.

Switching the boolean to include array size resolves the issue in that I get an error, which would be the behavior I expect.

Thanks,

Tim

Untitled 1.vi

Posted

Definitely reproducible. It does not crash if only the cluster is inputted, only for the array. Adding a label to the array did not help either. (I had seen that be a problem before.) I originally thought it might be a corrupt cluster, but recreating it from scratch did not help.

I have LV2010sp1 -32bit on 64win7

Posted

I'm trying to make sure that I'm not out in left field. I've got a SR# with NI Tech support and would like a second opinion while he looks at it.

I've narrowed down to the code in the attached VI causing problems for me. The VI will cause LabVIEW to, at best, stop responding (including window updates), or, at worst, go away. By go away I mean it vanished from Task Manager with no message as to why. I didn't see a known issue with LV 2010 SP1 (which is what I'm using) on this. I get proper behavior if I put in a i32 constant or an array of i32s, so it's something about having an array of clusters of the elements I'm using.

Switching the boolean to include array size resolves the issue in that I get an error, which would be the behavior I expect.

Thanks,

Tim

I can confirm that it crashes LabVIEW (V10.1). I suspect it has something to do with the fact that if you don't set the boolean true, then whatever memory labview needs for that array of clusters just doesn't get allocated before it tries to write to it and you get an access violation.

Mark

Posted (edited)

Confirmed (2010 x64 Win64).

No problems on 2009 x64/x32 on win64.

Fantastic sleuthing to have tracked that one down.

Edited by ShaunR
Posted

Setting the boolean to true allows it to work....cool. I also tried changing the string to contain actual content, and using an uninitialized array. Both didn't work.

I originally thought that this was related to the cluster, but an array of strings, or variants also crash LabVIEW.

Posted

Thanks to everyone for looking at this. I've emailed this thread to NI Tech Support.

Tim

Crossing his fingers for a LTS version of LabVIEW

  • 3 weeks later...
Posted

It is possible to get a problem with this node if you, for example, flatten a very large integer then pass that string to unflatten and claim that the data that was flattened was an array. LV will read the first 4 bytes as the size of the array and will try to allocate that large an array. I've run into situations where that leads to LV running out of memory and crashing my system. I do not think that applies in this case, but I offer it as something to check for when investigating this CAR.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.