LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Top level fp picture is not saved - strange behavior

Solved!
Go to solution

Hi,

 

I'm having weird problems with the sub vi pictured below. I have also included the vi - but it can't be run without the top level vi, and I can't make a version that shows the error without my top level vi which I am not allowed to post.

 

Problem:

The Image of the top level vi is not saved at its destination, the other three images are.

 

What I've done to find the cause of this and a solution:

1. Probes:

The top level fp image is returned by the method as expected,

it is being cut correctly,

the path I feed to writePNG is correct,

writePNG's error output says OK - no error no warning.

 

2. Make all references from items inside the sub vi:

Works - saves 4 images to the specified path.

 

3. Change reference for the first case back to control.

Doesn't work in my top level vi - this is when I think I have a vi to post but:

I create an empty vi, drop the sub vi there to post it to the forums - IT WORKS there!

 

4. If I duplicate the first case structure (so there are two now) and connect every input tunnel to the same wires as the original (except for the individual part of the file name - I created a new one for that): The duplicate works.

If I then remove the original case structure the duplicate doesn't work anymore (even with the new individual file name)!

 

5. Copy the code of the sub vi into an new and empty one and save.

Doesn't work

 

6. Restart LV

Nope

 

7. Restart PC

Still not working

 

8. Recreated the "this VI" reference in the top level vi (just to be sure)

No

 

I have no idea what to do now. I could copy the top level vi into a new one - but it has a quite complex FP which gets messed up in the process.

Has anyone experienced something similar?

Has anyone got a hint on what to do next?

 

 


MaybeBug.PNG


Regards Florian

0 Kudos
Message 1 of 4
(2,206 Views)

Hi,

 

I'm back from the weekend and found out a wee bit more:

 

The WritePNG doesn't save the file if the incoming path wire is branched to the create array primitive!

I found this when experimenting with duplicating the first case structure.

 

I then tried:

Removing the case structure and rewiring - to no effect.

Recreating the create array primitive - to no effect.

 

This is not the first time I see branched wires behave in unexpected ways, but I had since then upgraded to LV2011 SP1. I thought that counted like a reinstall Smiley Wink

Time to reinstall LV? Windows (7 64bit)?

 

Regards Florian

0 Kudos
Message 2 of 4
(2,175 Views)

I tried creating the path outside of the structure so I don't have to branch it. That's not it either.

Removing a branch again is apparently a "fix" here:

MaybeBug2.PNG

 

If only I didn't need the path to exit the vi - then I wouldn't see this glitch. But I wouldn't be happy of course.

Kind of scary - where else in the code are bugs that are not shown by error handling?

A real show stopper.

 

Regards Florian

0 Kudos
Message 3 of 4
(2,172 Views)
Solution
Accepted by topic author Florian.Ludwig

Ok, I got it.

 

And it was all my fault too! (It almost always is, how often does one really find someone else's bug when programming?)

It had nothing to do with the branching. Phew!

The file got written - but I subsequently overwrote it with itself - it didn't react nicely to that.

The other three pics didn't get overwritten because of the error wire preventing that.

 

Sorry for anyone thinking about my problem.

Glad that's over

 

Florian

0 Kudos
Message 4 of 4
(2,166 Views)