Jump to content
Sign in to follow this  
billyb

Access violation on resume in IOS

Recommended Posts

I am getting nowhere with an issue I thought might be a memory leak, but afer added code to get Low Memory warning event message it is not the case.

After using the Home button to suspend my app and run another IOS app and wait several minutes, if it return to my app and do anything I get a Access Viollation at address 00000001015C6BB0 accessing address 000000000000001A8.

The does not happen every time, but often.

 

I understand that this an error trying to reference a nill pointer, It happens when I try to click a button or show a dialog or edit a field on the form.

If I do the same suspend, but do not wait a few minutes, there is no error.

 

In one case I was able to pick a value from a dropdown list, but program locked up after selection of value,

 

My program has no timers running.

App uses SQLLite with TfdQuery and TFdmemtable

 

Do I need to do anything on IOS events

 AAppevent.aeWillBecomeInactive
 AAppevent.aeEnteredBackground

 

Any suggestions on how to proceed.

 

I am running IOS 10.4.6 ipad 7 gen delphi 10.4.2 sdk 13.6

 

 

Edited by billyb
add more details

Share this post


Link to post
Guest
13 minutes ago, billyb said:

Any suggestions on how to proceed.

First try to understand what is going on by getting clearer picture, find out what line in source code at this address 00000001015C6BB0,

Second if you can get the stack for this exception.

Third the problem is most likely something was freed and nilled then being used again, if this is the case then adding or capturing more events will not help here, because it your application with its code had freed something then assigned nil to it.

 

Hope that help.

Share this post


Link to post

I do not have option to find error address, this is Delphi FMX IOS app.

 

What is strange is that if I suspend to run another app and then resume (sometimes I get the access violation, othertimes I do not)

There does not appear to be any code that is run when my app is resumed by IOS. 

I am re-compiling in debug mode to see if I get more information when it access violates

 

 

Share this post


Link to post

I understand that your app starts and works, only when terminating it crashes after a while, is that correct ?

 

Are you doing some long operations in UI or threads, without properly stopping them before going to background ?

Did you ask for any unusual or dangerous permissions, which could cause such problems, or is it just a form-like DB application ?

 

  • Like 1

Share this post


Link to post
On 7/1/2021 at 3:53 AM, billyb said:

I do not have option to find error address, this is Delphi FMX IOS app.

Is debugging from the IDE not working for you?

Share this post


Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×