tobexyz / yaacc-code

YAACC - UPNP Client and Server
Other
94 stars 13 forks source link

Application Not Responding (ANR) #46

Closed misanthropos closed 1 year ago

misanthropos commented 3 years ago

I recently started using some DLNA programs and I like YAACC very much. It one issue though.. I quite often get a pop up window complaining the App is not responding. I am running yaacc on Lineage OS and while I can press "wait" to get rid of it - it is annoying to do it while browsing again and again.

´´´ 08-24 12:06:38.461 E/ActivityManager( 740): ANR in de.yaacc 08-24 12:06:38.479 I/ActivityManager( 740): Skipping duplicate ANR: ProcessRecord{27bff76 23418:de.yaacc/u0a170} Context.startForegroundService() did not then call Service.startForeground(): ServiceRecord{5c8fee5 u0 de.yaacc/.musicplayer.BackgroundMusicService} 08-24 12:06:54.298 E/ActivityManager( 740): ANR in de.yaacc 08-24 12:26:20.421 E/ActivityManager( 740): ANR in de.yaacc 08-24 12:26:20.436 I/ActivityManager( 740): App already killed by AM skipping ANR: ProcessRecord{27bff76 23418:de.yaacc/u0a170} Context.startForegroundService() did not then call Service.startForeground(): ServiceRecord{5c8fee5 u0 de.yaacc/.musicplayer.BackgroundMusicService} 08-24 12:26:42.462 E/ActivityManager( 740): ANR in de.yaacc 08-24 12:27:08.373 E/ActivityManager( 740): ANR in de.yaacc 08-24 12:27:08.387 I/ActivityManager( 740): Skipping duplicate ANR: ProcessRecord{794e91c 25112:de.yaacc/u0a170} Context.startForegroundService() did not then call Service.startForeground(): ServiceRecord{a2e1fc4 u0 de.yaacc/.musicplayer.BackgroundMusicService} ´´´

tobexyz commented 3 years ago

hi @misanthropos, you are right, the pop up window appears quite often. I tried to do as many requests as possible asynchronously and decouple them from the ui thread but the problem remains. In fact it's getting worse with newer Android versions. Newer versions allowing ui blocking only a very short period. If I have a bit more free time I'll take another look on it.
BR, tobexyz

misanthropos commented 3 years ago

Hi @tobexyz,

thanks for responding. I forked your source in an attempt to fix it myself but since I have no experience with android-studio, I just tried to compile it.. and failed. Good to know though you tried to fix it - and that it just got worse ;)

Cheers