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

IllegalStateException on some devices #26

Open
cproof opened this issue Sep 28, 2021 · 1 comment
Open

IllegalStateException on some devices #26

cproof opened this issue Sep 28, 2021 · 1 comment

Comments

@cproof
Copy link

cproof commented Sep 28, 2021

Hi,

we're using this library for signal preprocessing in our app (open-rmbt-android) and are really satisfied with it. Thank you for providing and maintaining it!

What we're however seeing is quite some crashes with Samsung devices (A and S-Series) with this stacktrace:

java.lang.IllegalStateException: 
  at android.os.Parcel.createExceptionOrNull (Parcel.java:2393)
  at android.os.Parcel.createException (Parcel.java:2369)
  at android.os.Parcel.readException (Parcel.java:2352)
  at android.os.Parcel.readException (Parcel.java:2294)
  at com.android.internal.telephony.ITelephonyRegistry$Stub$Proxy.listenForSubscriber (ITelephonyRegistry.java:1105)
  at android.telephony.TelephonyRegistryManager.listenForSubscriber (TelephonyRegistryManager.java:231)
  at android.telephony.TelephonyManager.listen (TelephonyManager.java:6706)
  at cz.mroczis.netmonster.core.feature.config.TelephonyManagerListenersKt$requestSingleUpdate$1.run (TelephonyManagerListeners.kt:60)
  at android.os.Handler.handleCallback (Handler.java:938)
  at android.os.Handler.dispatchMessage (Handler.java:99)
  at android.os.Looper.loop (Looper.java:246)
  at android.os.HandlerThread.run (HandlerThread.java:67)
Caused by: android.os.RemoteException: 
  at com.android.server.TelephonyRegistry.add (TelephonyRegistry.java:1172)
  at com.android.server.TelephonyRegistry.listen (TelephonyRegistry.java:847)
  at com.android.server.TelephonyRegistry.listenForSubscriber (TelephonyRegistry.java:814)
  at com.android.internal.telephony.ITelephonyRegistry$Stub.onTransact (ITelephonyRegistry.java:453)
  at android.os.Binder.execTransactInternal (Binder.java:1195)

Do you have an idea on what could be causing these crashes?

@handymenny
Copy link
Contributor

handymenny commented May 21, 2022

I'm seeing the same issue, although with a different root cause.
Some users with android 12 custom roms get these crashes:

java.lang.IllegalStateException: 
  at android.telephony.TelephonyManager.requestCellInfoUpdate (TelephonyManager.java:6327)
  at cz.mroczis.netmonster.core.telephony.TelephonyManagerCompat29.getAllCellInfo (TelephonyManagerCompat29.java:25)
  at cz.mroczis.netmonster.core.telephony.TelephonyManagerCompat14.getAllCellInfo (TelephonyManagerCompat14.java)
  at cz.mroczis.netmonster.core.telephony.TelephonyManagerCompat14.getAllCellInfo (TelephonyManagerCompat14.java)
  at cz.mroczis.netmonster.core.telephony.ITelephonyManagerCompat$DefaultImpls.getAllCellInfo$default (ITelephonyManagerCompat.java)
  at cz.mroczis.netmonster.core.NetMonster.getCells (NetMonster.java)

I believe the "culprits" are the following commits:
https://android.googlesource.com/platform/frameworks/base/+/8c23380d2f3707346a853bbbeeb639355b7717fa
https://android.googlesource.com/platform/frameworks/base/+/31c7d6162472077c20760025128271b8aa9f5a21

@mroczis what about catching these exceptions or letting the clients (of this library) know that they can be thrown in some exceptional cases?

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

2 participants