Watch, Follow, &
Connect with Us

For forums, blogs and more please visit our
Developer Tools Community.


Welcome, Guest
Guest Settings
Help

Thread: RTL throws exception on shutdown


This question is answered. Helpful answers available: 2. Correct answers available: 1.


Permlink Replies: 1 - Last Post: Sep 27, 2016 6:12 PM Last Post By: Robert Small
Robert Small

Posts: 44
Registered: 5/12/98
RTL throws exception on shutdown  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Sep 26, 2016 10:41 PM
Windows 7 64-bit Ultimate
Delphi 10.1 Berlin Update 1

I am currently using XE4
I am now testing my app with 10.1 Berlin and I get the following exception when I close my app.

Exception EAccessViolation in module rtl240.bpl at 000119DC.
Access violation at address 500619DC in module 'rtl240.bpl'. Read of address 02A4E964.

The address numbers aren't consistent.

I do not get this exception compiling with XE4. The code is unchanged.

I have tried putting a breakpoints in all my code, but they all pass OK

I accept that the underlying cause is most probably something in my code, and that the RTL is trying to clean up something that I have already freed and/or nilled.

What can I do to identify the problem??
Robert Small

Posts: 44
Registered: 5/12/98
Re: RTL throws exception on shutdown  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Sep 27, 2016 6:12 PM   in response to: Robert Small in response to: Robert Small
Well, the problem appears to be solved.

The exception was only being raised when the app called a sequence of support DLLs.

I added a call to FreeLibrary after using the DLL, and the exception is no longer raised.

So now when I need to use the DLL (which is only done infrequently) I now call LoadLibrary, do the work, then call FreeLibrary

Now to carry on with my 10.1 testing.
Legend
Helpful Answer (5 pts)
Correct Answer (10 pts)

Server Response from: ETNAJIVE02