realm / realm-java

Realm is a mobile database: a replacement for SQLite & ORMs
http://realm.io
Apache License 2.0
11.45k stars 1.75k forks source link

Calling isInstantApp will automatically restart the system #7774

Closed caobug closed 1 year ago

caobug commented 1 year ago

How frequently does the bug occur?

Always

Description

On some Android TV and tablet devices, the Android system will automatically restart the system when the APP is started, and only a small amount of records can be collected due to the rapid crash.

Once this issue is encountered, it will crash forever on these devices.

Stacktrace & log output

android.app.ActivityThread.handleBindApplication(ActivityThread.java:5806)
android.os.DeadSystemException:
android.app.ApplicationPackageManager.isInstantApp(ApplicationPackageManager.java:820)
android.app.ApplicationPackageManager.isInstantApp(ApplicationPackageManager.java:812)
io.realm.Realm$$InternalSyntheticApiModelOutline$1$f78aa55db0d049271f2c6f4020a093f255fa00f17bdbb9bf0051600caa633485$0.boolean m(android.content.pm.PackageManager)(Realm.java:0)
io.realm.Realm.boolean isInstantApp(android.content.Context)(Realm.java:318)
io.realm.Realm.void initializeRealm(android.content.Context,java.lang.String)(Realm.java:344)
io.realm.Realm.void init(android.content.Context)(Realm.java:263)

Realm.init(this)

Can you reproduce the bug?

No

Reproduction Steps

Call Realm.init(this) in Application-onCreate.

I don't have the relevant equipment, so I can't reproduce it.

Version

10.13.0

What Atlas App Services are you using?

Local Database only

Are you using encryption?

No

Platform OS and version(s)

IST/MS848-Android 8.0

Build environment

Android Studio version: ... 2022.1.1 Android Build Tools version: ... 34.0 Gradle version: ... 8.0