Exceptions raised in code-first custom Delphi Server cause Access Violations in the client application

Hi,

I am raising exceptions on the server which I want to show in the client, but not matter what I do on the server, I always get an Access Violation or Invalid Pointer Operation on the client.

Delphi 10.3 / RO-DA 10.0.0.1495

Thanks

Hi,

pls review the MegaDemo sample. it shows how to pass exception from server-side to client-side.

1 Like

Stuart,

this should “just work” out of the box, unless something is going wrong or messing the tree exception code. DO you get a call stack for the AV or IPO? Do you get one or the other randomly, or is there any consistency to it?

Is your code doping anything special non-standard with the RO infrastructure, aside form just making plain calls (i.e. trying to handle any OnException events or the like yourself)?

Hi marc

I’m returning to RO/DA after a year on other projects, and I thought it did “just work”. I’m not doing anything I would call special or non standard. I do raise exceptions in remote method calls on occasion, hoping that they would be raised on the client. But mostly Im just want to see naturally raised exceptions.

I haven’t seen a pattern of AV v IPO…maybe if the client app is VCL or not?

I’ll grab a client side stack trace on Monday

Thanks

1 Like

I think this could help greatly, yeah. Thanx!

I added an obvious bug to my server method which would cause an “Index out of range” and then called that method from a console client app, which resulted in the following client side activity.

Project aqDBUpgrade.exe raised exception class EInsufficientRtti with message ‘Insufficient RTTI available to support this operation’.

…Press BREAK…

:7743b922 KERNELBASE.RaiseException + 0x62
:0044c323 CheckCodeAddress + $13
:0046258b TRttiMethod.Invoke + $47
uRORTTISupport.TRORttiClientCache.RebuildCache
uRORTTISupport.TRORttiClientCache.GetExceptionClass(‘EAccessViolation’,$292B710)
uRORTTISupport.RORTTI_GetExceptionClass(‘EAccessViolation’,$292B710)
uROExceptions.GetExceptionClass(‘EAccessViolation’,$292B710)
uROMessage.TROMessage.CreateException(‘EAccessViolation’,‘Access violation at address 01BC69F3 in module ‘‘AquilaServer.exe’’. Read of address 00000000’)
uROBinMessage.TROBinMessage.ReadException
uROMessage.TROMessage.ProcessException
uROBinMessage.TROBinMessage.IntReadFromStream($28D8C00,False)
uROBinMessage.TROBinMessage.ReadFromStream($28D8C00,False)
uROTransportChannel.TROTransportChannel.Dispatch(TROBinMessage($283E744) as IROMessage)
AquilaLibrary_Intf.TiBIDSvc_Proxy.DependencyCalcsDateRangeEx(-36887,2958465,False,$28FB168)

…Press F9…

Project aqDBUpgrade.exe raised exception class EInvalidPointer with message ‘Invalid pointer operation’.

…Press Break…

:00408af5 TObject.FreeInstance + $11
(this is lMessage := nil in the “Finally” section of the generated method)
AquilaLibrary_Intf.TiBIDSvc_Proxy.DependencyCalcsDateRangeEx(-36887,2958465,False,$28FB168)
dmDBUpgraderData1.TdmDBUpgraderData.RecalcAnalysis(‘AH38896008’,[])

…F9…

Project aqDBUpgrade.exe raised exception class EInvalidPointer with message ‘Invalid pointer operation’.

…press Break…

:00408af5 TObject.FreeInstance + $11
:00408b33 TObject.Free + $B
:0040f2a3 @IntfClear + $13
uROInterfacedObject.TROInterfacedObject._Release
:0040f2a3 @IntfClear + $13
aqDBUpgrade.Main

This now appears on the client as “Invalid Pointer Operation”.

Hope this helps.

Hi,

According to call-stack, this issue seems to be a bug in Remoting SDK.
However you are using an outdated version of RO so this issue seems to be fixed for latest 1,5 years because this AV isn’t reproduced with the simple testcase. testcase.zip (221.4 KB)

is it possible to retest your project with the latest trial version of Remoting SDK?

Hi marc & Evgeny,

It’s odd that you say I am using an outdated version of the software, as the Remobjects splash screen and version check when I load Delphi says all my products are up to date ?

Also - I renewed my license on March 1st but the portal still says I have to “Renew Now to get access to this build” even though it states the current license doesn’t expire until Mar 2023. It also showed a renewal item in my basket - which I’ve now removed.

The latest version I can get is 10.0.0.1533.

When I launch Everwood Welcome screen, and do an update check - it doesn’t actually tell me anything when I hit refresh. This is after hitting “Refresh” :

?? Doesn’t say everythings up to date, but it also doesn’t notify me about any new releases?

Has something has gone wrong here with the renewal - could someone look into this for me ??

Thanks,

Stuart

For info:

FWIW, the license in your account looks good til March 2023… I’ll have a look if/why yu can’t download the latest…

You only have access to the Delphi versions, but that’s expected and matches your license, and the download seems to work fine?. Although I do admit that I’d not expect it to show the “Renew now” message but rather should just to see the other editions — I will invesitate and fix why that is happening.

Hi marc

Thanks - I admit I didn’t even try the download link :laughing:

Could you look into why my Everwood is reporting everything is up to date too? I’m just not seeing any new release notifcations anywhere & I’d like to stay up to date.

I’ll try the 1533 build see if that solves the problem.

Thanks

@EvgenyK?

coopl, thanx!

Hi,

this is known issue (#337) that was fixed after .1495 was released.

Hi Evgeny,

This is what I am getting now via Everwood (build 1533) - “There was a problem checking for updates”:

When I “click here to try again” it opens the version list which tells me everything is up to date.

Best wishes

Hi,

odd, I can’t reproduce this:
untitled

is it possible, that you have some issues with network connection?

Hi,

Nope, internet is working fine :slight_smile:

Build 1533 seems to have solved my problem of getting error messages through to the client - thanks for that :smiley:

Happy to hear that! :raised_hands:t3: