Android Question ANR with GPS (no location available)

Tempomaster

Active Member
Licensed User
Longtime User
Hello,

I have a ANR problem with my B4A App TempoMaster. I can not find the cause. This problem apparently appears in the service module svcoverlayinfo:

shot_000050.png


The full log with one of the 11 reports is in the attached file (executing service gd.pdf).

This error does not occur with my available devices. If the gps signal is not available for a long time a corresponding graphic is displayed.

My App in the Play Store:

https://play.google.com/store/apps/details?id=gd.tempomaster_pro

For a tip I would be very grateful.


Best regards,
Gunnar
 

Attachments

  • executing service gd.pdf
    50.8 KB · Views: 342

Tempomaster

Active Member
Licensed User
Longtime User
Hello Erel,

thank you for your reply. I have checked my code.

No DoEvents and no modal dialog in my code. In the debugger I have found another problem:

B4X:
Sub Service_Destroy
    'Closes the window
    If OW.IsInitialized Then
        OW.Close
    End If
 
    Timersteuerung.Enabled=False
    Gefahrton.Enabled=False
    If gpsStarted Then
        GPS1.Stop
        gpsStarted = False
    End If
    If TTS1.IsInitialized = True Then TTS1.Release
End Sub

Sub BtnHide_Click
       .
    Awake.ReleaseKeepAlive
    StopService("SvcOverlayInfo")
    ExitApplication
End If

The command ExitApplication has prevented the execution of service_destroy. GPS1.Stop is not executed. Can this be the cause of the ANR error ?
I have moved now ExitApplication to the end of Service_Destroy.
 
Upvote 0

Tempomaster

Active Member
Licensed User
Longtime User
Are you sure that there are no calls to Msgbox, InputList or a similar keyword?

Yes, this service module is used to display a overlay (ProBundle Library from Informatix -> OverlayWindow). GPS controls this display. Two buttons (BtnHide for stopservice+exitapplication and another button for stopservice+activate the main activity for setup menu).

P.S. The App works fine for me. No problems (4 varios devices)
 
Last edited:
Upvote 0
Top