LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

Label problem with horizontal ring slide control, CVI7.0 vs CVI7.1

Solved!
Go to solution
I use CVI 7.0 for my development and office test, using either XP or NT machines. In a current project I have a panel with a horizontal ring slide control (classic, not Lab style) with three positions. So after weeks of office testing the app with no problems, I ship the software to a customer who also uses XP. I was rather surprised, then, to notice that, on his system, the labels and ticks for my 3 position ring control had gone awry. The control still has three positions, but only two ticks and two labels. Not only has the middle label/tick disappeared, but the two remaining ticks no longer lined up with any of the control's positions.
 
After some investigation looking at fonts, amongst other things, I realised that the customer's system had CVI7.1.1 runtime engine installed. Temporarily, I disabled this and copied my 7.0.0 engine to his system and the problem vanished, with all controls working properly.
 
I tried to regenerate this problem with a trivial project that I could post here, but failed - the control behaved properly at all times, even when cut and pasted from the problem project. There must be some other more complicated interaction with other parts of my project that causes this problem. Does anyone recognize these symptoms? I am hoping to avoid changing the customer's locked-down OS image, so any suggestions that avoids changing the run-time engine would be welcome!
 
JR
0 Kudos
Message 1 of 11
(3,917 Views)
Hi JR,
 
That is quite strange and I have never seen it occur here before.  Unfortunately, I can't really help you if I can't reproduce the issue. If you manage to breakdown your project a little more and reproduce the error, please post that code here and I can help you further with the issue. 
 
Way S.
NI UK Applications Engineer
0 Kudos
Message 2 of 11
(3,889 Views)
OK I was hoping that this was a known bug. Unfortunately, if I trim almost anything off my panel the problem disappears, which means I cannot post a simple example. Perhaps it is a memory problem? I have a workaround, involving patching a canvas over the ring labels Smiley Surprised - its not pretty but it works and unless someone comes up with a proper solution I'll have to run with it for now.
 
JR
0 Kudos
Message 3 of 11
(3,884 Views)
I've cut down the project as much as possible: all my source code is gone, and many of the controls. (The source code in the project has been auto-generated from the uir editor.) All the remaining controls have been renamed, moved and resized to no avail - as long as they are on the panel somewhere the problem exists.
 
To recap, the attached project, always built with CVI7.0.0, runs fine with the CVI7.0.0 (393) runtime engine. If the runtime engine from CVI7.1.1 (314) is used, the horizontal ring slide control (the only one with any text remaining) appears incorrectly at runtime, although the uir editor still shows it as being correct. Remove any control (even simple Text Messages!) from the uir and the problem goes away. No difference between debug and release versions.
 
As we're talking about an older product, I don't suppose there is much enthusiasm for getting to the bottom of this, but just maybe it will illuminate a problem area that has been carried over into CVI8?
 
JR
0 Kudos
Message 4 of 11
(3,873 Views)
Hi JR,
 
This problem does sound quite bizarre.  I've tried to build and run your code in CVI 8.1, and I could see the ring control with the three labels fine.  Have you tried adding some text to your UIR (since removing text seems to fix the problem) or just messing around with the Ring Slide properties and modifying something simple there? 
 
Way   
0 Kudos
Message 5 of 11
(3,866 Views)
The UIR was originally more complicated, with more controls and text on it. I could not discern any pattern as to which controls could be removed without making the problem go away, so I don't think that adding more controls now would improve the situation. It would be interesting to see if you could reproduce the problem by using the CVI7.1.1 runtime engine, though.
 
JR
0 Kudos
Message 6 of 11
(3,865 Views)

Hi JR,

I tried running your EXE file using CVI Run Time Engine version 7.1.0306 (the only 7.1 version I can find) which I downloaded from here:

http://digital.ni.com/softlib.nsf/websearch/F1C03164F065432586256EEC005EBA87?opendocument&node=13207...

The control came up fine with three labels.

Way

 

0 Kudos
Message 7 of 11
(3,860 Views)
Curiouser and curiouser! I downloaded the 7.1.0 runtime you pointed to and it still gives me the problem - just two labels on the control (and in the wrong place). Maybe its my CVI7.0.0 compiler that is creating some incompatability...
 
Never mind. I'm giving up now. Thanks for trying to help.
 
JR
0 Kudos
Message 8 of 11
(3,854 Views)
Solution
Accepted by topic author jr_2005
Hello JR,

I was able to reproduce the problem in CVI 7.1. It wasn't even necessary to run the project -- the problem appears in the UI editor (but not in the quick-edit window of the edit slide dialog).

I tracked down the problem to a bug (3YEDB2IQ) that was fixed in CVI 8.1. The manifestation of the original bug had been somewhat different, but it turned out to have the same root cause. To make a long story short, because of some incorrect logic in the slide drawing code, CVI thought that it was actually drawing the X-axis of a digital graph, and as a result was making an adjustment in the iteration through the individual labels. Oops.

Unfortunately, there's no great workaround (other than upgrading to 8.1). The nature of the bug is such that it is very dependent on what other controls have been drawn on the panel before the slide is drawn, and it's not very consistently reproducible (which is probably why Way wasn't able to reproduce it). For example, I couldn't reproduce it in 8.0 at all, even though the bug wasn't fixed until 8.1. One thing that might help you -- although it might not be very reliable -- is that I stopped being able to see the problem in your .UIR if I replace the numeric control whose constant name is 'T'.

Luis

I just went back and re-read your original post. Since the problem is appearing in your customer's machine, not in yours, you could just suggest that your customer install the 8.1 runtime engine. Here's the download.

Message Edited by LuisG on 04-26-2007 07:23 PM

0 Kudos
Message 9 of 11
(3,846 Views)
Luis,
 
Thanks for that. Was beginning to think I was going mad...
 
Currently my customer's OS image is locked down; I will suggest an upgrade to them but in the meantime I have the workaround of drawing the labels manually. If the bug is dependant on the control drawing order, is there any scope here for changing the sequence somehow? Would it help to force the offending control to be drawn first?
 
JR
0 Kudos
Message 10 of 11
(3,837 Views)