LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

CVI 6.0 picture button crash

Solved!
Go to solution

I found out a problem with CVI 6.0 that has gone driving me crazy for days Smiley Sad

Now I'm able to reproduce the problem with the simple attached project.

 

I give you a short description of what happens:

- I created two uir with some Picture Controls and Picture Buttons, where I loaded images with 32-bit color depth

- When you launch the example (in debug or standalone, doesn't matter) you have to press the Press Here gray button in the first panel, then the HOME one in the second panel.

- if you repeat this sequence for several times (5-6 usually is enough, but it's possible you have to press more than 10 times) the CVI crashes with a First chance 'General protection' fault in the LoadPanel() function.

 

Sometimes the CVI crashes with some strange errors even if I simply open this *.uir files inside the Editor.

 

How can I solve this annoying problem?

 

Note: on my PC I have CVI RTE 8.0.1 installed, but I tried the standalone exe on a PC with a fresh CVI RTE 6.0 installation and it crashes anyway

 

Thanks in advance

Vix
-------------------------------------------
In claris non fit interpretatio

-------------------------------------------
Using LV from 7
Using LW/CVI from 6.0
0 Kudos
Message 1 of 4
(3,295 Views)
Solution
Accepted by vix

Hello Vix,

 

There was a bug in CVI 6.0 which caused a memory corruption error when .UIRs containing images with certain characteristics were loaded (either in the UI Editor, or via LoadPanel). It's hard to describe what those characteristics were, since the problem happened in the image compression algorithm, and so it depended on the color data of the image.

 

In your case, you do have one of these problem images. It's in the 012_SetupGlobals.uir. It's not the "Home" image, nor the large background image. It's the other image that's used in the 20 smaller buttons. If you remove or replace that image, the problem won't happen any more.

 

Unfortunately, if the image was saved with CVI 6.0, even newer versions of the RTE (such as the 8.0.1 that you tried) will also have a problem loading it.

 

If you really need to use that image, a possible solution would be to save the .UIR in a later version of CVI, where the problem no longer existed. But if you do that you will no longer be able to load it in CVI 6.0, or with the 6.0 version of the RTE. Recent versions of CVI can only save .UIR versions that are compatible with CVI 7.1 or later. That means that you'd have to distribute the 7.0 RTE or later along with your application.

 

Luis

 

Message 2 of 4
(3,284 Views)

Hello Luis,

first of all thank you for your quick and complete answer. Now that strange behaviour is clear!

But unfortunately the problem couldn't be solved with an easy workaround. Smiley Sad

 

I have two other questions for you:

  1. I read the posts in this old thread, and I wonder if with 8 and 16-bit images the CVI 6.0 works perfectly. Or could the bug you described appear also with this low quality images?
  2. Is an .UIR editor available for free, or should I buy a later CVI version if I want to follow the possible solution you mentioned?
Thanks again for your help
Vix
-------------------------------------------
In claris non fit interpretatio

-------------------------------------------
Using LV from 7
Using LW/CVI from 6.0
0 Kudos
Message 3 of 4
(3,266 Views)

Hello Vix,

 

I'm not absolutely certain, but I don't think the problem happens with 8 or 16-bit images. But keep in mind that regardless of the original depth of the image when you first loaded it onto the control, CVI will save the images in the depth that you have your display set to. So in order to save it in a lower depth, you'll have to change your display properties.

 

There is no standalone version of the UI Editor. But you can always download a evaluation version of CVI 9.0. The evaluation version has a 30-day trial period which you can use to re-save your .uir.

 

Luis

0 Kudos
Message 4 of 4
(3,257 Views)