Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsVB SyntaxEnterprise DevelopmentDatabase AccessControlsCOMWin APICrystal ReportDeploymentGeneralGeneral 2
Related Topics
VB.NET / ASP.NETMS SQL ServerMS AccessOther Database ProductsMore Topics ...

VB Forum / COM / October 2005



Tip: Looking for answers? Try searching our database.

Error from Hell:Overflow

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Athena - 22 Oct 2005 02:22 GMT
Hi,

  My VB6 (SP6)  app produces an Overflow error and bombs. I use Win XP
(Sp2).

1) Program has Option Explicit. So every variable is typed.
2) Program works fine on one computer, but not on another!
3) Error is intermittent.
4) Sometimes it overflows even on VB timer function.

  I am using a dll that was created from another program. In the calling
statement, there are 13 output arguments (x1,y1,z1,...) defined as Variant.
They are arrays with no priory knowledge of their size. And there are
several input arguments (in1,in2...) typed as double.

Dim b as variant
Dim x1 as variant
Dim y1 as variant
......

   call subroutine(13,
b,x1,y1,z1,x2,y2,z2,x3,y3,z3,x4,y4,z4,in1,in2,in3,in4,...)

   These arrays used to plot a 3D graph:

   with Graph3D

       for i=1 to ubound(a1,1)
           PlotXYZ x1(i,1),y1(i,1),z1(i,1),0
       next
       for i=1 to ubound(a1,1)
           PlotXYZ x2(i,1),y2(i,1),z2(i,1),1
       next
       for i=1 to ubound(a1,1)
           PlotXYZ x3(i,1),y3(i,1),z3(i,1),2
       next
       for i=1 to ubound(a1,1)
           PlotXYZ x4(i,1),y4(i,1),z4(i,1),3
       next
       .autorange

    end with

    I believe the overflow is caused by somewhere in these for loops. If I
remove the last two or three loops it goes away! What the hell is going on?

    Is there a way to detect/trap overflow? I run MS code advisor, it is
useless. Any help greatly be appreciated. Please help.

Cem
MikeD - 22 Oct 2005 02:55 GMT
Please don't multipost.

You've already posted this in one newsgroup. Posting to another is just
going to annoy everyone. If you think your question/problem pertains to more
than one newsgroup, crosspost it. This is analogous to sending an email to
multiple recipients.

Signature

Mike
Microsoft MVP Visual Basic

 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2009 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.