bluelinelabs / bluelinelabs/Conductor
Fatal Exception: java.lang.NullPointerException
- Dominant language
- Java
- Stars
- 3.9k
- Forks
- 338
- PR merge metrics
- No merged PRs in 30d
Description
**Conductor version:**
implementation 'com.bluelinelabs:conductor:3.0.0-rc6'
**API level:**
Android 5, 6, 7, 8, 9, 10
**Error log:**
```
Fatal Exception: java.lang.NullPointerException: Attempt to invoke virtual method 'void android.animation.Animator.addListener(android.animation.Animator$AnimatorListener)' on a null object reference
at com.bluelinelabs.conductor.changehandler.AnimatorChangeHandler.performAnimation(AnimatorChangeHandler.java:182)
at com.bluelinelabs.conductor.changehandler.AnimatorChangeHandler.performChange(AnimatorChangeHandler.java:139)
at com.bluelinelabs.conductor.ControllerChangeHandler.executeChange(ControllerChangeHandler.java:209)
at com.bluelinelabs.conductor.ControllerChangeHandler.executeChange(ControllerChangeHandler.java:159)
at com.bluelinelabs.conductor.Router.performControllerChange(Router.java:834)
at com.bluelinelabs.conductor.Router.performControllerChange(Router.java:799)
at com.bluelinelabs.conductor.Router.performControllerChange(Router.java:777)
at com.bluelinelabs.conductor.Router.popController(Router.java:137)
at com.bluelinelabs.conductor.Router.popCurrentController(Router.java:119)
at com.bluelinelabs.conductor.Router.handleBack(Router.java:97)
at com.example.MainActivity.onBackPressed(MainActivity.java:269)
at android.app.Activity.onKeyUp(Activity.java:2864)
at android.view.KeyEvent.dispatch(KeyEvent.java:3358)
at androidx.core.view.KeyEventDispatcher.activitySuperDispatchKeyEventPre28(KeyEventDispatcher.java:137)
at androidx.core.view.KeyEventDispatcher.dispatchKeyEvent(KeyEventDispatcher.java:87)
at androidx.core.app.ComponentActivity.dispatchKeyEvent(ComponentActivity.java:140)
at androidx.appcompat.app.AppCompatActivity.dispatchKeyEvent(AppCompatActivity.java:569)
at androidx.appcompat.view.WindowCallbackWrapper.dispatchKeyEvent(WindowCallbackWrapper.java:59)
at androidx.appcompat.app.AppCompatDelegateImpl$AppCompatWindowCallback.dispatchKeyEvent(AppCompatDelegateImpl.java:3054)
at androidx.appcompat.view.WindowCallbackWrapper.dispatchKeyEvent(WindowCallbackWrapper.java:59)
at com.android.internal.policy.DecorView.dispatchKeyEvent(DecorView.java:428)
at android.view.ViewRootImpl$ViewPostImeInputStage.processKeyEvent(ViewRootImpl.java:5007)
at android.view.ViewRootImpl$ViewPostImeInputStage.onProcess(ViewRootImpl.java:4969)
at android.view.ViewRootImpl$InputStage.deliver(ViewRootImpl.java:4504)
at android.view.ViewRootImpl$InputStage.onDeliverToNext(ViewRootImpl.java:4557)
at android.view.ViewRootImpl$InputStage.forward(ViewRootImpl.java:4523)
at android.view.ViewRootImpl$AsyncInputStage.forward(ViewRootImpl.java:4656)
at android.view.ViewRootImpl$InputStage.apply(ViewRootImpl.java:4531)
at android.view.ViewRootImpl$AsyncInputStage.apply(ViewRootImpl.java:4713)
at android.view.ViewRootImpl$InputStage.deliver(ViewRootImpl.java:4504)
at android.view.ViewRootImpl$InputStage.onDeliverToNext(ViewRootImpl.java:4557)
at android.view.ViewRootImpl$InputStage.forward(ViewRootImpl.java:4523)
at android.view.ViewRootImpl$InputStage.apply(ViewRootImpl.java:4531)
at android.view.ViewRootImpl$InputStage.deliver(ViewRootImpl.java:4504)
at android.view.ViewRootImpl$InputStage.onDeliverToNext(ViewRootImpl.java:4557)
at android.view.ViewRootImpl$InputStage.forward(ViewRootImpl.java:4523)
at android.view.ViewRootImpl$AsyncInputStage.forward(ViewRootImpl.java:4689)
at android.view.ViewRootImpl$ImeInputStage.onFinishedInputEvent(ViewRootImpl.java:4858)
at android.view.inputmethod.InputMethodManager$PendingEvent.run(InputMethodManager.java:3036)
at android.view.inputmethod.InputMethodManager.invokeFinishedInputEventCallback(InputMethodManager.java:2574)
at android.view.inputmethod.InputMethodManager.finishedInputEvent(InputMethodManager.java:2565)
at android.view.inputmethod.InputMethodManager$ImeInputEventSender.onInputEventFinished(InputMethodManager.java:3013)
at android.view.InputEventSender.dispatchInputEventFinished(InputEventSender.java:141)
at android.os.MessageQueue.nativePollOnce(MessageQueue.java)
at android.os.MessageQueue.next(MessageQueue.java:323)
at android.os.Looper.loop(Looper.java:136)
at android.app.ActivityThread.main(ActivityThread.java:6682)
at java.lang.reflect.Method.invoke(Method.java)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1520)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1410)
```
Contributor guide
Research direction
The stack trace points to AnimatorChangeHandler.performAnimation at line 182, reached through ControllerChangeHandler and Router.popController. Start by inspecting how the animator is created before addListener and reproduce the back-navigation path on the listed Android API levels. Done means the reported null animator crash is prevented and the affected behavior is covered by a regression test.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- android, java
- Domain
- mobile
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100