DPlot Forum Index DPlot
http://www.dplot.com
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

may be a bug

 
Post new topic   Reply to topic    DPlot Forum Index -> Bug Reports
View previous topic :: View next topic  
Author Message
AWaterman



Joined: 08 Jan 2006
Posts: 52
Location: Canberra, Australia

PostPosted: Wed Mar 15, 2006 8:38 pm    Post subject: may be a bug Reply with quote

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 & """)]")
Back to top
View user's profile Send private message
DPlotAdmin
Site Admin


Joined: 24 Jun 2003
Posts: 2310
Location: Vicksburg, Mississippi

PostPosted: Wed Mar 15, 2006 9:37 pm    Post subject: Reply with quote

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?
_________________
Visualize Your Data
support@dplot.com
Back to top
View user's profile Send private message Send e-mail Visit poster's website
AWaterman



Joined: 08 Jan 2006
Posts: 52
Location: Canberra, Australia

PostPosted: Thu Mar 16, 2006 5:50 pm    Post subject: Reply with quote

39000 + points

XP 2002 SP2

VB6 SP6 version 9782

Dual processor 2 * 3 GHz P4 504MB
Back to top
View user's profile Send private message
AWaterman



Joined: 08 Jan 2006
Posts: 52
Location: Canberra, Australia

PostPosted: Thu Mar 16, 2006 5:52 pm    Post subject: Reply with quote

XP version details Version 5.1.2600 Service Pack 2 Build 2600
Back to top
View user's profile Send private message
DPlotAdmin
Site Admin


Joined: 24 Jun 2003
Posts: 2310
Location: Vicksburg, Mississippi

PostPosted: Sat Mar 18, 2006 6:49 pm    Post subject: Reply with quote

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.
_________________
Visualize Your Data
support@dplot.com
Back to top
View user's profile Send private message Send e-mail Visit poster's website
AWaterman



Joined: 08 Jan 2006
Posts: 52
Location: Canberra, Australia

PostPosted: Mon Mar 20, 2006 7:25 pm    Post subject: Reply with quote

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
Back to top
View user's profile Send private message
DPlotAdmin
Site Admin


Joined: 24 Jun 2003
Posts: 2310
Location: Vicksburg, Mississippi

PostPosted: Mon Mar 20, 2006 11:12 pm    Post subject: Reply with quote

Quote:
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
Back to top
View user's profile Send private message Send e-mail Visit poster's website
AWaterman



Joined: 08 Jan 2006
Posts: 52
Location: Canberra, Australia

PostPosted: Tue Mar 21, 2006 1:27 am    Post subject: Reply with quote

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
Back to top
View user's profile Send private message
DPlotAdmin
Site Admin


Joined: 24 Jun 2003
Posts: 2310
Location: Vicksburg, Mississippi

PostPosted: Tue Mar 21, 2006 1:53 am    Post subject: Reply with quote

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.
_________________
Visualize Your Data
support@dplot.com
Back to top
View user's profile Send private message Send e-mail Visit poster's website
AWaterman



Joined: 08 Jan 2006
Posts: 52
Location: Canberra, Australia

PostPosted: Tue Mar 21, 2006 5:14 pm    Post subject: Reply with quote

I'll get back to the other user and see if we can make it reproducible here where I can get at it. She has it as a solid problem. Thanks
Back to top
View user's profile Send private message
AWaterman



Joined: 08 Jan 2006
Posts: 52
Location: Canberra, Australia

PostPosted: Wed Mar 22, 2006 7:57 pm    Post subject: Reply with quote

Just had an idea for a workaround. Call dplot start in the form load routine. Maybe that will get out of the way whatever is happening.
Back to top
View user's profile Send private message
DPlotAdmin
Site Admin


Joined: 24 Jun 2003
Posts: 2310
Location: Vicksburg, Mississippi

PostPosted: Wed Mar 22, 2006 8:43 pm    Post subject: Reply with quote

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
Back to top
View user's profile Send private message Send e-mail Visit poster's website
AWaterman



Joined: 08 Jan 2006
Posts: 52
Location: Canberra, Australia

PostPosted: Thu Mar 23, 2006 7:30 pm    Post subject: Reply with quote

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.
Back to top
View user's profile Send private message
DPlotAdmin
Site Admin


Joined: 24 Jun 2003
Posts: 2310
Location: Vicksburg, Mississippi

PostPosted: Thu Mar 23, 2006 8:12 pm    Post subject: Reply with quote

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
Back to top
View user's profile Send private message Send e-mail Visit poster's website
AWaterman



Joined: 08 Jan 2006
Posts: 52
Location: Canberra, Australia

PostPosted: Thu Mar 23, 2006 8:14 pm    Post subject: Reply with quote

Know the feeling, but at least it is Friday here.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    DPlot Forum Index -> Bug Reports All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group