02-05-2009 10:16 AM
I found out a problem with CVI 6.0 that has gone driving me crazy for days
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
Solved! Go to Solution.
02-05-2009 04:02 PM
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
02-06-2009 04:39 AM
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.
I have two other questions for you:
02-06-2009 10:52 AM
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