Tempomaster Active Member Licensed User Longtime User Jan 29, 2018 #1 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 anr.log.txt 9.7 KB · Views: 1,292 svcoverlayinfo.java.txt svcoverlayinfo.java.txt 287 KB · Views: 688
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
Erel B4X founder Staff member Licensed User Longtime User Jan 29, 2018 #2 android.os.MessageQueue.nativePollOnce - this one might be related to a call to DoEvents or a modal dialog. Upvote 0
android.os.MessageQueue.nativePollOnce - this one might be related to a call to DoEvents or a modal dialog.
Tempomaster Active Member Licensed User Longtime User Jan 29, 2018 #3 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
No DoEvents or a modal dialog. The service uses only sleep(0). In addition, short Wav files are played with the media player.
Tempomaster Active Member Licensed User Longtime User Jan 29, 2018 #4 I have used the following commands. Are these allowed? Code: Copy Try . . . Catch Log("") End Try Upvote 0
KMatle Expert Licensed User Longtime User Jan 29, 2018 #5 Of course. How big is the code inside try... catch... ? If it's too much code, you get into problems (it's just for a few dedicated lines) Upvote 0
Of course. How big is the code inside try... catch... ? If it's too much code, you get into problems (it's just for a few dedicated lines)
Tempomaster Active Member Licensed User Longtime User Jan 29, 2018 #6 Thank you. No, there are only a few lines. I was unsure with log (""). Upvote 0
KMatle Expert Licensed User Longtime User Jan 29, 2018 #7 Log nothing doesn't make sense. Log "lastexeption" (see the syntax when you write try... ) Upvote 0
Tempomaster Active Member Licensed User Longtime User Jan 29, 2018 #8 thanks, I'll try that. Upvote 0
Erel B4X founder Staff member Licensed User Longtime User Jan 30, 2018 #9 Can you post the code of Service_Create and Service_Start subs in svcoverlayinfo ? Upvote 0
Tempomaster Active Member Licensed User Longtime User Jan 30, 2018 #10 Code: Copy 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 Code: Copy 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
Code: Copy 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 Code: Copy 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
Erel B4X founder Staff member Licensed User Longtime User Jan 30, 2018 #11 I don't know whether it is related or not but you shouldn't use StringFunctions. Try to remove it and see whether it happens. Upvote 0
I don't know whether it is related or not but you shouldn't use StringFunctions. Try to remove it and see whether it happens.
Tempomaster Active Member Licensed User Longtime User Jan 30, 2018 #12 Erel said: I don't know whether it is related or not but you shouldn't use StringFunctions. Try to remove it and see whether it happens. Click to expand... Thank you. What kind of replacement is there for it. Best regards, Gunnar Upvote 0
Erel said: I don't know whether it is related or not but you shouldn't use StringFunctions. Try to remove it and see whether it happens. Click to expand... Thank you. What kind of replacement is there for it. Best regards, Gunnar
DonManfred Expert Licensed User Longtime User Jan 30, 2018 #13 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 Jan 30, 2018 #14 @manfred Thank you. I was not aware of that. I still have a lot to learn. But learning with B4A is a lot of fun. Best regards, Gunnar Upvote 0
@manfred Thank you. I was not aware of that. I still have a lot to learn. But learning with B4A is a lot of fun. Best regards, Gunnar
Erel B4X founder Staff member Licensed User Longtime User Jan 31, 2018 #15 1. I'm not sure that StringFunctions is the cause of this issue. Please report. 2. See the strings video tutorial: http://etp.b4x.com Upvote 0
1. I'm not sure that StringFunctions is the cause of this issue. Please report. 2. See the strings video tutorial: http://etp.b4x.com
Tempomaster Active Member Licensed User Longtime User Jan 31, 2018 #16 Erel said: 1. I'm not sure that StringFunctions is the cause of this issue. Please report. Click to expand... 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
Erel said: 1. I'm not sure that StringFunctions is the cause of this issue. Please report. Click to expand... 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
Erel B4X founder Staff member Licensed User Longtime User Jan 31, 2018 #17 Are you able to reproduce it yourself? Upvote 0
Tempomaster Active Member Licensed User Longtime User Jan 31, 2018 #18 Erel said: Are you able to reproduce it yourself? Click to expand... 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: Jun 29, 2020 Upvote 0
Erel said: Are you able to reproduce it yourself? Click to expand... 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.
Tempomaster Active Member Licensed User Longtime User Jan 31, 2018 #19 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: Jan 31, 2018 Upvote 0
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
Tempomaster Active Member Licensed User Longtime User Jan 31, 2018 #20 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
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).