LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

Problems with uir file: "File is damaged"

Hy NG,
After a long period of working without any problems with the CVI uirs, I get
the error message "File is damaged" since last week when I try to locate an
uir object via "Find UI Object" from the source code.
When I try to open the uir file after receiving this error, LabWindows
closes without warning (or saving changed files...)

I tried to write a tui file and rebuild the uir, which works, but did not
eliminate the problem.
What can that be? I have a big amount (14) of menu items in one of the two
Menu Bars. Is there any limitation?

I attached the uir file.
To reproduce this behaviour create a new project from scratch, insert this
uir file, create all callbacks and click "Find UI Object" from the source

code.

Any hints?

Thanx
Harald

mailto:HIlg@gmx.net
0 Kudos
Message 1 of 7
(4,030 Views)
Hi!
The problem is probably related to a LabWIndows/CVI 5.5. bug I posted to National Instrumenta a few months ago. I expect they will fix it in the next version.
The main reason of the bug is the use of menu "constant names" that are too long. This is expecially true if you emply many levels of menus/sumbenus. CVI concatenates the names in the hierarchy to build the identifiers for all the menu items.
At a certain point the User Interface Editor issues a name truncation warning. If you then save the UIR file the system corrupts it. A crash then occurs if you use the "Find UI Object" command from the source code editor.

The best workaraund is to use shorter names for the menu items.

The attached ZIP file contains a sample project that reproduces the bug (the
copy of the UIR file is to recover the good file after the crash).

Bye
Message 2 of 7
(4,030 Views)
I have tried reproducing this with Giovanni's project in CVI 5.5.1 (the update to 5.5) after he posted and the project seems to work fine, never damaging the UIR file.

So both of you may want to contact your inside sales representative here at National Instruments to see about getting the update.

Jason F.
Applications Engineer
National Instruments
www.ni.com/ask
0 Kudos
Message 3 of 7
(4,030 Views)
Hy there,
After changing the constants to shorter names it seems fine.
I am using LabWindows CVI Version 5.5 for Win95/98/2000/NT on a WinNT4.0,
SP6 Workstation.

Thanks a lot Giovanni!

Harald

mailto:HIlg@gmx.net
0 Kudos
Message 4 of 7
(4,030 Views)
I am having this problem for version 6.0. What is the fix? How do I recover my *.uir file?
0 Kudos
Message 5 of 7
(4,030 Views)
I have the same problem in version 6.0 as well. I guess they didn't fix the bug. I guess the best way to resolve the problem would be to shorten constant names then.
0 Kudos
Message 6 of 7
(4,030 Views)
yep, I got the same problem with CVI 6.0.
my code was working fine with cvi 5.0.1, and when I upgraded to cvi 6.0, the problem started since then!

is this bug created after version 5.0.1?
Message 7 of 7
(4,030 Views)