Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Latest Google AA version 5.0.500224 causing restarts with Headunit AA_v1.12 #173

Closed
ixnewton opened this issue Feb 12, 2020 · 58 comments
Closed

Comments

@ixnewton
Copy link

ixnewton commented Feb 12, 2020

headunit.log
Since the latest version of Google's AA (5.0.500224) arrived 23rd Jan the Headunit (AA_v1.12) experiences restarts or crashes. It appears to be when there are major map updates, initiating a new destination and change of focus caused by a notification.

Testing this version with Android Studio DHU (Android Auto Desktop Head Unit emulator) AA works fine even when a media app is playing and using USB2 connection to the emulator (port tcp:5277).

The attached log may show what is going on? To try to get some better debug I've managed to compile the latest version in the master branch in the hope it will show some more useful debug in the log. Any suggestions on which debug lines to uncomment?

@ixnewton
Copy link
Author

Looks like this is an out-of-memory issue? Adding the swapfile on a USB2 drive (Sandisk) seems to avoid restarts on setting map destinations. However, this may run into a previous issue where the USB locks up on start-up or re-start of the car ignition. I'll update my findings here.

@achuman
Copy link

achuman commented Feb 12, 2020

I also went on a witch hunt to find the cause. Eventually found this: https://support.google.com/androidauto/thread/13722361?hl=en&msgid=28126850

My Google Play Services has since updated to 20.04.14 and it solved the issue.

@ixnewton
Copy link
Author

ixnewton commented Feb 13, 2020

I can't confirm your result as Play services remains at 20.03.13 with my version of Android 10 (OnePlus OS 10.3.1). However it is likely that the memory needs of the AA head unit are not going to reduce with future navigation and media apps. Luckily so far adding the swap file (1Gb) effectively doubling the memory available solves the problem and I guess the active code runs in real memory (paged blocks in RAM). There does not seem to be any speed hit in swapping views or applications. If necessary a CMU reboot should re-fresh what gets pushed to the swapfile.

Leaving the USB drive connected is not a problem as the small size is nearly flush with the hub. Using this drive to store music files would probably be a bad idea as this will put the USB media player into memory and invite USB usage conflicts. I hope this helps other Mazda CMU users who have hit this problem?

@ensiform
Copy link

This has definitely affected me too. Usually if I start maps before I plug in and then connect. And spam home key it works fine as long as no media or maps are loaded. I'm staying on 55 until there's support for aio and aa on 70+ if that's even going to still happen.

@iassael
Copy link

iassael commented Feb 16, 2020

I'm having the same issue, but the results didn't improve when I used the AIO swapfile tweak. Do you have any ideas? Thanks

@csirek
Copy link

csirek commented Feb 17, 2020

Hi Guys,
2 days ago i used the AA 500224 with 1.12 Head on the full day without an issue . Yesterday i saw (i hope i wrote it right) the "Android System WebView" updated to 80.0.3987.99 and from this time the phone drop the AA Headunit connection (i think exit and reconnect). May be it is not the root problem but i faced with it and may be it is an info for the Devs.Oh and an info, the Google Play Services upgrade to 20.04.14 at 11/02/2020 so it was before i used the AA on the full day without issue. But as i see the Webview update date is the 11/02/2020 too but just see the updated message on yesterday (16/02/2020)

@ixnewton
Copy link
Author

ixnewton commented Feb 17, 2020

This is getting a bit more difficult to pin down. The swapfile has definitely made my install stable. One thing I do is always let the swapfile get fully loaded on CMU reboot before connecting the phone. The headunit app should then load making space for itself to run in RAM. I think the choice of USB drive is important, a speedy low consumption drive (USB2 only) will avoid loading the USB hub. Unplugging the SD navigation card should also help.

The software versions I'm using are:
Android System WebView - 80.0.3987.99
Android Auto - 5.0.500224
Android Auto for phone screens - 1.1
AIO AA headunit - 1.12
Mazda CMU - 56.00.513 EU N

So far logging has only shown up this issue which I don't think is fatal:
(gst-plugin-scanner:3320): GStreamer-CRITICAL **: gst_pad_template_new: assertion caps != NULL' failed (gst-plugin-scanner:3320): GStreamer-CRITICAL **: gst_element_class_add_pad_template: assertion GST_IS_PAD_TEMPLATE (templ) failed �[1;34mMAX resolution 800x480 �[0m (gst-plugin-scanner:3522): GStreamer-CRITICAL **: gst_pad_template_new: assertion caps != NULL' failed (gst-plugin-scanner:3522): GStreamer-CRITICAL **: gst_element_class_add_pad_template: assertion GST_IS_PAD_TEMPLATE (templ) failed headunit version: v1.12-4-g8547128

@aserper
Copy link

aserper commented Feb 17, 2020

I also have been experiencing issues in the past few days - using AA 1.12 on an abarth 124 v55 CMU with a pixel 4. Things worked great (other than the usual audio stutter) up until a few days ago where the headunit app crashes, restarts, and crashes again (on and on in a loop pretty much until I disconnect the phone from the USB) if using map navigation (Waze or gmaps). It's worth mentioning that if I connect to AA using WiFi then it seems to work just fine but the audio stutter is constant and completely unenjoyable

@achuman
Copy link

achuman commented Feb 17, 2020

I also have been experiencing issues in the past few days - using AA 1.12 on an abarth 124 v55 CMU with a pixel 4. Things worked great (other than the usual audio stutter) up until a few days ago where the headunit app crashes, restarts, and crashes again (on and on in a loop pretty much until I disconnect the phone from the USB) if using map navigation (Waze or gmaps). It's worth mentioning that if I connect to AA using WiFi then it seems to work just fine but the audio stutter is constant and completely unenjoyable

This is 100% the symptoms of the play services bug. I had constant restarts for a week or so and it suddenly fixed itself. Check your version of Google play services.

@nirlav
Copy link

nirlav commented Feb 18, 2020

I faced the same issues that describe above, after clean cache and data for Google play services and Android System WebView seems problem solved (even audio stutter improved).

phone - pocophone f1
OS - Android 10
AA 1.02
Android Auto - 5.0.500224
Google Play services - 20.04.14
Android System WebView - 80.0.3987.99

@ixnewton
Copy link
Author

ixnewton commented Feb 18, 2020

Clearing of caches on the phone apps which queue up and transmit data to the head unit makes sense. The transmission of data is dependent on the thin pipe available which is USB 2 and caches are designed to smooth out peaks of demand. This is why we get some stuttering of audio when navigation data hogs the connection or switching audio streams. Wi-Fi connection is likely to be worse, having lower bandwidth.

The headunit is also caching its side of the communications. The risk here is caches in memory can hit the limit of memory available and so crash the headunit. I'm trying to log the memory usage over a period of use to see if the pattern of free memory and if we simply hit the top of fixed RAM at only 1Gb! http://www.2x4logic.com/mazdaconnect.html

@ensiform
Copy link

@nirlav is WebView actually used on your phone? On Pixels it is not used by default since several versions of Android, and instead the browser has app rendering directly for chromium based Android browsers and possibly others.

@nirlav
Copy link

nirlav commented Feb 18, 2020

@nirlav is WebView actually used on your phone? On Pixels it is not used by default since several versions of Android, and instead the browser has app rendering directly for chromium based Android browsers and possibly others.

Yes, I can change it from developer options under the WebView implementation section.

@csirek
Copy link

csirek commented Feb 20, 2020

I tried to clear just the cache of the Google Play Services and the Google System Webview but it didn't resolve my restart problem :(

@aserper
Copy link

aserper commented Feb 20, 2020

Same. Cleared cache (and even data) of pretty much everything related. Google play services version is 20.04.14 (120400-294335909). Still crashes

@hacktek
Copy link

hacktek commented Feb 20, 2020

I have this issue. Started about a week ago.

phone - pocophone f1
OS - Android 10 (Pixel Experience Custom Rom)
AA 1.12
Android Auto - 5.0.500224
Google Play services - 20.04.14
Android System WebView - 80.0.3987.117

I have a second phone that I keep plugged into the car. It's a Mi A1 with Pie and it only gets internet via hotspot when I'm in the car. In that case that phone worked for several days after my poco started failing until it eventually also started failing, suggesting that this was indeed caused by an update.

@RobsonMi
Copy link

RobsonMi commented Feb 20, 2020

Same issue for me after update of Google Maps to version 10.35.2 this morning (it was release earlier but I waited before update). AA is now useless as ti restarts every few seconds. Will try the swap file but doubt it will fix anything.

Maybe this has something in common? #174

@iassael
Copy link

iassael commented Feb 20, 2020

I've tried sending feedback https://support.google.com/androidauto/answer/6377918?hl=en-GB, hopefully capturing bug reports and sending them helps in the long run.

@aserper
Copy link

aserper commented Feb 21, 2020

@Trevelopment will there be a release with this PR?
#174 (comment)

@krogoth2k
Copy link

It's allready merged into current branch.

Anyone have new compilation?

@Soukyuu
Copy link

Soukyuu commented Feb 21, 2020

Maybe this has something in common? #174

According to the log in the first post, yes:

E: /home/mazda/headunit/hu/hu_aap.cpp:1406: hu_aap_recv_process : Interleaved channels
E: /home/mazda/headunit/hu/hu_aap.cpp:1302: hu_thread_main : hu_aap_recv_process failed -1
DisconnectionOrError
quitting...

Is this something caused by the AA app, or is that the Maps app which can decide to do it?

@RobsonMi
Copy link

RobsonMi commented Feb 21, 2020

Hi! Managed to build current master branch and I can confirm issue is solved for me. Even stutters with waze are gone now. Will need more testing on road with normal use but I managed to receive a phone call while listening to spotify and searching a route in Google Maps and nothing crashed. Very happy!

I hope I can share it here with you ;)
AndroidAuto_v1.05-52-g54b38d6.zip

@csirek
Copy link

csirek commented Feb 21, 2020 via email

@krogoth2k
Copy link

Is this fixed version in the latest AIO 2.8.5?

Nope. 2.8.5 contains AA 1.12

@Soukyuu
Copy link

Soukyuu commented Feb 21, 2020

AndroidAuto_v1.05-52-g54b38d6.zip

This does not pass the installer smoke test for me.

It seems to work if you copy the whole config/androidauto folder over a 1.12 install, though, I'll see if I get any crashes once I'm actually driving...

@ixnewton
Copy link
Author

Tested your build and it works great! I built the same following some of the above comments. No need for the swapfile so that is gone. It probably masked the problem not solved it. If the headunit can happily run in the free memory available then it will run nicely.
total used free shared buffers
Mem: 772232 594096 178136 0 45852

In testing I noted the stuttering was only now as a result of source switching when AA gives traffic info or route information. If voice guidance is enabled this will be annoying. Turning off notification sounds in the phone AA app settings is probably a good idea.

Hopefully @Trevelopment will make a build for a release through the MZD-AIO tool.

I will close this thread as it appears to be solved. Thanks for your help.

@alexpennos
Copy link

So guys, just a question. How should we use the build mentioned below?

Hi! Managed to build current master branch and I can confirm issue is solved for me. Even stutters with waze are gone now. Will need more testing on road with normal use but I managed to receive a phone call while listening to spotify and searching a route in Google Maps and nothing crashed. Very happy!

I hope I can share it here with you ;)
AndroidAuto_v1.05-52-g54b38d6.zip

@danirios93
Copy link

So guys, just a question. How should we use the build mentioned below?

You should compile with the latest AIO tool and then replace the files in config/androidauto for the provided above.

@alexpennos
Copy link

alexpennos commented Feb 23, 2020

AA

I also could see that the display of Waze was not right, it had a space at the left that shouldnt be there.

Thank you very much for the replies again!
The waze-thing is common issue for all AA users. I think AA devs have messed it up with yhe latest update...
Screenshot_20200223-223340_Google

Link: https://www.autoevolution.com/news/waze-directions-box-suddenly-centered-makes-android-auto-navigation-a-struggle-141285.html

@duckunix
Copy link

I hope I can share it here with you ;)
AndroidAuto_v1.05-52-g54b38d6.zip

So, loaded this in my M3 on Friday, and then did a 90ish minute drive to someplace new, and it is working great now. Thanks!

@nahueltaibo
Copy link

I hope I can share it here with you ;)
AndroidAuto_v1.05-52-g54b38d6.zip

So, this are the steps to solve the issue:

  1. Get the compressed update from RobsonMi's solution :
    https://github.com/gartnera/headunit/files/4235978/AndroidAuto_v1.05-52-g54b38d6.zip
  2. Unzip AndroidAuto_v1.05-52-g54b38d6.zip
  3. Copy contents of installer folder to USB stick
  4. Plug the usb stick into your car It should install automatically, (in my case took 3 or 4 minutes to show the prompt asking to start the installation) if it doesn't, restart navigation (nav button + mute for 10s) and follow the prompts.
  5. Give 10 minutes to the installation process (It doesnt inform about the progress nor success)
  6. After 10 minutes manually reboot CMI (nav btn + mute for 10s).

Those were the steps I followed and everything is working fine now.

@alexpennos
Copy link

Hello again guys. It is indeed working. But not perfect. It doesn't crash but it is impossible to have music streamed from neither YT music, nor Spotify when Waze is on screen and in particular when having to redraw something on screen. Has anyone managed to have both thing at once?

@binhthanhng
Copy link

Hello again guys. It is indeed working. But not perfect. It doesn't crash but it is impossible to have music streamed from neither YT music, nor Spotify when Waze is on screen and in particular when having to redraw something on screen. Has anyone managed to have both thing at once?

I think you need to combine it with your current AIO package. Just copy the config folder i think

@alexpennos
Copy link

Hello again guys. It is indeed working. But not perfect. It doesn't crash but it is impossible to have music streamed from neither YT music, nor Spotify when Waze is on screen and in particular when having to redraw something on screen. Has anyone managed to have both thing at once?

I think you need to combine it with your current AIO package. Just copy the config folder i think

Yap. That is exactly what I did.

@RobsonMi
Copy link

Hello again guys. It is indeed working. But not perfect. It doesn't crash but it is impossible to have music streamed from neither YT music, nor Spotify when Waze is on screen and in particular when having to redraw something on screen. Has anyone managed to have both thing at once?

Hi. I was never able to use spotify and waze. It would stutter the music every time waze is doing animation, view change or calculation. I am stuck with gmaps and I believe the issue is actually waze related.

@Soukyuu
Copy link

Soukyuu commented Feb 26, 2020

About the only problem I had so far with the new build was one hard freeze while navigating. Couldn't even soft-restart the CMU.

I've been using Waze with Spotify for ages now. In a busy city Waze tends to make Spotify stutter, but only when not actively navogating, so it's probably a "too much on the screen" issue. Other than that, it works quite well, though Waze's routes tend to take a lot of unnecessary detours, but that's another story...

@Robik6
Copy link

Robik6 commented Feb 27, 2020

Hello. I did everything according to the instructions and it is almost OK. However, there is almost no voice guidance in navigating Google Maps. Do you have it too? What could be the reason ?

@Trevelopment
Copy link
Collaborator

@Robik6 what is your FW version?

@Robik6
Copy link

Robik6 commented Feb 27, 2020

I don't have my car with me now. I will give it to you when I check it. From what I remember it somehow 56 ....... 112

@Trevelopment
Copy link
Collaborator

Wait, you said "almost no voice guidance" does that mean you get some voice guidance? Sounds like a settings issue make sure all your settings are correct because it works just fine.

@Robik6
Copy link

Robik6 commented Feb 27, 2020

Yes, sometimes they are, and in most cases they are not there. I will check these settings and let you know, but it will be around the evening or tomorrow. Thanks.

@ronroze
Copy link

ronroze commented Feb 27, 2020

I too have a similar issue with voice navigation - it doesn't work, until you play some kind of audio directly from the CMU, using one of the AA-enabled applications (for example, a single second from a song via VLC or Telegram). Then, the audio channel is completely dominated by AA and there is no radio anymore. If I play radio using a radio app on my phone, it is interleaving with the voice navigation, but stutters.
The old v1.12 beta worked perfectly in that sense, up until the moment it started to crash.

@Trevelopment
Copy link
Collaborator

OK that makes sense it is an audio focus issue

@ixnewton
Copy link
Author

On the basis that some users have issues with audio interleaving/stuttering I think this thread should remain open? Maybe some further though needs to go into the logic around interleaving as in the hu_aap.cpp. Maybe also look at Gst streaming setup in outputs.cpp (L483) which may give greater tolerance of stream switching without dropping blocks/frames?

@ixnewton ixnewton reopened this Feb 27, 2020
@kennethgp
Copy link

Could stuttering be related to HUD navigation? I have CMU 56.00.100A and latest headunit AndroidAuto_v1.05-52-g54b38d6 (the one someone compiled in this thread) and HUD navigation continues to fail; it only shows the intital arrow for the first turn and it gets stuck, will not go away until you exit AA and switch CMU Navigation enabled setting on and off again. I leave this setting off all the times but it does not prevents the arrow to appear. This also happened in headunit AA-v1.12 and it is very annoying. I read somewhere CMU 59.x was needed to HUD to work, is this true? If so, for all of us that can't upgrade it would be nice HUD navigation is either fixed or a setting to shut it off is available. I'd prefer to have that HUD off/on setting because I think it also contributes to Spotify stutter when maps auto-zoom or re-positions on a turn. I see stutter is almost all fixed by that latest 'user-compiled' version and turning off Waze auto-zoom, but still it happens on hard turns, for example in roundabouts, so I think maybe the HUD functionality is related.

@alexpennos
Copy link

Hello all.
I had never had HUD directions with GMaps navigations and from what I read it seems that I was lucky! :D (My CMU version is EU 56.xxxx)
I saw an update being installed for Android System Webview AND Android Auto this morning. I haven't tested them yet, so let's see what these updates will bring.

@Robik6
Copy link

Robik6 commented Feb 28, 2020

To Trevelopment

I checked fw 56.00.513 Today I went a bit and it turns out that everything works great, except for the voice guidance of google maps navigation, but in conjunction with the car radio. With internet radio installed on the smartphone and the spotify application is great

@aa755
Copy link

aa755 commented Mar 2, 2020

Like @Soukyuu, I have gotten some freezes. Once it led me to miss a highway exit thinking it is still 1 mile away. Twice, my touchscreen and car infotainment buttons stopped accepting inputs but google maps continued to work properly (not frozen). I installed AIO 2.8.4 with config/androidauto patched with the above zip file.

@ixnewton
Copy link
Author

ixnewton commented Mar 2, 2020

Play voice over Bluetooth seems to be a new feature which I don't remember seeing before? It can be accessed in AA for mobiles version with no destination it is set in settings on the 3 dot menu. Allowing voice guidance over Bluetooth makes audio interruptions significantly worse. Other users may confirm this? The main issue is that voice notifications are not connected at startup until another audio app is launched.

The potential fix is to check if audio focus is set during the headunit launch. A look at the startup in main.cpp + callbacks.cpp may show if or how this should be working? Maybe AA should get focus at startup then other apps can take it over.
(Current AA version 5.1.500644)

@achuman
Copy link

achuman commented Mar 2, 2020

Play voice over Bluetooth seems to be a new feature which I don't remember seeing before? It can be accessed in AA for mobiles version with no destination it is set in settings on the 3 dot menu. Allowing voice guidance over Bluetooth makes audio interruptions significantly worse. Other users may confirm this? The main issue is that voice notifications are not connected at startup until another audio app is launched.

The potential fix is to check if audio focus is set during the headunit launch. A look at the startup in main.cpp + callbacks.cpp may show if or how this should be working? Maybe AA should get focus at startup then other apps can take it over.
(Current AA version 5.1.500644)

Voice over bluetooth has been in maps since I can remember. I found articles from as early as 2015 that mention it!

My car didn't play maps audio at all, until I turned off Play voice over bluetooth.

@mpalatsi
Copy link

mpalatsi commented Mar 3, 2020

So the current solution to solve AA from getting stuck in a disconnect loop is to downgrade AA t v.1.05? If so, I currently do not have a working touch screen, how can I incorporate the version downgrade into MZD AIO tweaks so that I can add "skip comfirmation" to the build?

@danirios93
Copy link

So the current solution to solve AA from getting stuck in a disconnect loop is to downgrade AA t v.1.05? If so, I currently do not have a working touch screen, how can I incorporate the version downgrade into MZD AIO tweaks so that I can add "skip comfirmation" to the build?

Its actually not a downgrade, its should be an upgrade, its the current branch of the github. I dont know why the file is named 1.05

You can just incorporate any addon/tweak of the MZD AIO, including Android Auto, then follow this step by step guide posted some comments above:
#173 (comment)

@Soukyuu
Copy link

Soukyuu commented Mar 4, 2020

About the only problem I had so far with the new build was one hard freeze while navigating. Couldn't even soft-restart the CMU.

Make that two freezes (on the same intersection). It's a 120° turn, so a lot of map spinning -> a lot of video data, so I think this might still be related to the interleaved data or the PR that attempted to fix it.

I've also had one instance of AA video going completely black, but AA remaining otherwise functional. Re-connecting the phone did not change anything. Would be cool, if we could restart AA only instead of having to reset the whole CMU (which btw resets all CMU settings, or at least the audio ones).

@binhthanhng
Copy link

About the only problem I had so far with the new build was one hard freeze while navigating. Couldn't even soft-restart the CMU.

Make that two freezes (on the same intersection). It's a 120° turn, so a lot of map spinning -> a lot of video data, so I think this might still be related to the interleaved data or the PR that attempted to fix it.

I've also had one instance of AA video going completely black, but AA remaining otherwise functional. Re-connecting the phone did not change anything. Would be cool, if we could restart AA only instead of having to reset the whole CMU (which btw resets all CMU settings, or at least the audio ones).

Same to me. it freeze my Spotify sound when i turn the car and the map spinning around.

@Nighthawk1738
Copy link

I hope I can share it here with you ;)
AndroidAuto_v1.05-52-g54b38d6.zip

So, this are the steps to solve the issue:

  1. Get the compressed update from RobsonMi's solution :
    https://github.com/gartnera/headunit/files/4235978/AndroidAuto_v1.05-52-g54b38d6.zip
  2. Unzip AndroidAuto_v1.05-52-g54b38d6.zip
  3. Copy contents of installer folder to USB stick
  4. Plug the usb stick into your car It should install automatically, (in my case took 3 or 4 minutes to show the prompt asking to start the installation) if it doesn't, restart navigation (nav button + mute for 10s) and follow the prompts.
  5. Give 10 minutes to the installation process (It doesnt inform about the progress nor success)
  6. After 10 minutes manually reboot CMI (nav btn + mute for 10s).

Those were the steps I followed and everything is working fine now.

Is this fix now incorportated into the main Mazda AIO app? As that is running Version 1.12 AA app or do Is till need to compile with the above fix?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests