RTC Forums

Subscription => Support => Topic started by: Dany on August 11, 2018, 01:41:52 PM



Title: Range check error (when turning range checking on) [Linked Objects]
Post by: Dany on August 11, 2018, 01:41:52 PM
Hello!

Turn range checking on for the "LinksClient" demo.
Run the server and the client and click "Create on Client" in the client.

I get an ERangeError @TRtcObjectManager.AddObject.

Regards,

/Dany

P.S. This was actually the reason for my confused post about Modules and functions that i removed in time before more confusion could ensue :) D.S.


Title: Re: Range check error (when turning range checking on) [Linked Objects]
Post by: D.Tkalcec (RTC) on August 11, 2018, 09:21:24 PM
I've just released the RTC SDK v9.28 update, which should fix "ERangeCheck" exceptions when using Linked Objects with range checking enabled.


Title: Re: Range check error (when turning range checking on) [Linked Objects]
Post by: Dany on August 12, 2018, 07:01:32 AM
Thanks!


Title: Re: Range check error (when turning range checking on) [Linked Objects]
Post by: D.Tkalcec (RTC) on August 12, 2018, 08:05:06 AM
Since you are using Linked Object, I need to warn you that the current Linked Objects implementation uses a simple incremental counter to uniquely identify objects. Because of this, each object created (locally or remotely) would continue occupying one ID slot, even after the object was destroyed. And since the number of possible IDs is limited (max 4,294,967,295 IDs in a 32-bit process, or 2^64-1 in a 64-bit process), you could eventually run out of available Object IDs, so please keep that in mind if you are going to create/destroy a lot of linked objects, or if your Server or Clients are meant to be running 24/7 for longer periods of time without a process restart.


Title: Re: Range check error (when turning range checking on) [Linked Objects]
Post by: Dany on August 12, 2018, 09:29:34 AM
Thank you!

No, that will not be a problem here.

This is not a REST-type of application, it creates a "big" DM for each users session server side and then the session is ClientDM <=> ServerDM intensive.

And for the record it's working very well hitherto  ;D

The RTC message/thread/syncing stuff is really amazing. I can remove callbacks and "Application.ProcessMessages" that was needed previously when a similar setup was used w/o RTC and remoting (yes, yes, i know, NEVER call anything like ProcessMessages from within an RTC event). It actually looks like the Client's UI will behave better and more responsive because of RTC SDK's clear and well written event driven model.

---

I'm not finding very much in the forum on LinkedModules.

One thing i'd like to ask; is the general idea that i should use the TRtcLinkedModule's events and procedures for communication (i.e. calls, properties and events) *only* or could i put another client module with a function group on the same TDataModule that hosts the TRtcLinkedModule. I could try it myself of course... but, i must admit that i do not have a 100% clear idea about functiongroups and modules. Feel free to move this to a new topic.

TIA,

/D


Title: Re: Range check error (when turning range checking on) [Linked Objects]
Post by: D.Tkalcec (RTC) on August 12, 2018, 11:56:07 AM
Do NOT place any other RTC communication components on a DataModule with a TRtcLinkedModule! Only use the TRtcLinkedModule for all communication.


Title: Re: Range check error (when turning range checking on) [Linked Objects]
Post by: Dany on August 12, 2018, 11:59:52 AM
Thanks! Important info, that  ;D !