LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Save for previous version 8.5 to 8.2 generates code that crashes Labview (uses classes)

Highlighted
Hello,

I'm working on some java style interfaces for labview for hot swapping of instrumentation for design patterns. When I try to port this code, developed on Labview 8.5 back to labview 8.2, the code it generates crashes labview (both 8.5 and 8.2).

Included is a small snipet of the work that demonstrates this behavior.

It includes to classes:

untitledProject1 - the containing project (version 8.5)
{
FunctionGeneratorI - Similar to a Java style interface (A class with all Dynamic VI's with no useful functionality)
FunctionGenerator33220a - An intended implementation of Function generator (only a few functions implemented)
}

and a folder "labview8_2Distribution"

Which contains the port of the 8.5 code to 8.2.

To recreate the error:

A.
1. Open "labview8_2Distribution\Users\Laptop\Desktop\object\Untitled Project 1" (8.2 save)
2. Verify it crashes labview 8.5 and labview 8.2.
3. Watch labview crash?

B.
1. Open the "Untitled project 1" in the root directory. (Using labview 8.5)
2. Save the project as a labview 8.2 type.
3. Try to open the saved version with 8.5 and 8.2.
4. Watch labview crash?

Greg Sonnenfeld

0 Kudos
Message 1 of 12
(3,181 Views)
Highlighted
Hi Greg,

I was able to open up your project in 8.2 and 8.5 without a problem. There was no crashing involved for me. Have you tried this on a different computer?


Warm regards,
Karunya R
National Instruments
Applications Engineer
0 Kudos
Message 2 of 12
(3,159 Views)
Highlighted
Hi Karunya,

I've just tried several different computers, same results. I have tried running it on 3 machines, an XP machine w/ LV 8.5,  a Vista machine w/ LV 8.5, and an XP machine running LV 8.2. All of them crashed LV. I've saved the project using the "file->save for previous version..." option in the project explorer on two machines, an XP machine w/ LV 8.5 and a Vista machine w/ LV 8.5. Both saves crashed LV when I tried to open them.

I'd like to confirm that you were able to open the project at the following path:

"labview8_2Distribution\Users\Laptop\Desktop\object\Untitled Project 1"

If you are able to generate a valid 8.2 build from the code, but not open the 8.2 build generated by my labview, it may aid in identifying the root cause.

-Greg
0 Kudos
Message 3 of 12
(3,148 Views)
Highlighted
Hi Greg,

In contrary to my last post (going to attribute that to Monday morning blues), I was unable to save the project for previous versions. I get a message saying "Saving for previous version failed for some unspecified reason. Memory could be full or the disk access may not be allowed". I tested your files out in another computer and got the exact same message. I am sure it saved fine the first time you saved it. You opened it in 8.5 after that. And then you saved it again. It started crashing at that point. Or did it start crashing after trying to open it after the first save? What is the exact error message that you get? Is it a internal or cpp error?

Have you tested this by creating another project? Do you have an xcontrols in your projects? Do you have typedefs? Do you have a LVOOP constant on your block diagram?

Can't wait to hear back!




Warm regards,
Karunya R
National Instruments
Applications Engineer
0 Kudos
Message 4 of 12
(3,118 Views)
Highlighted
Hi,

I have the same exact problem with my code. I am working with 2 versions of LV 8.2 and 8.5. This morning I was have awake and opened up my LV 8.2 code in LV 8.5 and without thinking, I save the code to 8.5. I do have some back-up to about a week ago but I would like to get all my work back. The same error about the memory being full and the disk access pops up when try to save the code back to LV 8.2. Help us NI, this seems to be a major flaw.

Michael
0 Kudos
Message 5 of 12
(3,033 Views)
Highlighted
Hi MF,

Can you post your code? Have you tested this by creating another project? Do you have an xcontrols in your projects? Do you have typedefs? Do you have a LVOOP constant on your block diagram? Are you also using Classes?

Thanks!

Warm regards,
Karunya R
National Instruments
Applications Engineer
0 Kudos
Message 6 of 12
(3,002 Views)
Highlighted
Hello Karunya,

In regards to your questions:

>Can you post your code? Have you tested this by creating another project? Do you have an xcontrols in your projects? Do you have typedefs? Do you have a LVOOP constant on your block diagram? Are you also using Classes?


I cannot post the cost as it is way too big. Not really my code but a spaghetti code from a previous programmer. I think problems saving it to a previous version have to do with a few things:

1) Memory - I have 1 GB of RAM and I am running XP. I notice the available RAM dropping quickly as it is saving and then it blow up.
2) Long Filenames - The directory path of the original file is incorporated into the saved "previous version" of the code. While a good design, it does make the file/path a bit longer when saving
3) One of teh things it saves is the drivers and their menus. This is due to the drivers being in a subdirectory of the original code and not in the c:\program files\national instruments\labview 8.5\instr.lib directory. I saw this when I tried to save the file as an LLB.
4) If I work with smaller parts of the code without long paths, it saves fine.

There probably are xcontrols, definitely typedefs, no LVOOP's or Classes. Hope you can do something with all this. It just seems that converting to a later version of the code should be reversable. Thanks.

Michael
0 Kudos
Message 7 of 12
(2,984 Views)
Highlighted
Hi MF,

Thank you for this information. If you have a smaller section of code, that would be helpful. I am going to try to simulate the problem myself and file a Corrective Action Request if I have the same problems. It sounds as the problem is specific to a particular combination of typedefs, loops etc.


Warm regards,
Karunya R
National Instruments
Applications Engineer
0 Kudos
Message 8 of 12
(2,967 Views)
Highlighted
Hello again,

I was able to save to a previous version 8.2 by moving the directory from:

J:\35916 SMC\Test\System Test\Test Equipment Software\Software Code\Rev D\35916611CD SMC Test Equipment Software 1.12\Source\SMC Labview Test

to:

c:\SMC Labview Test

and then working with it. LabVIEW keeps the entire directory structure and if you happen to be over the maximum filename including directory structure, it blows up. Could someone at NI confirm?

Michael
0 Kudos
Message 9 of 12
(2,944 Views)
Highlighted
I am glad to hear that you are able to save to previous version when the file path is shorter. Unfortunately, I still get the same message about "Save failed for some unspecified reason. Memory could be full or the disk access may not be allowed". Is this the message that you were receiving before?

Warm regards,
Karunya R
National Instruments
Applications Engineer
0 Kudos
Message 10 of 12
(2,905 Views)