may be a bug
Moderator: DPlotAdmin
may be a bug
David
In a VB routine, I execute the code shown below (Dplot not running). Intermittently, this produces a blank plot called plot1. Executing this code again (same data in the arrays, without terminating dplot) results in plot1 having a curve on it (note - not plot2). I wonder if there is some sort of timing error. Dplot version 2.0.4
Const nfdefault = "0"
Const nfcalendardate = "6"
If (J < 2) Then
MsgBox ("No data for this variable - No Plot")
Exit Sub
End If
d.version = DPLOT_DDE_VERSION
d.DataFormat = DATA_XYXY
d.MaxCurves = 1
d.MaxPoints = J + 10
d.NumCurves = 1
d.ScaleCode = SCALE_LINEARX_LINEARY
d.LegendX = 0.05
d.LegendY = 0.05
d.NP(0) = J - 1
d.LineType(0) = LINESTYLE_SOLID
d.Title1 = "Time series plot"
d.Title2 = ""
d.XAxis = "Date" & Chr$(0)
strunits = " "
d.YAxis = strunits & Chr$(0)
nf = nfcalendardate
d.Title3 = ""
cmds = cmds & "[ClearEditFlag()][DocMaximize()][NumberFormat(0," & nf & ")]"
DocNum = DPlot_Plot(d, X(1), Y(1), cmds)
ret = DPlot_Command(DocNum, "[Legend(1,""" & gfilenameforplot & Lstvars.Text & """)]")
In a VB routine, I execute the code shown below (Dplot not running). Intermittently, this produces a blank plot called plot1. Executing this code again (same data in the arrays, without terminating dplot) results in plot1 having a curve on it (note - not plot2). I wonder if there is some sort of timing error. Dplot version 2.0.4
Const nfdefault = "0"
Const nfcalendardate = "6"
If (J < 2) Then
MsgBox ("No data for this variable - No Plot")
Exit Sub
End If
d.version = DPLOT_DDE_VERSION
d.DataFormat = DATA_XYXY
d.MaxCurves = 1
d.MaxPoints = J + 10
d.NumCurves = 1
d.ScaleCode = SCALE_LINEARX_LINEARY
d.LegendX = 0.05
d.LegendY = 0.05
d.NP(0) = J - 1
d.LineType(0) = LINESTYLE_SOLID
d.Title1 = "Time series plot"
d.Title2 = ""
d.XAxis = "Date" & Chr$(0)
strunits = " "
d.YAxis = strunits & Chr$(0)
nf = nfcalendardate
d.Title3 = ""
cmds = cmds & "[ClearEditFlag()][DocMaximize()][NumberFormat(0," & nf & ")]"
DocNum = DPlot_Plot(d, X(1), Y(1), cmds)
ret = DPlot_Command(DocNum, "[Legend(1,""" & gfilenameforplot & Lstvars.Text & """)]")
- DPlotAdmin
- Posts: 2312
- Joined: Tue Jun 24, 2003 9:34 pm
- Location: Vicksburg, Mississippi
- Contact:
Several questions:
How many points are you typically trying to plot?
What version of Windows are you running?
What version of VB?
What's your processor speed?
How many points are you typically trying to plot?
What version of Windows are you running?
What version of VB?
What's your processor speed?
Visualize Your Data
support@dplot.com
support@dplot.com
- DPlotAdmin
- Posts: 2312
- Joined: Tue Jun 24, 2003 9:34 pm
- Location: Vicksburg, Mississippi
- Contact:
Sorry for the tardy reply. The short version is... I don't know. At first glance it would appear to be a timing problem, but I can't see how that could be it. If DPlot isn't running before you use DPlot_Plot (or any other function that would result in launching DPlot) then the DLL launches it and does a WaitForInputIdle before doing any DDE magic. WaitForInputIdle basically waits until the launched application is ready to accept user input, which means it is also presumably ready to accept DDE commands. The DLL waits up to 5 seconds, which should be plenty of time on the system you described. (That is, unless you're using a really old version of DPLOTLIB.DLL. Please check the date of that file.)
You mentioned VB: does this problem occur in a compiled application, or only within the VB environment? This shouldn't make a difference, but I've been wrong before.
I'll be happy to send you a DLL that waits longer, but honestly I can't imagine that 5 seconds wouldn't be enough time on your system. If you want to try a new DLL let me know. I'm on the road this weekend so it will be late Sunday night before I can send you anything.
You mentioned VB: does this problem occur in a compiled application, or only within the VB environment? This shouldn't make a difference, but I've been wrong before.
I'll be happy to send you a DLL that waits longer, but honestly I can't imagine that 5 seconds wouldn't be enough time on your system. If you want to try a new DLL let me know. I'm on the road this weekend so it will be late Sunday night before I can send you anything.
Visualize Your Data
support@dplot.com
support@dplot.com
Monday was a public holiday here.
When I send (successfully) a 39000 pt plot, it takes about 7 seconds elapsed before something appears, but I presume most of that is passing the data across. For a smaller plot (2000 pts) it seems almost instant, so I guess that is a truer indication of the startup time of the dplot application.
I will query the other user re nature of machine, OS etc. The problem here is almost not reproducible. When I did get it to happen, it was within the VB environment (because I wanted to use the debugger on it) but the other user is using a compiled version.
My gut feeling is that a dll with a bigger acceptable delay won't fix it.
dll version is 1.9.9.6
When I send (successfully) a 39000 pt plot, it takes about 7 seconds elapsed before something appears, but I presume most of that is passing the data across. For a smaller plot (2000 pts) it seems almost instant, so I guess that is a truer indication of the startup time of the dplot application.
I will query the other user re nature of machine, OS etc. The problem here is almost not reproducible. When I did get it to happen, it was within the VB environment (because I wanted to use the debugger on it) but the other user is using a compiled version.
My gut feeling is that a dll with a bigger acceptable delay won't fix it.
dll version is 1.9.9.6
- DPlotAdmin
- Posts: 2312
- Joined: Tue Jun 24, 2003 9:34 pm
- Location: Vicksburg, Mississippi
- Contact:
My gut feeling is that a dll with a bigger acceptable delay won't fix it.
From your description that's probably correct. But please try this one anyway; it will at least eliminate one possibility. At your convenience try this version: http://www.dplot.com/beta/dplotlib.dll
Visualize Your Data
support@dplot.com
support@dplot.com
1) The dll didn't fix it for my user.
2) The system there is as follows
OS Name Microsoft Windows 2000 Professional
Version 5.0.2195 Service Pack 4 Build 2195
OS Manufacturer Microsoft Corporation
System Name 00079777BA
System Manufacturer Hewlett-Packard
System Model HP Compaq dc7100 CMT(DX438AV)
System Type X86-based PC
Processor x86 Family 15 Model 4 Stepping 1 GenuineIntel ~3391 Mhz
Processor x86 Family 15 Model 4 Stepping 1 GenuineIntel ~3391 Mhz
BIOS Version 06/16/04
Windows Directory C:\WINNT
System Directory C:\WINNT\system32
2) The system there is as follows
OS Name Microsoft Windows 2000 Professional
Version 5.0.2195 Service Pack 4 Build 2195
OS Manufacturer Microsoft Corporation
System Name 00079777BA
System Manufacturer Hewlett-Packard
System Model HP Compaq dc7100 CMT(DX438AV)
System Type X86-based PC
Processor x86 Family 15 Model 4 Stepping 1 GenuineIntel ~3391 Mhz
Processor x86 Family 15 Model 4 Stepping 1 GenuineIntel ~3391 Mhz
BIOS Version 06/16/04
Windows Directory C:\WINNT
System Directory C:\WINNT\system32
- DPlotAdmin
- Posts: 2312
- Joined: Tue Jun 24, 2003 9:34 pm
- Location: Vicksburg, Mississippi
- Contact:
Bah. Not a big surprise, but bah, anyway.
If there isn't an error in your data, I just don't know. (And I wouldn't think that would be it or the problem would presumably be repeatable.) You're welcome to send me your project files and I'll take a look. Other than that I'm not sure what to do at this point. I can plot half a million points from the VB environment on my old Windows 95 system with no problem, so I don't think this is a performance issue.
If there isn't an error in your data, I just don't know. (And I wouldn't think that would be it or the problem would presumably be repeatable.) You're welcome to send me your project files and I'll take a look. Other than that I'm not sure what to do at this point. I can plot half a million points from the VB environment on my old Windows 95 system with no problem, so I don't think this is a performance issue.
Visualize Your Data
support@dplot.com
support@dplot.com
- DPlotAdmin
- Posts: 2312
- Joined: Tue Jun 24, 2003 9:34 pm
- Location: Vicksburg, Mississippi
- Contact:
From what you described it should. But don't think I've given up on the problem. If that doesn't work or if you find any other clues, let me know.
Visualize Your Data
support@dplot.com
support@dplot.com
Hah!! The report from my user, who tried the fix:
just put the fix in and it plotted first time. Closed dplot and then tried plotting again and got same problem. Closed both mplot and dplot and reopened and plotted fine. So I guess I just don't close dplot half way through!
OK. My fix moved the problem, so it does appear to be some weird thing to do with the start up of dplot. Curious eh? So my user now has a fairly solid workaround.
just put the fix in and it plotted first time. Closed dplot and then tried plotting again and got same problem. Closed both mplot and dplot and reopened and plotted fine. So I guess I just don't close dplot half way through!
OK. My fix moved the problem, so it does appear to be some weird thing to do with the start up of dplot. Curious eh? So my user now has a fairly solid workaround.
- DPlotAdmin
- Posts: 2312
- Joined: Tue Jun 24, 2003 9:34 pm
- Location: Vicksburg, Mississippi
- Contact:
Thanks for the information. And I'm glad there's a fix but I'd like to really fix whatever is going wrong. At the moment, though, I'm out of ideas.
Visualize Your Data
support@dplot.com
support@dplot.com