D.Tkalcec (RTC)
|
|
« Reply #3 on: September 04, 2020, 06:49:44 PM » |
|
In a single-threaded RTC Application, because all code is executed from the Main Thread, it doesn't matter which component calls the Execute method, because all RTC components share the same RTC message queue, where all events will be placed and executed sequentially (one after the other), following a simple first-in/first-out rule. So ... if any event doesn't finish and return control back to the message queue loop, no more events can be taken out of the message queue, which is why a call to the Execute method from inside a RTC event is a bad idea and causes your endless loop.
As far as I know, the Execute method was always meant to be called ONLY from inside the Main Thread and NEVER from inside any events triggered by any RTC component, so the fact that your code worked with RTC SDK v6.24 was more of a coincidence, than a result of my "intelligent design". And since I've made A LOT of changes over the years, I couldn't tell you which version might still work for you, even if I wanted to.
If you look up the "Execute" method in the RTC SDK HELP file, even in RTC SDK v6.24 (which you have been using), you will find this WARNING: Because of its blocking implementation, "Execute" method can NOT be used from events triggered by the RTC SDK (for example, from the OnResult or OnAbort events triggered by a remote call issued by using the "Call" method) and ... the "Execute" method can ONLY be used from one thread at a time.
Maybe you didn't see that warning before, or maybe you thought that the limitation only applied to Execute methods called from within events triggered by the component that issued the Execute call, but ... that is NOT the case, because all RTC components running in a single-threaded RTC Application share the same message queue loop, which can't continue running if an event triggered from the message queue loop gets blocked (for example, by a call to the Execute method from inside the event).
Anyway ... if you really wanted to find the latest RTC version that still works with your code, without the need for you to make changes, then you could try downloading every RTC version released after v6.24 until you find the first one that no longer works, at which point you'd have to roll back one version, since that would be the one you are looking for (the latest version that still works with your existing code).
Best Regards, Danijel Tkalcec
|