Android Question anr error starting from android 6.0

Tempomaster

Active Member
Licensed User
Longtime User
Hello,

I've had a problem with an anr problem for some time. I can not solve it on my own. This problem only occurs from Android 6.0 . Until Android 5 there are no problems. it would really help if i could get a tip. I send in the plant the ANR log file and the affected java file.

The header for the error means:

executing service gd.tempomaster_pro/.svcoverlayinfo

In the log file is at the bottom:

- waiting to lock an unknown object ? Obviously something is missing.

Best regards,
Gunnar Daehling
 

Attachments

  • anr.log.txt
    9.7 KB · Views: 796
  • svcoverlayinfo.java.txt
    287 KB · Views: 286

Tempomaster

Active Member
Licensed User
Longtime User
No DoEvents or a modal dialog. The service uses only sleep(0). In addition, short Wav files are played with the media player.
 
Upvote 0

Tempomaster

Active Member
Licensed User
Longtime User
B4X:
Sub Service_Create
    scl=(Main.overlayscale/100)/Main.scalefaktor
    
    Timersteuerung.Initialize("Timersteuerung",1000)
    Timersteuerung.Enabled=False
    Gefahrton.Initialize("Gefahr_ton",2500)
    Gefahrton.Enabled=False
    
    aktiveapp=""
    abfahrtlg="0"
    abfahrtbr="0"
    abfahrtv=0
    abfahrtaktv=0
    entfakt=0
    iload=0
    kurs=0
    abfahrtzeit=0
    InitialPosX=0
    InitialPosY=0
    maxspeed=-1   
    maxspeedalt=-1
    veinheitsuche=True
    gpsStarted=False
    gpsok=False
    standort=0
    vanzeige=0
    breite=0
    laenge=0
    breitetemp=0
    laengetemp=0
    breitealt=0
    laengealt=0
    deltaentf=0
    suche=True
    fahrtbeginn=0
    link=False
    playeron=False
    anzeigeprog=False
    schleifenabbruch=False
    reseterlaubt=True
    
    pntlastbr="0"
    pntlastlg="0"
    pospassiert=0
    posloesch=0
    rotlicht=False
    rotbeginn=False
    signal=False
    zaehler=0
    signalzaehler=0
    For i=1 To 15
        pntgueltig(i).br="0"
        pntgueltig(i).lg="0"
    Next
    For i=1 To 15
        pntloesch(i).br="0"
        pntloesch(i).lg="0"
        pntloesch(i).richtung="0"
    Next
    zeigerbreite="0"
    zeigerbreitealt="0"
    speedcambr="0"
    speedcamlg="0"
    fahrtrichtung="N"
    CheckScrOrientation = "Portrait"
    SF.Initialize
    
    If Main.setupoverlay=True Then
        Main.setupoverlay=False
        
        Dim in As Intent
        Dim pm As PackageManager

        in = pm.GetApplicationIntent(aktiveapp)

        If in.IsInitialized Then
            StartActivity(in)
        End If
    End If
End Sub

B4X:
Sub Service_Start (StartingIntent As Intent)
    Service.StartForeground(1, CreateNotification("Tempomaster Setup","","icon60",Main,False,False))
    Main.setupoverlay=True
    Main.setupanzeige=True
End Sub

The ANR log was generated by this version:

https://play.google.com/apps/testing/gd.tempomaster_pro
https://play.google.com/apps/testing/gd.tempomaster_pro
Best regards,
Gunnar
 
Upvote 0

DonManfred

Expert
Licensed User
Longtime User
All methods of the stringfunctions lib can be done with b4a commands. No need for a library
 
Upvote 0

Tempomaster

Active Member
Licensed User
Longtime User
1. I'm not sure that StringFunctions is the cause of this issue. Please report.

I have followed your advice. Yesterday I still uploaded version 2.87 Beta. This morning I already got the first record of this mistake. I am very unhappy about it. I had already written in the last sixty days there are no problems with android smaller 6.0 .

Best regards,
Gunnar
 
Upvote 0

Tempomaster

Active Member
Licensed User
Longtime User
Are you able to reproduce it yourself?

No. I have never seen the ANR window with me. My smartphone is running on Android 4.2.2. As a second device I use the emulator Nox with Android 5.1. No problem. I can not use the emulators of b4a avd manager. There I can only start the app. For the test of the gps function during a ride, I use the app "Lockito":

https://play.google.com/store/apps/details?id=fr.dvilleneuve.lockito&hl=de

I can not get this interaction working under other emulators.
 
Last edited by a moderator:
Upvote 0

Tempomaster

Active Member
Licensed User
Longtime User
If someone wants to do this test is not a problem. In the app lockito simply set a route in Germany, Austria or Switzerland and let them leave. This app lets the smartphone drive virtually. It's best to drive in a big city like Berlin. There are most roads with information for my app set.

On the homepage of the app I show a demo how the whole thing works:

http://www.g-daehling.de/tempomaster/demo.html
 
Last edited:
Upvote 0

Tempomaster

Active Member
Licensed User
Longtime User
Users of the app are split into two camps. One group is very satisfied with the app. I have also received good reviews. The other group is complaining about the unstable app. The anr errors may not be signaled by a window. The overlay window simply disappears without comment. This window is generated by the library overlay window by Frédéric Leneuf-Magaud (Informatix).
 
Upvote 0
Top