Diese Seite mit anderen teilen ...

Informationen zum Thema:
Forum:
WinDev Forum
Beiträge im Thema:
6
Erster Beitrag:
vor 2 Jahren, 6 Monaten
Letzter Beitrag:
vor 2 Jahren, 6 Monaten
Beteiligte Autoren:
Henri P, Fabrice Harari, Henri Parianos, henri P

Wd19 and Httprequest Crash

Startbeitrag von Henri Parianos am 01.08.2015 08:34

Hi,

For a certain application I use the httprequest fucntion.

Everything works fine except when the second request is been executed.
I get at random time an application crash sometimes after 5 minutes sometimes after 2 hours.
If only use the first httprequest everything works fine.

Anybody with similar experience and or Solution? :confused: :confused: :confused: :confused:
ps. The same problem with Wd20.

Regs
Henri Parianos

.....Thread.....
HTTPRequest("http://localhost:9880/getLastTickData/"+Active_tickets[Par_index])
res = HTTPGetResult(httpResult)
IF Order_time_out_counter = Order_time_out_counter_limit
HTTPRequest("http://localhost:9880/getOrders";)
Orders = HTTPGetResult(httpResult)
end
.....

Antworten:

Hi Henri

in your code, you are not testing the result of the httprequest, which means that you are not managing the cases when an error occurs.

Also, if that is your REAL code, you are not testing the content of the return value from httpgetresult to check on the return ode (200, 404 etc), and deal with all the different possible cases.

Basically, your code, as it is now, can only work if nothing ever goes wrong anywhere (network access, server, etc).

If you don't know how to do that, there is an example of exactly that in wxreplication.

Best regards

von Fabrice Harari - am 01.08.2015 11:31
Hi Fabrice,

All check this and will come back

Any way thanks
:spos:

von henri P - am 04.08.2015 11:53
Hi

After viewing a part of wxreplication.

Actually I use the time-out function as well. (in my case 100) (result is +/- 100 bytes)
After getting the request done, ofcource I check the content of the result if it is what it has to be (expected result)


Anything else you can think ?


Regds
Henri Parianos

von Henri P - am 04.08.2015 12:36
Hi Henri,

if you are doing some checking, then your should show us your REAL code, because the one your showed us does not include that part AT ALL

Best regards

von Fabrice Harari - am 04.08.2015 13:48
Hi

After checking and rechecking the code it seems than the crash does nothing to do with the http request but with the next code of line

tabledisplay(Table_open_positions)

Table code:
Display_row (table)
Table_Open_positions[rowTotal]..BrushColor=iDarkBlue
Table_Open_positions[rowTotal]..Color=iLightYellow

I'm not sure yet but I try to eliminate all possibilitys and when I place the above code as remark the system does not crash (yet) ???

The system crash but not all the time but for sure within 2 hours.
Strange

Regds
Henri Parianos

von Henri P - am 06.08.2015 09:05
Zur Information:
MySnip.de hat keinen Einfluss auf die Inhalte der Beiträge. Bitte kontaktieren Sie den Administrator des Forums bei Problemen oder Löschforderungen über die Kontaktseite.
Falls die Kontaktaufnahme mit dem Administrator des Forums fehlschlägt, kontaktieren Sie uns bitte über die in unserem Impressum angegebenen Daten.