LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

File Read Failure

hi
I am trying to read the file which is written from LabVIEW only. But it fails. I cant debug this.
my source data is fixed 2d array of cluster of 55 elements.

Herewith i attached VIs for reference. ( If i try to convert the data to variance, LabVIEW crashed and giving memory.cpp error)

Kindly help me to solve this.

regs
Karthik



0 Kudos
Message 1 of 12
(4,167 Views)

Hi karthik,

Put this array again into a cluster and it will work

You cannot read an array since you get this error

error 116  LabVIEW:  Unflatten or byte stream read operation failed due to corrupt, unexpected, or truncated data.

read the cluster and unbundle the array out

look at modified VI's attached

Hope this helps

Regards

Dev

 

Download All
Message 2 of 12
(4,159 Views)
HI Dev,

This i tried, it is working good as alone. If i integrate with my main VI, LabVIEW crashed immediately once i save the main VI or close the main VI.
I dont know why this is happening..

Herewith i attached all VIs.

regs
Karthik

0 Kudos
Message 3 of 12
(4,153 Views)

Hi Karthik,

As you said, I kept getting the attached error memory.cpp you described.

hope somebody can suggest better

Regards

Dev

 

0 Kudos
Message 4 of 12
(4,144 Views)


@devchander wrote:

Hi karthik,

Put this array again into a cluster and it will work

You cannot read an array since you get this error

error 116  LabVIEW:  Unflatten or byte stream read operation failed due to corrupt, unexpected, or truncated data.

read the cluster and unbundle the array out

look at modified VI's attached


Instead of putting the data structure into a cluster you could also wire a boolean TRUE to the write header (F) input of the Write File function. This tells LabVIEW to also store the dimension sizes of the outermost array to disk. Embeding it in a cluster makes the array simply not be the outermost data type so LabVIEW has to and will store the dimension sizes to disk at all times, but the write header (F) boolean is a cleaner and more proper way to do things instead of packaging the data into another structure, making the understanding of the datatype even more complicated.

But to be honest, such a data structure is simply insane! It means that the person who has designed it has not thought about the architecture and design of the application at all before starting to wire together his VI. With an application setup to use such data structures you are bound to run into a brick wall full speed sooner or later.

Rolf Kalbermatter
Rolf Kalbermatter  My Blog
DEMO, Electronic and Mechanical Support department, room 36.LB00.390
0 Kudos
Message 5 of 12
(4,142 Views)
hi Rolf

I tried this also "boolean TRUE to the write header (F) input of the Write File function". But it leads LabVIEW Crash and giving the same memory.cpp error (refer attachemnt by Dev). This also fails.

I need to solve this issue in 7.1.

Expecting ASAP,
REgs
Karthik

0 Kudos
Message 6 of 12
(4,128 Views)

Hi Karthik,

I did a simple thing, i removed the property nodes of cluster, implemented a shift register and saved with a different name and it got saved without the memory.cpp error.

Try doing this

 

Message 7 of 12
(4,120 Views)

Hi Karthik,

I did a simple thing, i removed the property nodes of cluster, implemented a shift register and saved with a different name and it got saved without the memory.cpp error.

Try doing this

Message 8 of 12
(4,121 Views)


@kkronline wrote:
hi Rolf

I tried this also "boolean TRUE to the write header (F) input of the Write File function". But it leads LabVIEW Crash and giving the same memory.cpp error (refer attachemnt by Dev). This also fails.

I need to solve this issue in 7.1.


I didn't say it would fix the bad architecture and therefore the memory crash. It is just an alternative way instead of putting the array into a cluster. If you will look at the data file you will see that the Boolean True solution will create axactly the same file as the one with the cluster.

As to why it crashes I guess LabvIEW runs into difficulties to generate the required data, due to memory problems. The hint about removing property nodes and using shift registers instead indicates so. Also I'm pretty sure not the Load function itself crashes but your main VIs after trying to do its horrible things on that even more horrible data structure.

Rolf Kalbermatter
Rolf Kalbermatter  My Blog
DEMO, Electronic and Mechanical Support department, room 36.LB00.390
0 Kudos
Message 9 of 12
(4,117 Views)

Hey Rolf,

I must say, your description of the cause for the crash is "Horribly Good" Smiley Wink

Karthik, as Rolf says, do try and simplify the involved data structures

Regards

Dev

 

 

0 Kudos
Message 10 of 12
(4,111 Views)