Autor Beitrag
Sy-
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 177



BeitragVerfasst: Mi 12.07.06 08:59 
Hi all.

Ich habe also folgendes Problem:
Ich habe eine Liste an Daten, welche er durchgeht und sich herunterläd.
Funktioniert auch so anstandslos.

Irgendwann jedoch, fängt er an nicht mehr herunter zu laden, sondern so zu tun als wäre die URL garnicht vorhanden und das dann noch im Sekundentakt.
Kennt das Phänomen vielleicht jemand?
alias5000
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 2145

WinXP Prof SP2, Ubuntu 9.04
C/C++(Code::Blocks, VS.NET),A51(Keil),Object Pascal(D2005PE, Turbo Delphi Explorer) C# (VS 2008 Express)
BeitragVerfasst: Mi 12.07.06 14:54 
*Glaskugel polier*

_________________
Programmers never die, they just GOSUB without RETURN
matze
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 4613
Erhaltene Danke: 24

XP home, prof
Delphi 2009 Prof,
BeitragVerfasst: Mi 12.07.06 17:19 
user profile iconalias5000 hat folgendes geschrieben:
*Glaskugel polier*

Ich übersetz das mal:

Das soll bedeuten, dass er seine Glasßkugel poliert, damit er deinen Quelltext besser erraten kann.
Im Klartext: Ohne deinen Quelltext zu sehen, kann man dir nicht wirklich helfen !

_________________
In the beginning was the word.
And the word was content-type: text/plain.
alias5000
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 2145

WinXP Prof SP2, Ubuntu 9.04
C/C++(Code::Blocks, VS.NET),A51(Keil),Object Pascal(D2005PE, Turbo Delphi Explorer) C# (VS 2008 Express)
BeitragVerfasst: Mi 12.07.06 18:25 
:D
*nick*

_________________
Programmers never die, they just GOSUB without RETURN
Sy- Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 177



BeitragVerfasst: Mo 17.07.06 13:59 
Also kurz gefasst kennt ihr das Phänomen nicht.

Dann such ich mal weiter im Script.
alias5000
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 2145

WinXP Prof SP2, Ubuntu 9.04
C/C++(Code::Blocks, VS.NET),A51(Keil),Object Pascal(D2005PE, Turbo Delphi Explorer) C# (VS 2008 Express)
BeitragVerfasst: Mo 17.07.06 21:37 
Ich würde an deiner Stelle wirklich Code posten, da es IMHO danach riecht, als ob du einen Fehler in deinem Code hast.

Gruß alias5000

_________________
Programmers never die, they just GOSUB without RETURN
Sy- Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 177



BeitragVerfasst: Di 18.07.06 11:04 
Habe mal weiter rumgeschaut und kam auf ein interessantes Ergebnis:

Nach einiger Zeit - Wie ich nun herausgefunden habe nach ein paar Time Outs (mal 2 mal 3 - unbestimmt)
Fängt die Kompo an zu spinnen und lässt sich nicht mehr disconnecten, was dann zum folgenden Fehler führt:
Connection closed Gracefully

-> Connection closed Gracefully ist ja eine unstimmigkeit des Verbindungsstatus zwischen client und server
und wie es hier halt aussieht, sagt der client - NE ich bin grade verbunden kann diese Verbindung nicht aufnehmen
bei dem Disconnect kommt seltsamerweise kein Fehler oder von Indy übliche Ausnahmefall-Hinweise die normalerweise an jeder Ecke und kante kommen.

Nun meine neue Frage diesbezüglich:
Ob denn jemand ein absolutes Disconnect sozusagen für die kompo kennt, denn erst nach neustart des progges ist es resetet.
Am besten ohne einem destroy und create ^^

Oder kennt ihr da noch schönere Möglichkeiten?
Narses
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Administrator
Beiträge: 10185
Erhaltene Danke: 1261

W11x64
TP3 .. D7pro .. D10.2CE
BeitragVerfasst: Di 18.07.06 11:30 
Moin!

Nach dem, was du so beschreibst, bleibt mir nur Raten (und da du ja gerade eine Code-zeigen-Allergie zu entwickeln scheinst ;)), schätze ich mal, dass du den Timeout bei der darunter liegenden TCP-Verbindung zu umgehen wünschst (konkret: du willst nicht warten, bis die Kompo selbst sagt, geht nicht, sondern instant-OK/Fehler-Status haben).

Das ist nicht möglich (weil: TCP).

cu
Narses

_________________
There are 10 types of people - those who understand binary and those who don´t.
Sy- Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 177



BeitragVerfasst: Di 18.07.06 12:08 
Wieso raten?

Offensichtlich ist ein BUG in der HTTP Compo, was nach einigen TimeOuts (die ich nicht verhindern möchte, sondern es nur gut finde, dass er sowas macht) ihn nicht mehr connecten lässt, weil er meint noch immer verbunden zu sein, was sich nicht mit einem .disconnect ändern lässt, was auch kein Fehler bringt.

Also das ganze ist nur zu erklären, diesen Fehler macht nicht mein Script sondern die Kompo.
Wenn du das testen möchtest musste ne Linksammlung haben, den 1 - 2 Stunden laufen lassen und hoffen, dass es auftritt - und dann passiert das was ich grade ein erneutes mal geschrieben habe.

Ich möchte nun lediglich ein ersatz für .disconnect, damit ich danach einfach das, statt ein normalen disconnect nutzen kann, da er sonst fälschlicherweise meint connected zu sein.
von was anderem war nicht die rede.

Gruß
Grendel
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 443

Gentoo Linux, MacOS X, Win 2000
D5 Ent, D7 Ent, Lazarus, Anjuta, MonoDevelop
BeitragVerfasst: Di 18.07.06 12:41 
user profile iconSy- hat folgendes geschrieben:
Wieso raten?

Weil Du dich weigerst Code zu zeigen.

user profile iconSy- hat folgendes geschrieben:
Offensichtlich ist ein BUG in der HTTP Compo, was nach einigen TimeOuts (die ich nicht verhindern möchte, sondern es nur gut finde, dass er sowas macht) ihn nicht mehr connecten lässt, weil er meint noch immer verbunden zu sein, was sich nicht mit einem .disconnect ändern lässt, was auch kein Fehler bringt.


Es ist eben nicht "offensichtlich ein BUG". EIdConnClosedGracefully is kein Fehler.
Ein Blick in den Code der Indys verrät:

Indy-Source :: TIdTCPConnection.CheckForDisconnect() hat folgendes geschrieben:

(* ************************************************************* //
------ If you receive an exception here, please read. ----------

If this is a SERVER
-------------------
The client has disconnected the socket normally and this exception is used to notify the
server handling code. This exception is normal and will only happen from within the IDE, not
while your program is running as an EXE. If you do not want to see this, add this exception
or EIdSilentException to the IDE options as exceptions not to break on.

From the IDE just hit F9 again and Indy will catch and handle the exception.

Please see the FAQ and help file for possible further information.
The FAQ is at www.nevrona.com/Indy/FAQ.html

If this is a CLIENT
-------------------
The server side of this connection has disconnected normaly but your client has attempted
to read or write to the connection. You should trap this error using a try..except.
Please see the help file for possible further information.

// ************************************************************* *)


Bis neulich ...
Sy- Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 177



BeitragVerfasst: Di 18.07.06 13:30 
ah ja...

*Ganz kurz an den Anfang noch folgendes, sonst ist es sinnlos ;)*
Lest ihr euch eigentlich die Posts bis zum Schluss?

Diese Meldung ist RICHTIG - kein BUG
Dein Windows hätte auch ein Bluescreen wenn die Geräte defekt sind ohne, dass Windows ein BUG hat

Also:
Diese Meldung entsteht dadurch, weil die Compo Connected ist.
Das habe ich schon direkt im nachhinein gesagt - Fehlermeldung berechtigt

Versuchen wir TIdHTTP.disconnect passiert was?
TIdHTTP.connected = false
Richtig und das wäre Ihr Preis gewesen.

Leider ist dies nach einem unbestimmten TimeOut nicht mehr der Fall
UND GENAU DAS IST DER BUG - ER HAT DANACH DAUERHAFT .connected = true !!
2 disconnects - noch immer = true


...
Wenn ihr das nicht kennt und nicht wisst wie es zu lösen ist, dann wisst ihr das halt nicht, das liegt nicht daran, dass ihr kein code habt
wäre nur schön wenn es eine elegante Möglichkeit gäbe sowas zu lösen
Grendel
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 443

Gentoo Linux, MacOS X, Win 2000
D5 Ent, D7 Ent, Lazarus, Anjuta, MonoDevelop
BeitragVerfasst: Di 18.07.06 13:55 
user profile iconSy- hat folgendes geschrieben:
Wenn ihr das nicht kennt und nicht wisst wie es zu lösen ist, dann wisst ihr das halt nicht, das liegt nicht daran, dass ihr kein code habt

Richtig, ich kenne dieses Verhalten nicht und ich kann Dir auch nicht sagen wie es zu lösen ist.
Hätte ich aber den Code, dann könnte ich das Problem nachstellen und ggf. auch eine Lösung nennen. Aber ohne zu wissen, wie genau Du die Komponente einsetzt und wie die Exceptions behandelt werden ist es eben nicht mehr als ein lustiges Ratespiel.

btw: Über welche Indy-Version reden wir hier eigentlich?

Bis neulich ...
Sy- Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 177



BeitragVerfasst: Di 18.07.06 17:00 
Indy 10 mit D2006
raziel
ontopic starontopic starontopic starontopic starontopic starontopic starofftopic starofftopic star
Beiträge: 2453

Arch Linux
JS (WebStorm), C#, C++/CLI, C++ (VS2013)
BeitragVerfasst: Do 20.07.06 18:59 
Nach Rücksprache mit anderen Teammitgliedern haben wir uns entschlossen, das Topic nach Entfernen diverser themenfremder Beiträge wieder zu öffnen. Ein Bitte noch:

Wenn user profile iconSy- keinen Source posten will/kann/darf, dann ist das seine Sache. Wenn ihr ihm ohne Source nicht helfen könnt/wollt, dann lasst es bitte zu posten. Ständig nach Source zu fragen, wenn er ihn definitiv nicht rausrückt, ist irgendwo ja auch zwecklos.

Gruß,
raziel

_________________
JSXGraph
Sy- Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 177



BeitragVerfasst: Di 25.07.06 08:31 
So! habe weiter rumgeforscht und bin bei der Variante nun geblieben, die Kompo ständig zu erzeugen.
Läuft auch einwandfrei das ganze.

Im Prinzip immer wieder mit :=tidhttp.create; und schließlich .free;
(Und natürlich den ganzen anpassungen wie onWork usw.)

Programm lief schon 6Std durchgehend ohne Anfälligkeiten und das bei den Problem URLs.

Gruß