Jump to content
Anto90

App on Android ANR (abnomal crash)

Recommended Posts

Hello,

i have an android app and on google play store tell me that anrs are grows.

 

the issue in particular that tell me is this 

com.embarcadero.firemonkey.dialogs.defaults.FMXDefaultDialogFragment.onCreate
java.lang.NullPointerException
 
In my app i use kastriFree.
 
Someone has this issue? It seems related to show a dialogs...
 
Thank you.
 
Andrea

 

Share this post


Link to post
Just now, Anto90 said:

the issue in particular that tell me is this 

com.embarcadero.firemonkey.dialogs.defaults.FMXDefaultDialogFragment.onCreate
java.lang.NullPointerException

Not really enough information.

1 minute ago, Anto90 said:

In my app i use kastriFree.

KastriFree has long been deprecated, in preference to Kastri.

 

Which parts of it are you using, exactly?

Share this post


Link to post

Sorry i bad explain. I use kastri.

the error come from Google play console. 
 

I use localization and the check internet connection. 
I saw that this error was in quality portal on resolved issues on 10.4.2 sydney

I cant reproduce but i still understand.

 

andrea

Edited by Anto90

Share this post


Link to post
6 hours ago, Anto90 said:

I saw that this error was in quality portal on resolved issues on 10.4.2 sydney

Which issue?

Share this post


Link to post
21 hours ago, Dave Nottage said:

Which issue?

FMX [ANDROID] FMXDefaultDialogFragment.onCreate App Crash FireMonkey RSP-23962

 

only for info this issues was resolved (Publicly reported bugs fixed in 10.4.2) but Google play console give me alert that this bus happens often.

 

Thank you

 

Share this post


Link to post
3 hours ago, Anto90 said:

Google play console give me alert that this bus happens often.

In that report, it shows the entire stack trace for when the error occurs - is it the same for yours? As I said earlier:

On 2/18/2025 at 8:47 PM, Dave Nottage said:

Not really enough information.

Also, which version of Delphi are you using?

Share this post


Link to post

Helo thank you.

From google play console i get this detail:

 

Tipo
java.lang.RuntimeException

 

Exception java.lang.RuntimeException:
  at android.app.ActivityThread.performLaunchActivity (ActivityThread.java:4169)
  at android.app.ActivityThread.handleLaunchActivity (ActivityThread.java:4325)
  at android.app.servertransaction.LaunchActivityItem.execute (LaunchActivityItem.java:101)
  at android.app.servertransaction.TransactionExecutor.executeCallbacks (TransactionExecutor.java:135)
  at android.app.servertransaction.TransactionExecutor.execute (TransactionExecutor.java:95)
  at android.app.ActivityThread$H.handleMessage (ActivityThread.java:2574)
  at android.os.Handler.dispatchMessage (Handler.java:106)
  at android.os.Looper.loopOnce (Looper.java:226)
  at android.os.Looper.loop (Looper.java:313)
  at android.app.ActivityThread.main (ActivityThread.java:8762)
  at java.lang.reflect.Method.invoke
  at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run (RuntimeInit.java:604)
  at com.android.internal.os.ZygoteInit.main (ZygoteInit.java:1067)
Caused by java.lang.NullPointerException: Attempt to invoke virtual method 'android.app.Dialog com.embarcadero.firemonkey.dialogs.defaults.FMXDefaultStandardDialog.getRealDialog()' on a null object reference
  at com.embarcadero.firemonkey.dialogs.defaults.FMXDefaultDialogFragment.onCreate (FMXDefaultDialogFragment.java:20)
  at android.app.Fragment.performCreate (Fragment.java:2486)
  at android.app.FragmentManagerImpl.moveToState (FragmentManager.java:1261)
  at android.app.FragmentManagerImpl.moveFragmentToExpectedState (FragmentManager.java:1581)
  at android.app.FragmentManagerImpl.moveToState (FragmentManager.java:1642)
  at android.app.FragmentManagerImpl.dispatchMoveToState (FragmentManager.java:3052)
  at android.app.FragmentManagerImpl.dispatchCreate (FragmentManager.java:2999)
  at android.app.FragmentController.dispatchCreate (FragmentController.java:174)
  at android.app.Activity.onCreate (Activity.java:1700)
  at android.app.NativeActivity.onCreate (NativeActivity.java:180)
  at com.embarcadero.firemonkey.FMXNativeActivity.onCreate (FMXNativeActivity.java:139)
  at android.app.Activity.performCreate (Activity.java:8591)
  at android.app.Activity.performCreate (Activity.java:8570)
  at android.app.Instrumentation.callActivityOnCreate (Instrumentation.java:1384)
  at android.app.ActivityThread.performLaunchActivity (ActivityThread.java:4150)

 

Andrea

Share this post


Link to post
6 hours ago, Anto90 said:

From google play console i get this detail:

You have not answered this part:

23 hours ago, Dave Nottage said:

Also, which version of Delphi are you using?

Meaning which version was used to compile the app where the problem is happening.


Regardless, are you able to reproduce the issue (RSP-23962) using the same steps as in the report? If so, please indicate what device(s) this is happening on.

Share this post


Link to post

I use delphi 12.2 patch 1. I test more and more but i cannot reproduce.

 

I made a small test example for the permission request for the device location. I am currently working with android. The project uses scripgate and a web browser. Library that allows you to make calls between web browser and delphi code. I press the load button and the page with a link is loaded. Pressing this link calls a function that returns the gps coordinates of the device if the location is activated. Should the activation of the locator LocationSensor1.Active := True; be done exclusively in the permission request? If I try to execute LocationSensor1.Active := True; simply in the create form if I am using the app and suddenly the connection is lost I close it and reopen it the application does not open crashing. Is it correct to ask for permissions in this way and activating the sensor in the create form or formshow after requesting permissions? i attached the sample project and scripgate library to test.

 

Thank you

 

Andrea

TestProject.rar

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

×