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

Pixel 4a/Android 13: OutOfMemoryError #2849

Closed
chairstacker opened this issue Sep 4, 2022 · 13 comments
Closed

Pixel 4a/Android 13: OutOfMemoryError #2849

chairstacker opened this issue Sep 4, 2022 · 13 comments
Labels
bug Something isn't working

Comments

@chairstacker
Copy link

Home Assistant Android version:
2022.8.0

Android version:
13

Phone model:
Pixel 4a

Home Assistant version:
Home Assistant 2022.8.7

Last working Home Assistant release (if known):
N/A

Description of problem:
HA App reezes and needs to be closed/re-started.

Traceback (if applicable, to get the logs you may refer to: https://companion.home-assistant.io/docs/troubleshooting/faqs/#android-crash-logs):

2022-09-03 08:36:45.082: java.lang.OutOfMemoryError: Failed to allocate a 136 byte allocation with 1408816 free bytes and 1375KB until OOM, target footprint 268435456, growth limit 268435456; giving up on allocation because <1% of heap free after GC.
at android.os.Parcel.nativeReadString8(Native Method)
at android.os.Parcel.readString8NoHelper(Parcel.java:3092)
at android.os.Parcel$ReadWriteHelper.readString8(Parcel.java:493)
at android.os.Parcel.readString8(Parcel.java:3071)
at android.os.Parcel.createString8Array(Parcel.java:1761)
at android.content.pm.ApplicationInfo.(ApplicationInfo.java:2085)
at android.content.pm.ApplicationInfo.(Unknown Source:0)
at android.content.pm.ApplicationInfo$1.lambda$createFromParcel$0(ApplicationInfo.java:2053)
at android.content.pm.ApplicationInfo$1$$ExternalSyntheticLambda0.readRawParceled(Unknown Source:0)
at android.os.Parcel.readSquashed(Parcel.java:2708)
at android.content.pm.ApplicationInfo$1.createFromParcel(ApplicationInfo.java:2053)
at android.content.pm.ApplicationInfo$1.createFromParcel(ApplicationInfo.java:2050)
at android.content.pm.ComponentInfo.(ComponentInfo.java:247)
at android.content.pm.ActivityInfo.(ActivityInfo.java:1770)
at android.content.pm.ActivityInfo.(Unknown Source:0)
at android.content.pm.ActivityInfo$1.createFromParcel(ActivityInfo.java:1762)
at android.content.pm.ActivityInfo$1.createFromParcel(ActivityInfo.java:1760)
at android.os.Parcel.readTypedObject(Parcel.java:3947)
at android.app.IApplicationThread$Stub.onTransact(IApplicationThread.java:492)
at android.os.Binder.execTransactInternal(Binder.java:1285)
at android.os.Binder.execTransact(Binder.java:1244)

Screenshot of problem:
N/A

Additional information:
As discussed in the HA Forum:
https://community.home-assistant.io/t/android-13-issues-app-or-device/456708/13

@chairstacker chairstacker added the bug Something isn't working label Sep 4, 2022
@dshokouhi
Copy link
Member

Hmm I am not really sure what could be the cause of this. I suspect maybe bad data from the device upgrade to android 13 in the app? Not sure what to make of it but I would try to start fresh so you are not force stopping the app as much.

I know starting fresh means you won't be able to test a fix (if we find one) but I also wouldn't want the app to remain in that bad state because background services will also stop working as a result.

@chairstacker
Copy link
Author

Will Step 2 "Clear Storage or App data in Android app" affect my widgets?

@dshokouhi
Copy link
Member

It will reset all app data including widgets and sensors.

@chairstacker
Copy link
Author

Is there any way to back up or copy all widget configurations?

@dshokouhi
Copy link
Member

no there is no way to back up the current widgets, we did just get a feature request for that in #2844

@chairstacker
Copy link
Author

Quik Update:
I went through the 'start fresh' process as suggested and had the app up and running again - everything seemed to work fine.
Added a widget to the home screen and was impressed how quickly the switch reacted to me pushing the 'Service Button' widget.
Added a 3 more widgets to start replicating my original setup when I noticed that app was starting wo have issues again - tried to capture info from the 'Recent Crash' tab but it wasn't available under Settings > Companion App > Show and Share Logs.

Deleted the widgets again and the application started to run stable again.
Hate to have to give up on the widgets but will do that for now.

Not sure, though, if it's 'just the widgets' or the combination of me using the Nova Launcher V7.0.57 and widgets.

@dshokouhi
Copy link
Member

Added a 3 more widgets to start replicating my original setup when I noticed that app was starting wo have issues again - tried to capture info from the 'Recent Crash' tab but it wasn't available under Settings > Companion App > Show and Share Logs.

What do you mean the app started to have issues? It started to crash? The Recent Crash tab doesn't always work but it makes a best effort. Which widgets are you adding? There shouldn't be any errors when adding multiple widgets.

@chairstacker
Copy link
Author

Correct, the app started to crash just like before - and on Android 12 as well, btw. This is not just an Android 13 thing for me.
I added two Service Button widgets and two template widgets in total in order to start recreating the 'dashboard' I showed in the Home Assistant Forum.

@dshokouhi
Copy link
Member

Weird I just tried adding 2 button widgets and 2 template widgets and I don't see any crashing like that. I also don't use a custom launcher.

We did have some improvements to the template widgets in a recent beta version of the app, would you be willing to try the beta?

@chairstacker
Copy link
Author

Sure - it seems like the crashing stops as soon as I remove the widgets again.

I had one issue before, though:
When I tried to find out what was going on, I downloaded the 2022.6.0 and even the 2022.2.0 versions to replace the 2022.8.0 one. But I couldn't install them on my Pixel or my tablet - the OS claimed the files were corrupted, which I'm pretty sure they were not.
So, if I need to downgrade from the beta to 2022.8.0 for any reason it might cause some issue.

Which beta do you recommend I try?

@dshokouhi
Copy link
Member

When you do a downgrade you may need to uninstall before reinstalling. Did you make sure to grab the APKs off the github release tab?

I would always recommend the latest beta :)

@chairstacker
Copy link
Author

Installed the beta earlier today and it seemed to be working fine.
Added 4 Service Button Widgets and 4 Template Widgets, so far, all good 🤞

@jpelgrom
Copy link
Member

Closing this due to no more reports and a lot of changes. If anyone is still experiencing this please create a new issue.

@jpelgrom jpelgrom closed this as not planned Won't fix, can't repro, duplicate, stale Jul 25, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants