Assertion failure (uROAsync.pas, line 495)

Hi,

Just testing our latest software release and code that has been working successfully & is unchanged since RO v7 is now failing with:

Assertion failure ([…]\RemObjects Software\RemObjects SDK for Delphi\Source\uROAsync.pas, line 495)

Line 495 is in TROAsyncProxy.__RetrieveAsyncResponse and is:

Assert(Assigned(fResponse));

We’re using async calls to start long running DB processes on the server and using a Timer to poll for the results, which I believe is fairly standard stuff. It’s a custom Delphi server with a RODL, (i.e. not a code-first server).

The full bug report from MadExcept is here: http://pastebin.com/hMbqrBs8

Delphi 10.1 Berlin
RO SDK/DA 9.0.97.1245

Thanks,
Stuart

it can be happened if Retrieve_DependencyCalcsDateRange was called twice for the same request.

I can recommend to migrate to async requests via new *_AsyncEx interfaces
Usage of AsyncEx interfaces are demonstrated in the Phone Photo Server sample.

Thanks for the information but this would seem to be quite inconvenient to re-write code that was working.

What version of RO SDK was AsyncEx introduced?

I have customers with old server versions out there that this may not be compatible with & I need to not break anything.

Thanks.

AsyncEx interface this is client-only thing so it will be compatible with any server

HI,

Okay thanks, that’s good news.

I completed missed the news about Aysnc being broken and the new AsyncEx … was it published somewhere I’m not reading - or was it a release email that I might not have read properly?

Thank you
Stuart

it was announced two years ago as 66228: Improved async client APIs for Summer 2014 (8.0.81.1131).
New API uses the same mechanism as async calls in .NET

Thanks for the info.

Can you help me with the TROIndyHTTPChannel TimeOut property?

If I set this to 30000 (30s) then I get read timed out error 30s into the Async call.

Clearly I have to set this to -1 in order to allow Async calls to complete in their own time,
but will having Timeout=-1 have any undesirable side effects in the rest of the application?

Sorry, but I’m not very familiar with the indy components.

Thanks

-1 in case of Indy library mean to use default timeout.

Probably you need to set -2:

  IdTimeoutDefault = -1;
  IdTimeoutInfinite = -2;

Thanks Evgeny - very helpful.

One last question please (sorry).

In my code (which is very old) I create a duplicate Channel omponent for use with the Async calls - do I need to do that any more, or can I use the Channel component from fClientDataModule ?

Thanks

for AsyncEx calls - you can use existing one. for old Async calls, you need to duplicate channel.
of course, super channels also can use only one instance

Excellent - thanks.

I may keep the duplicate channel - it allows me to set the -2 Timeout :smile:

Thanks very much, Evgeny