Android Question Are Logs from LogCat available on restart after previous crash

Robert Valentino

Well-Known Member
Licensed User
Longtime User
My music app works fine on all my devices of course but one, and the one is my Honda Ridgeline.

When starting the car my app automatically gets started (app is default audio player) and it crashes very quickly
It never calls my Application_Error - which I know works because on other crashes it gets called
If I just restart the app with the car already running (or just navigate to the audio player - then it automatically gets started again) the app works perfect.

ARE the old logs from the first crash available when I restart the app? If so how can I read them?

My app is a B4XPages app running on the Honda Ridgeline Android 4.2.2 API 17

This is very consistent that it crashes the first time and works every time after that.

Tried the app on devices as low as a S3 running 4.1.2 and all the way up to Android 11 with no problems so it is something unique to the car

Thanks - Happy Holidays to ALL

BobVal
 

Robert Valentino

Well-Known Member
Licensed User
Longtime User
I tried and wasn't successful (even installed bridge)
But I wrote this message logger (see attached) and changed all my Log commands to cLogMsgs.LogMsg to caused all my log messages to be written to a file which when on the second time starting the program would send to my email address.

I am starting 2 services in my Main Activity_Create and for some reason I see Starter log messages appearing in between startservices
B4X:
13:42:54  Starter - Started                                            <------------------------ Starter starts
13:42:54  Starter - Start - 002
13:42:55  cFile::WhichDirectoryToUse - Forcing Old Directory
13:42:55  PlaylistDirectory[/storage/emulated/0/BOBs/MusicDB/DataFiles/]
TempDir[/storage/emulated/0/BOBs/MusicDB/Temporary/]
13:42:55  Main::MakeToast -  ItalicMonospaceSupported:false
13:42:55  Main::Activity_Resume
13:42:55  cMDBGlobals::FinishInit
13:43:02  Main - Starting sBlackBoxPlayer
13:43:10  Starter - Started                                            <------------------------ Again ?
13:43:10  Starter - Start - 002
13:43:10  sBlackBoxPlayer - Create
13:43:10  sBlackBoxPlayer - Started
13:46:48  Starter - Started                                            <------------------------ and once again and we crash
13:46:48  Starter - Start - 002

So because I need these 2 services of mine to start I moved them to the start service and had starter start them.

Since doing this everything works fine

NOT sure how to debug this better until I can get my laptop to connect to the car

Thanks

Forgot after moving the startservices to starter the messages look like
B4X:
14:19:16  Starter - Starting sBlackBoxPlayer
14:19:16  Starter - Starting sMyMediaBrowserService
14:19:16  Starter - Started
14:19:16  Starter - Start - 002
14:19:16  sBlackBoxPlayer - Create
14:19:16  sBlackBoxPlayer - Started
14:19:16  sMyMediaBrowserService - Create
14:19:16  sMyMediaBrowserService - Started
14:19:17  cFile::WhichDirectoryToUse - Forcing Old Directory
14:19:17  PlaylistDirectory[/storage/emulated/0/BOBs/MusicDB/DataFiles/]
TempDir[/storage/emulated/0/BOBs/MusicDB/Temporary/]
14:19:17  Main::MakeToast -  ItalicMonospaceSupported:false
14:19:17  Main::Activity_Resume
14:19:17  cMDBGlobals::FinishInit
14:19:36  sBlackBoxPlayer - Run
14:19:36  TimeTicksPerSecond:1000
14:19:36  sMyMediaBrowserService - Run
14:19:36  MyMediaBrowserService - Try Callback
14:19:36  MyMediaBrowserService - Try sMusicDB_JO:true
14:19:38  MyMediaBrowserService - Media_Callback
14:19:38  BlackBoxPlayer::Need_MetaData
14:19:42  Send_MetaData:
 

Attachments

  • cLogMsgs.bas
    2.7 KB · Views: 223
Last edited:
Upvote 0
Top