forum.vdsworld.com Forum Index forum.vdsworld.com
Visit VDSWORLD.com
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 


bug in vdsipp.dll or i'am doing somethimes wrong?
Goto page Previous  1, 2
 
Post new topic   Reply to topic    forum.vdsworld.com Forum Index -> General Help
View previous topic :: View next topic  
Author Message
SnarlingSheep
Professional Member
Professional Member


Joined: 13 Mar 2001
Posts: 759
Location: Michigan

PostPosted: Fri Aug 16, 2002 12:07 am    Post subject: Reply with quote

I'm not actually sure it is downloading the file..but that's another thing to check.
Do VDS lists leak memory even when being cleared?

_________________
-Sheep
My pockets hurt...
Back to top
View user's profile Send private message Send e-mail
Mac
Professional Member
Professional Member


Joined: 08 Jul 2000
Posts: 1585
Location: Oklahoma USA

PostPosted: Fri Aug 16, 2002 2:06 am    Post subject: Reply with quote

I'd suggest making a separate program that ONLY
downloads the webpage to your computer, then exits.

Have your main program run it every few minutes
(or whatever), then load the downloaded page. If
you're still having the lockup, you'll know it's NOT
a problem with the VDSIPP.DLL.... Wink

Cheers, Mac Smile

_________________
VDSug.dll does file IO, check/disable menu items,
non-VDS dlls, draw functions and more...
Free download (30k dll size) at:
http://www.vdsworld.com/download.php?id=361
Back to top
View user's profile Send private message Send e-mail
tim6389
Professional Member
Professional Member


Joined: 01 Aug 2002
Posts: 790

PostPosted: Fri Aug 16, 2002 6:46 am    Post subject: well Reply with quote

yes but i was thinking....if i could have a way to have the program re-set it self that would solve the problem i think....
Back to top
View user's profile Send private message
Mac
Professional Member
Professional Member


Joined: 08 Jul 2000
Posts: 1585
Location: Oklahoma USA

PostPosted: Fri Aug 16, 2002 7:01 am    Post subject: Reply with quote

You should be able to use the INTERNET HTTP, DESTROY
command, then INTERNET HTTP, CREATE to start it again.

Cheers, Mac Smile

_________________
VDSug.dll does file IO, check/disable menu items,
non-VDS dlls, draw functions and more...
Free download (30k dll size) at:
http://www.vdsworld.com/download.php?id=361
Back to top
View user's profile Send private message Send e-mail
moke
Contributor
Contributor


Joined: 02 Jan 2002
Posts: 162

PostPosted: Fri Aug 16, 2002 12:53 pm    Post subject: Reply with quote

I agree I think the problem here is the memory leak with list savefile. It appears the data is being loaded into a list and save periodically. A web page could easily exceed the 20K or so where the problem starts, especially if it is being appended. Any log data being save using list savefile would also cause a problem when approaching this file size. With each save therafter the leak compounds the problem until the app locks Sad .

I would be looking here first.

moke
Back to top
View user's profile Send private message Send e-mail
tim6389
Professional Member
Professional Member


Joined: 01 Aug 2002
Posts: 790

PostPosted: Fri Aug 16, 2002 5:21 pm    Post subject: hummmm Reply with quote

moke wrote:
I agree I think the problem here is the memory leak with list savefile. It appears the data is being loaded into a list and save periodically. A web page could easily exceed the 20K or so where the problem starts, especially if it is being appended. Any log data being save using list savefile would also cause a problem when approaching this file size. With each save therafter the leak compounds the problem until the app locks Sad .

I would be looking here first.

moke



hummm any ideas what i can do? i mean like is there a better way to do this?

thanks
Back to top
View user's profile Send private message
Mac
Professional Member
Professional Member


Joined: 08 Jul 2000
Posts: 1585
Location: Oklahoma USA

PostPosted: Fri Aug 16, 2002 5:49 pm    Post subject: Reply with quote

If you use a separate program that downloads with VDSIPP.DLL,
the main program doesn't have to keep saving it...

Cheers, Mac Smile

_________________
VDSug.dll does file IO, check/disable menu items,
non-VDS dlls, draw functions and more...
Free download (30k dll size) at:
http://www.vdsworld.com/download.php?id=361
Back to top
View user's profile Send private message Send e-mail
moke
Contributor
Contributor


Joined: 02 Jan 2002
Posts: 162

PostPosted: Fri Aug 16, 2002 6:27 pm    Post subject: Reply with quote

If the problem is when the web page is saved from the list, I would suggest not saving it just load it to the list for display as Mac has already pointed out. If the problem is from the log being generated and saved there are a few options.

1) don't load the existing log into a list, apend it and save the list again. save only the current data to a temp file and append it to the full log using the dos command "current.log + full.log new.log"

2) Or you can use vdsinout.dll and use the @io append or @io writec commands ( this is usually what I do) to write directly to the log with out using list savefile.

3) Use multiple log files and monitor the size of data list being saved, if it exceeds 20K start a new log file and rename the old one to old-date.log

Good Luck!

moke
Back to top
View user's profile Send private message Send e-mail
SnarlingSheep
Professional Member
Professional Member


Joined: 13 Mar 2001
Posts: 759
Location: Michigan

PostPosted: Fri Aug 16, 2002 7:54 pm    Post subject: Reply with quote

His logs aren't generated in VDS. They are only downloaded and displayed in VDS..none of them over 20k I don't believe.
I'm thinking that because the log isn't being deleted after it's loaded into his list and it is overwriting it every 10 or so seconds it's causing the problem. Doesn't seem like it should, but I'll give it a try with deleting the log after loading it. Too bad it takes an hour to figure out whether it is going to stop or not...

_________________
-Sheep
My pockets hurt...
Back to top
View user's profile Send private message Send e-mail
tim6389
Professional Member
Professional Member


Joined: 01 Aug 2002
Posts: 790

PostPosted: Sat Aug 17, 2002 2:42 am    Post subject: hey Reply with quote

SnarlingSheep


sometimes the logs CAN be more then 20...just to let you know
Back to top
View user's profile Send private message
SnarlingSheep
Professional Member
Professional Member


Joined: 13 Mar 2001
Posts: 759
Location: Michigan

PostPosted: Sat Aug 17, 2002 3:02 am    Post subject: Reply with quote

I think the problem was that different information being downloaded at the same time was causing the temporary files to be opened, but not closed. Meaning Windows wouldn't let them be written to/deleted.
Anyway, I changed his code to use multiple instances of the HTTP protocol..(Not sure of a better way to explain that..) and check whether information was already being downloaded or not.
Hopefully this works..if not, I'm firing myself.

_________________
-Sheep
My pockets hurt...
Back to top
View user's profile Send private message Send e-mail
tim6389
Professional Member
Professional Member


Joined: 01 Aug 2002
Posts: 790

PostPosted: Sat Aug 17, 2002 9:59 pm    Post subject: just a note Reply with quote

i found this in other post in the old mailing list....so i guess i'am not the only one with this problem


this was posted by
John Burton
30-01-2002 04:31:40



Hello VDSters,

This is, by the way, a very nice dll. Check it out at:

http://www.vdsworld.com/

Has anyone been using this? If so, I have some questions (all of which
pertain to the HTTP protocol):

(1) This is the most important: The user should have the option to cancel a
download in progress. I do this by turning threads on and using the
following command when the cancel button is pressed:

INTERNET HTTP,STOP,1

This stops the download as it should. However, a retry on the download will
not
occur unless the application is closed and re-opened. I discovered that this
is because the OS locks the partially downloaded file until the app closes.
The workaround is to save the file to a temp file name. After a complete
download, the file is renamed as needed. Temp filenames can be incremented
using a numeric variable so that a subsequent attempt to download the same
file will actually save it to a different name. (yada001.tmp, yada002.tmp,
etc.) "Leftover" temp files can be deleted when the app first opens.

This method does not seem to work, however, under one condition: if the
internet connection is lost during download. I tested this by initiating a
download and then closing DUN. In that case, I think you DO have to close
the app and reopen it. Any other ideas?

(2) The DOWNLOAD command does not appear to support quoting or paths
containing spaces. I would like to avoid the use of @SHORTNAME if possible.
With ordinary VDS syntax, you can use something like:

INTERNET HTTP,DOWNLOAD,1,%%URL,@CHR(34)%%MYPATH%%MYFILE@CHR(34)

but this does not work in the DLL. I suppose I could stick with
@shortname(). Do all
versions of Win32 support this?

(3) I cannot get the RANGE command to work. What is the syntax? I have tried
using it both before and after the DOWNLOAD command. Maybe the test server
does not support this, perhaps I'll try downloading something from
Microsoft!

Many thanks for any ideas/tips,

John Burton
Back to top
View user's profile Send private message
PGWARE
Web Host


Joined: 29 Dec 2001
Posts: 1566

PostPosted: Sat Aug 17, 2002 11:50 pm    Post subject: Reply with quote

Since you never did post your code here it is pretty hard to diagnose the problem. However the problem this user was having was that he was downloading files off the internet and the files would becoming locked (disconnected or someone used INTERNET HTTPD,STOP. He is right that the file is LOCKED so no writes can be attempted on it without the file finishing the download. I don't remember you saying that you used INTERNET HTTP,STOP or that your connection broke. Those are the only two cirumstances that the download will not occur since the file is locked.

Since you are basically downloading a plain ascii page why not just use >

Code:

  INTERNET HTTP,GET,1,http://www.whatever.com
  list create,1
  list add,1,@INTERNET(HTTP,CONTENT,1)
  list assign,LIST1,1
  list close,1


The above code will download the content, and put the contents of the webpage into LIST1. Change the listbox name to whatever your listbox name is.

This will download the code and show it to you without having to save to a file. See if that fixes the problem.
Back to top
View user's profile Send private message
tim6389
Professional Member
Professional Member


Joined: 01 Aug 2002
Posts: 790

PostPosted: Sat Aug 24, 2002 7:29 am    Post subject: just to let every one know Reply with quote

I thought i would tell you all what i found we tweak the code to using the "get" commad BUT also i have to tweak the web server to i has this set TO KEEP connection alive


keep-alive=1

chnage it to this:

keep-alive=0


this setting is in the web server s/w that i uses

just though i would pass this on so if some one else comes across this they will find the answer here Smile

thanks all for the help
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    forum.vdsworld.com Forum Index -> General Help All times are GMT
Goto page Previous  1, 2
Page 2 of 2

 
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
You can attach files in this forum
You can download files in this forum

Twitter@vdsworld       RSS

Powered by phpBB © 2001, 2005 phpBB Group