BorlandTalk.com Forum Index BorlandTalk.com
Borland discussion newsgroups
 
Archives   FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Access violation when downloading from IdFTPServer

 
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> Delphi Internet Winsock
View previous topic :: View next topic  
Author Message
Hans Frandsen
Guest





PostPosted: Mon Oct 27, 2003 10:43 pm    Post subject: Access violation when downloading from IdFTPServer Reply with quote



Hello

I have experienced an accessviolation in IdFTPServer when
downloading a 800 mb test file over internet.
Since the file transfer was going the problem can't be in my
code (!?!?) since all I do is open the file in a stream.

Does anyone have any idea about what I can check/look for?


Thanks,
Hans


Back to top
Hans Frandsen
Guest





PostPosted: Tue Oct 28, 2003 8:41 pm    Post subject: Re: Access violation when downloading from IdFTPServer Reply with quote



Actually it seems to happen when transfer is cancelled or interrupted...

Hans


Back to top
Remy Lebeau (TeamB)
Guest





PostPosted: Tue Oct 28, 2003 8:46 pm    Post subject: Re: Access violation when downloading from IdFTPServer Reply with quote




"Hans Frandsen" <nospam (AT) nospam (DOT) com> wrote

Quote:
Actually it seems to happen when transfer is cancelled or interrupted...

That is a possibility. TIdFTP does have known problems with abort
operations.

Gambit



Back to top
Hans Frandsen
Guest





PostPosted: Tue Oct 28, 2003 10:29 pm    Post subject: Re: Access violation when downloading from IdFTPServer Reply with quote

And no one is working on fix? Is there something I can do to stop them
(access vio) from happening when aborting download? I'm using latest Indy 9

Thanks,
Hans

"Remy Lebeau (TeamB)" <gambit47.no.spam (AT) no (DOT) spam.yahoo.com> wrote

Quote:

"Hans Frandsen" <nospam (AT) nospam (DOT) com> wrote in message
news:3f9ed48b$1 (AT) newsgroups (DOT) borland.com...
Actually it seems to happen when transfer is cancelled or interrupted...

That is a possibility. TIdFTP does have known problems with abort
operations.


Gambit





Back to top
Remy Lebeau (TeamB)
Guest





PostPosted: Tue Oct 28, 2003 10:42 pm    Post subject: Re: Access violation when downloading from IdFTPServer Reply with quote

"Hans Frandsen" <nospam (AT) nospam (DOT) com> wrote

Quote:
And no one is working on fix?

Its hard to fix something when the problem is not known yet. In any case,
the abort code is not implemented correctly to begin with, so it needs to be
re-written to handle aborts better anyway.

Quote:
Is there something I can do to stop them (access vio)
from happening when aborting download?

Doubtful, without knowing where the AV is coming from to being with. There
isn't a whole lot going on during a transfer to be a potential source of an
AV to begin with. Socket errors, maybe, but not AVs. It would help if you
could track down the problem and provide more specific details. Just saying
"there is an AV" doesn't really say very much. At least show your actual
code that is reproducing the problem in the first place.


Gambit



Back to top
Hans Frandsen
Guest





PostPosted: Wed Oct 29, 2003 10:51 am    Post subject: Re: Access violation when downloading from IdFTPServer Reply with quote

Ok I will install an exception catcher and try to find out which line of
code it happens in then..

Thanks for the reply!

Hans

"Remy Lebeau (TeamB)" <gambit47.no.spam (AT) no (DOT) spam.yahoo.com> wrote

Quote:

"Hans Frandsen" <nospam (AT) nospam (DOT) com> wrote in message
news:3f9eedd9$1 (AT) newsgroups (DOT) borland.com...
And no one is working on fix?

Its hard to fix something when the problem is not known yet. In any case,
the abort code is not implemented correctly to begin with, so it needs to
be
re-written to handle aborts better anyway.

Is there something I can do to stop them (access vio)
from happening when aborting download?

Doubtful, without knowing where the AV is coming from to being with.
There
isn't a whole lot going on during a transfer to be a potential source of
an
AV to begin with. Socket errors, maybe, but not AVs. It would help if
you
could track down the problem and provide more specific details. Just
saying
"there is an AV" doesn't really say very much. At least show your actual
code that is reproducing the problem in the first place.


Gambit





Back to top
Andrew Fiddian-Green
Guest





PostPosted: Wed Oct 29, 2003 1:13 pm    Post subject: Re: Access violation when downloading from IdFTPServer Reply with quote

Quote:
I will install an exception catcher
----


1) You should always do that anyway Wink -- see below.

2) Please note that by design, Indy components raise Indy defined exceptions
when -- well when exceptions occur. I don't know the FTP component, but
from experience with the HTTP components, I would expect Indy to raise an
Indy defined exception when the Abort method is called. And your AV is
probably a fall through because you are not trapping the Indy exception
properly...

With Indy you should ALWAYS use the following code template:

IndyThing := TIdThing.Create(nil);
try
try
IndyThing.SomeParameter := something;
...
IndyThing.DoSomeMethod(...);
...
except
// handle "normal" exceptions
on EIdYourAbortException do; // nothing ??
on EIdSomeOtherException do WarnUser;

// generic fall through to handle all other exceptions
on exception do Panic;
end;
finally
IndyThing.free;
end;

Regards,
AndrewFG

"Hans Frandsen" <nospam (AT) nospam (DOT) com> wrote

Quote:
Ok I will install an exception catcher and try to find out which line of
code it happens in then..

Thanks for the reply!

Hans

"Remy Lebeau (TeamB)" <gambit47.no.spam (AT) no (DOT) spam.yahoo.com> wrote in
message
news:3f9ef017$1 (AT) newsgroups (DOT) borland.com...

"Hans Frandsen" <nospam (AT) nospam (DOT) com> wrote in message
news:3f9eedd9$1 (AT) newsgroups (DOT) borland.com...
And no one is working on fix?

Its hard to fix something when the problem is not known yet. In any
case,
the abort code is not implemented correctly to begin with, so it needs
to
be
re-written to handle aborts better anyway.

Is there something I can do to stop them (access vio)
from happening when aborting download?

Doubtful, without knowing where the AV is coming from to being with.
There
isn't a whole lot going on during a transfer to be a potential source of
an
AV to begin with. Socket errors, maybe, but not AVs. It would help if
you
could track down the problem and provide more specific details. Just
saying
"there is an AV" doesn't really say very much. At least show your
actual
code that is reproducing the problem in the first place.


Gambit







Back to top
Hans Frandsen
Guest





PostPosted: Wed Oct 29, 2003 10:12 pm    Post subject: Re: Access violation when downloading from IdFTPServer Reply with quote

Well since it isn't in any of my code it happens, I cannot do anything about
it.
Indy handles all this and the ABORT works most of the time.
I think the exception handler is the way to go to uncover where it fails


Thanks
Hans

"Andrew Fiddian-Green" <andrewfg at zugernet dot ch> wrote

Quote:
I will install an exception catcher
----

1) You should always do that anyway Wink -- see below.

2) Please note that by design, Indy components raise Indy defined
exceptions
when -- well when exceptions occur. I don't know the FTP component, but
from experience with the HTTP components, I would expect Indy to raise an
Indy defined exception when the Abort method is called. And your AV is
probably a fall through because you are not trapping the Indy exception
properly...

With Indy you should ALWAYS use the following code template:

IndyThing := TIdThing.Create(nil);
try
try
IndyThing.SomeParameter := something;
...
IndyThing.DoSomeMethod(...);
...
except
// handle "normal" exceptions
on EIdYourAbortException do; // nothing ??
on EIdSomeOtherException do WarnUser;

// generic fall through to handle all other exceptions
on exception do Panic;
end;
finally
IndyThing.free;
end;

Regards,
AndrewFG

"Hans Frandsen" <nospam (AT) nospam (DOT) com> wrote in message
news:3f9f9bb5$1 (AT) newsgroups (DOT) borland.com...
Ok I will install an exception catcher and try to find out which line of
code it happens in then..

Thanks for the reply!

Hans

"Remy Lebeau (TeamB)" <gambit47.no.spam (AT) no (DOT) spam.yahoo.com> wrote in
message
news:3f9ef017$1 (AT) newsgroups (DOT) borland.com...

"Hans Frandsen" <nospam (AT) nospam (DOT) com> wrote in message
news:3f9eedd9$1 (AT) newsgroups (DOT) borland.com...
And no one is working on fix?

Its hard to fix something when the problem is not known yet. In any
case,
the abort code is not implemented correctly to begin with, so it needs
to
be
re-written to handle aborts better anyway.

Is there something I can do to stop them (access vio)
from happening when aborting download?

Doubtful, without knowing where the AV is coming from to being with.
There
isn't a whole lot going on during a transfer to be a potential source
of
an
AV to begin with. Socket errors, maybe, but not AVs. It would help
if
you
could track down the problem and provide more specific details. Just
saying
"there is an AV" doesn't really say very much. At least show your
actual
code that is reproducing the problem in the first place.


Gambit









Back to top
Display posts from previous:   
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> Delphi Internet Winsock All times are GMT
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, 2006 phpBB Group
SEO toolkit © 2004-2006 webmedic.