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: