Skip to content
This repository was archived by the owner on Feb 11, 2022. It is now read-only.
This repository was archived by the owner on Feb 11, 2022. It is now read-only.

java.lang.RuntimeException: Unable to pause activity #157

@DasserBasyouni

Description

@DasserBasyouni

Problem

I am following the guide of the README.md

when I traced the problem I found it occurs in .withConnectableCallbacks() .clear() in clearRegistrations() in Registrar class is run

java.lang.RuntimeException: Unable to pause activity......... Caused by: java.lang.NullPointerException at com.novoda.merlin.registerable.Registrar.clearRegistrations(Registrar.java:65) at com.novoda.merlin.Merlin.unbind(Merlin.java:30) at com.example.android.onegreatpost.MainActivity.onPause(MainActivity.java:155) at android.app.Activity.performPause(Activity.java:5426) at android.app.Instrumentation.callActivityOnPause(Instrumentation.java:1244) at android.app.ActivityThread.performPauseActivity(ActivityThread.java:3304) at android.app.ActivityThread.performPauseActivity(ActivityThread.java:3273)  at android.app.ActivityThread.handlePauseActivity(ActivityThread.java:3251)  at android.app.ActivityThread.access$1300(ActivityThread.java:143)  at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1279)  at android.os.Handler.dispatchMessage(Handler.java:102)  at android.os.Looper.loop(Looper.java:136)  at android.app.ActivityThread.main(ActivityThread.java:5356)  at java.lang.reflect.Method.invokeNative(Native Method)  at java.lang.reflect.Method.invoke(Method.java:515)  at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:864)  at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:680)  at de.robv.android.xposed.XposedBridge.main(XposedBridge.java:133)  at dalvik.system.NativeStart.main(Native Method) 

Potential Solution

I might be make use .withBindableCallbacks() & .withDisconnectableCallbacks() for now
or fix it from the clearRegistrations() and check null values becfore clearing

Thanks in advance

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions