RTC Forums
November 24, 2024, 02:54:53 AM
Welcome,
Guest
. Please
login
or
register
.
1 Hour
1 Day
1 Week
1 Month
Forever
Login with username, password and session length
Home
Help
Login
Register
RTC Forums
>
Subscription
>
Support
>
Access violation when windows app shuts down
Pages: [
1
]
« previous
next »
Print
Author
Topic: Access violation when windows app shuts down (Read 4573 times)
HelgeLange
RTC Expired
Posts: 100
Access violation when windows app shuts down
«
on:
April 27, 2016, 06:28:49 PM »
Hi Danijel,
I have some not so rare and still strange access violations in some RTC Timer when the app shuts down.
At first I thought something with the disconnect (I have 2 RtcHHttpClient comps in a datamodule), I made sure to disconnect them when the app shuts down with DisconnectNow(True)
When running outside the IDE it causes the program to stay in memory.
I'm running out of ideas where to look for a solution.. any ideas ?
Thanks in advance,
Helge
Logged
D.Tkalcec (RTC)
Administrator
Posts: 1881
Re: Access violation when windows app shuts down
«
Reply #1 on:
April 28, 2016, 01:03:11 PM »
Access Violations happen when objects or memory are being access which have already been freed.
If the problem only happens when you are closing your Application, you have to make sure that all RTC threads are idle before destroying any objects or releasing any memory which is used by RTC components or in any way linked to the components. This means closing all RTC connections, making sure that your code which could result in an automatic reconnect attempt is disabled, any RTC Timers you may have created are stopped and there are no pending jobs in any TRtcQuickJob component.
For example ... before destroying a Form or a DataModule with events used by a TRtcHttpClient component, or any number of
TRtcDataRequest
,
TRtcClientModule
or
TRtcResult
components using a TRtcHttpClient component in Multi-Threaded mode, make sure there are no pending remote calls or data requests and the connection on the TRtcHttpClient component is closed.
Best Regards,
Danijel Tkalcec
Logged
D.Tkalcec (RTC)
Administrator
Posts: 1881
Re: Access violation when windows app shuts down
«
Reply #2 on:
April 28, 2016, 01:34:11 PM »
By the way ... if you haven't done that already, I recommend updating to the latest RTC SDK version (7.18) and checking if that makes any difference. There was a bug in the rtcHwndPool unit (fixed in v7.18 update), which could have resulted in an Access Violation if there was a connection active during shutdown.
Best Regards,
Danijel Tkalcec
Logged
Pages: [
1
]
Print
« previous
next »
Jump to:
Please select a destination:
-----------------------------
Dashboard
-----------------------------
=> General
=> 3rd-Party
=> Quick Start
-----------------------------
Subscription
-----------------------------
=> Support
Loading...