Conga 3.1 issue on DAPL v17

APL-related discussions - a stream of APL consciousness.
Not sure where to start a discussion ? Here's the place to be
Forum rules
This forum is for discussing APL-related issues. If you think that the subject is off-topic, then the Chat forum is probably a better place for your thoughts !

Conga 3.1 issue on DAPL v17

Postby woody on Sat Mar 09, 2019 10:40 pm

Perhaps there is a patch I'm missing?

I am on Dyalog APL V17 64bit and using Conga v3.1 on Windows 10.

I have a strange error ... that only seems to happen if I RAPID enter a HTTPGet call several times in a row.

Code: Select all
Pasted From Dyalog        )load Conga
C:\Program Files\Dyalog\Dyalog APL-64 17.0 Unicode\ws\Conga.dws saved Wed Jul 18 21:09:30 2018
This is the Conga v3.1 workspace.
      )fns
      )vars
      )obs
Conga   DRC     HTTPUtils       Samples
      )cs Samples
#.Samples
      )fns
HTTPGet HTTPPost        HTTPReq
      a←HTTPGet 'http://APLSEED.com'
      a←HTTPGet 'http://APLSEED.com' 
      a←HTTPGet 'http://APLSEED.com' 
      a←HTTPGet 'http://APLSEED.com'
      a←HTTPGet 'http://APLSEED.com'
RANK ERROR
HTTPGet[121] :If {(⍵[3]∊'12357')∧'30 '≡⍵[1 2 4]}4↑{⍵↓⍨⍵⍳' '}(⊂1 1)⊃2⊃header
⍝ redirected? (HTTP status codes 301, 302, 303, 305, 307)


NOTE that I tried Dyalog APL V15 and the older Conga ...
and did not see the problem with RAPID FIRE HTTPGet calls.

Thoughts?

Thanks!

//W
Woodley Butler
Automatonics, Inc.
"Find your head in the APL Cloud"
http://www.APLcloud.com
User avatar
woody
 
Posts: 114
Joined: Tue Dec 28, 2010 12:54 am
Location: Atlanta, Georgia USA

Re: Conga 3.1 issue on DAPL v17

Postby AndyS|Dyalog on Tue Mar 12, 2019 1:09 pm

Hi there

We did issue a new set of Conga 3.1 (and 3.0) DLLs a few days ago .. it might be worth installing them from my.dyalog.com. However we don't recognise the symptoms that you have described.

Both Bjorn and I have tried reproducing your problem, either by repeatedly reentering the line of code, or trying zz←{⍵,2↑a←Samples.HTTPGet'http://APLSEED.com'}¨⍳10, but we get no error. Can you drop support a note with some more details: the output from the Help->About box in the interpreter session file, and the output of DRC.Init'' ⋄ DRC.Describe'' would be very helpful. Can you also tell us what the variable header contains and what its shape is ?

Rather than using Samples.HTTPGet you might be better off trying
      )xload conga
]load HttpCommand
a←(#.HttpCommand.Get'http://APLSEED.com').Data

.. if for no other reason than that the Samples namespace has been removed from the Conga workspace in the forthcoming 17.1 ..
User avatar
AndyS|Dyalog
 
Posts: 216
Joined: Tue May 12, 2009 6:06 pm

Re: Conga 3.1 issue on DAPL v17

Postby woody on Wed Mar 13, 2019 2:11 am

UPDATE

I ran the V17 update ...

and now the problem seems to have gone away.

I now am running Dyalog APL
Version: 17.0.35814.0 64 Unicode
Created: Mar 7 2019 at 19:47:32
Build ID: 71e1789c

And using your suggestion

a←(#.HttpCommand.Get'http://APLSEED.com').Data

Which does not have the symptoms.

I'm back in business !

Thanks for the support !


//W
Woodley Butler
Automatonics, Inc.
"Find your head in the APL Cloud"
http://www.APLcloud.com
User avatar
woody
 
Posts: 114
Joined: Tue Dec 28, 2010 12:54 am
Location: Atlanta, Georgia USA

Re: Conga 3.1 issue on DAPL v17

Postby woody on Thu Mar 21, 2019 11:06 pm

Quick follow-up question about

Code: Select all
)xload conga
]load HttpCommand


From time to time ... as I RIP through development, debugging and )RESET ...

I notice that my reference to HttpCommand namespace stops working.

HOWEVER .. this is easily fixed with the following

Code: Select all
]load HttpCommand


Why would this be needed ?
What might be breaking within conga that I would need this ]load HttpCommand step again?

NOTE: I constructed a RUNTIME.exe and it works perfectly ... and always starts up as expected.

However, as I develop in APL v17 ... debug ... catch errors, fix, )RESET .. and SAVE the workspace... the next day, I open the DWS workspace, and my program fails to make a clean Internet connect to my web site.

THEN ... I enter ]xload HttpCommand and all is perfect again.

Any clues on what ]xload is actually doing ... and what could be broken, stuck, hung, or out of sync ... that suddenly is fixed again ?

Thanks!

//W
Woodley Butler
Automatonics, Inc.
"Find your head in the APL Cloud"
http://www.APLcloud.com
User avatar
woody
 
Posts: 114
Joined: Tue Dec 28, 2010 12:54 am
Location: Atlanta, Georgia USA

Re: Conga 3.1 issue on DAPL v17

Postby Morten|Dyalog on Fri Mar 22, 2019 8:20 am

The fundamental problem here is the saving of a workspace containing instances of an object (Conga) which need initialization steps, like loading a DLL. If you regularly trap errors and escape out of running code, and then )SAVE the workspace, you can leave object instances in a state where they believe that they are initialised, but they are not.

In version 17.1 we have tried to add code to Conga and HttpCommand so that they trap the errors and re-initialise things. However, as a general rule it is best to write your application so that it re-initialises components like Conga on )LOAD. Do not use old references that have been stored in a workspace. The problem with HttpCommand is in some ways that it tries to be too helpful: without your knowing it, it creates an instance of Conga for its own use and hides that fact.

Your runtime system will not suffer from this problem, as it presumably always starts up from a "clean" workspace.

Note that this is a general issue with using classes that contain code to "open" external resources: DLLs, database connections, tcp sockets, component or native files, etc. If that code is in the constructor and you use an instance of the class that has been refrigerated overnight, things may fall apart.
User avatar
Morten|Dyalog
 
Posts: 354
Joined: Tue Sep 09, 2008 3:52 pm

Re: Conga 3.1 issue on DAPL v17

Postby Brian|Dyalog on Fri Mar 22, 2019 1:40 pm

Hi Woodley,

A couple of things to note:
  • Thanks for reporting the version of the interpreter; that helps a lot! When you report something about HttpCommand, can you also tell us the version of HttpCommand? The HttpCommand version can be reported by doing
          HttpCommand.Version
    .
  • You can also grab the latest HttpCommand from the GitHub repository by running HttpCommand.Upgrade
          ]load HttpCommand
    #.HttpCommand
    HttpCommand.Version
    HttpCommand 2.1.14 2018-10-02
    HttpCommand.Upgrade
    0
    HttpCommand.Version
    HttpCommand 2.1.23 2019-03-12

    Mind you this does NOT, at present, overwrite the version of HttpCommand installed in the Dyalog installation folder. So if you subsequently ]load HttpCommand, it will revert to the installed version.

I hope this helps!
/Brian
User avatar
Brian|Dyalog
 
Posts: 89
Joined: Thu Nov 26, 2009 4:02 pm
Location: West Henrietta, NY

Re: Conga 3.1 issue on DAPL v17

Postby woody on Sat Mar 23, 2019 2:05 pm

Good info!

Here's what I see

Code: Select all
          )obs
Conga   DRC     HTTPUtils       HttpCommand
      #.HttpCommand.Version
 HttpCommand  2.1.6  2018-06-16
      #.HttpCommand.Upgrade
0   
      #.HttpCommand.Version
 HttpCommand  2.1.23  2019-03-12



Much better !

Thanks!

//W
Woodley Butler
Automatonics, Inc.
"Find your head in the APL Cloud"
http://www.APLcloud.com
User avatar
woody
 
Posts: 114
Joined: Tue Dec 28, 2010 12:54 am
Location: Atlanta, Georgia USA


Return to APL Chat

Who is online

Users browsing this forum: No registered users and 1 guest