[AWS] AWS.Client.Post crashes with Program_Error after gpl2017 upgrade
Björn Lundin
b.f.lundin at gmail.com
Sat Aug 19 14:29:22 CEST 2017
Hi!
Today I upgraded from gnatgpl-2014 with AWS 3.3.1 to gnatgpl 2017 with
buildin AWS
Unfortunatly my code crashes now
in procedure Login I use AWS.Client.Post which crashes with message
2017-08-19 14:23:01.500 Main. : Closed log and die
2017-08-19 14:24:01.912 Lock.Take : Take lock:
'/home/bnl/bnlbot/botstart/user/bnl/locks/bet_placer_001'
2017-08-19 14:24:01.915 Lock.Take : Lock taken
2017-08-19 14:24:01.915 Bot svn version: 1938
2017-08-19 14:24:01.915 Main. : Login betfair
2017-08-19 14:24:01.915 RPC.Init : start
2017-08-19 14:24:01.915 RPC.Init : stop
2017-08-19 14:24:01.916 PROGRAM_ERROR
2017-08-19 14:24:01.916 Message : aws-client.adb:548 finalize/adjust
raised exception
2017-08-19 14:24:01.916 raised PROGRAM_ERROR : aws-client.adb:548
finalize/adjust raised exception
Call stack traceback locations:
0x8c62af 0x6e09a1 0x409341 0x410202 0x7f2f3a0e6b43 0x408145
0xfffffffffffffffe
and addr2line gives
bnl at prod:~/bnlbot/botstart/user/bnl/log$ addr2line --functions
--basenames
--exe=/home/bnl/bnlbot/botstart/bot-1-0/target/bin/bet_placer 0x8c62af
0x6e09a1 0x409341 0x410202 0x7f805588ab43 0x408145 0xfffffffffffffffe
aws__client__post
??:?
rpc__login
rpc.adb:70
_ada_bet_placer
bet_placer.adb:252
main
b__bet_placer.adb:1637
??
??:0
_start
??:?
??
??:0
Rpc.adb:70 is the call to Aws.Client.Post below
Why do I get a PROGRAM_ERROR now ? what changed?
procedure Login is
Login_HTTP_Headers : Aws.Headers.List := Aws.Headers.Empty_List;
AWS_Reply : Aws.Response.Data;
Header : AWS.Headers.List;
begin
Aws.Headers.Add (Login_HTTP_Headers, "User-Agent", "AWS-BNL/1.0");
declare
Data : String := "username=" & Global_Token.Get_Username & "&" &
"password=" & Global_Token.Get_Password &"&" &
"login=true" & "&" &
"redirectMethod=POST" & "&" &
"product=home.betfair.int" & "&" &
"product=home.betfair.int" & "&" &
"url=https://www.betfair.com/";
begin
AWS_Reply := Aws.Client.Post (Url =>
"https://identitysso.betfair.com/api/login",
Data => Data,
Content_Type =>
"application/x-www-form-urlencoded",
Headers => Login_HTTP_Headers,
Timeouts => Aws.Client.Timeouts
(Each => 30.0));
end ;
Log(Me & "Login", "reply" & Aws.Response.Message_Body(AWS_Reply));
--
--
Björn
More information about the AWS
mailing list