Author |
Topic  |
|
mrdavis
4 Posts |
Posted - 12 Sep 2007 : 13:29:09
|
I'm using XY plots along with some reference lines (created using WGLinePlot) on the realtime graph control. Data on the XY plot is being updated multiple times per second. Since the XY update 'pokes holes' in the reference lines, I'm refreshing the reference lines using WGRedrawObject after every data update.
The issue I'm having is that whenever the chart has to be redrawn fully (like when the app has to repaint due to being uncovered on the desktop, minimized, then maximized, etc.), there is a GDI object leak (seen thru TaskManager's Processes window). The GDI count steadily increases and eventually hits a limit of 9999, then I get a 'cannot create pen' error from the QC library. then an exception. Is this a known issue? If so, is there any direct fix? It doesn't appear when only the XY plots are displayed; seems to be the WGLinePlot line use that causes the issue.
Note: I found this when I was initially using WGRedrawGraph to repaint the reference lines. The GDI object count would increase at the update rate, about 10Hz. I was using WGRedrawGraph as it does a better job then the WGRedrawObject in our application - I have fill areas under the reference lines to show a 'safe area of operation'. WGRedrawGraph redraws everything nicely, while WGRedrawObject does repaint the lines and fills, but then the XY data is updated and the removal of one of the points due to history buffer length leaves a white 'hole' in the fill area until the next update. Then the hole moves to the next point. WGRedrawGraph handles this fine and without flicker.
Thanks in advance for any assist. |
|
quinncurtis
1164 Posts |
Posted - 12 Sep 2007 : 13:36:07
|
That could have been a problem with old versions of the DLLs.
What is the dates of the WCT32DR3 and WRT32DR3 DLLs you are using.
|
 |
|
mrdavis
4 Posts |
Posted - 12 Sep 2007 : 16:27:27
|
The dates on our files may be altered, as we use a CM system that sometimes puts current timedate on a file instead of retaining the original.
What I have is:
Wct32dr3.dll 504KB, 8/4/2002 File version 1, 0, 0, 1 Product version 1, 0, 0, 1
WRT32DR3.DLL 336KB, 8/4/2002
Thanks again.
|
 |
|
quinncurtis
1164 Posts |
Posted - 12 Sep 2007 : 17:18:07
|
We cannot reproduce a gdi leak when using the WGRedrawGraph using DLLs from that time.
Can you supply us with the complete source to a simple version of a test program that reproduces your problem so that we can test it. You can send it as a zip attachment to support@quinn-curtis.com.
Also, what version of Visual Studio are you using it with? |
 |
|
mrdavis
4 Posts |
Posted - 13 Sep 2007 : 12:28:38
|
Thanks for trying. I'll try to put together a small app that reproduces the situation. Unfortunately I can't easily send you my current test app, as it includes a set of proprietary ActiveX controls in the data sampling and passing logic. |
 |
|
mrdavis
4 Posts |
Posted - 17 Sep 2007 : 09:44:52
|
I've done some experimenting with the Quinn Curtis demo programs. So far, the closest thing I can find that might illustrate the problem is RTSPLIT. If I run the demo, press the button in the second view to fill the static plots, check the GDI Objects usage count, then cover the Rtsplit window with another window, remove the covering window. The GDI count will increment by one and hold. I'll try to modify this app to mix dyn and static displays on one graph and update repetitively to see if the gdi increment continues. |
 |
|
|
Topic  |
|
|
|