The app crashes when the "Search" feature changes rotation from portrait mode to landscape mode

Project Information



Expected behavior

Supposedly, when the user rotates rotation from portrait mode to landscape mode the "Search" feature does not crashes.

Actual behavior

When accessing the "Search" feature in portrait mode, the feature works normally. However, when I rotate the rotation to landscape mode the application suddenly crashes and exits without a command.

How to reproduce

  • Install and open the app
  • Run the app and click on the "Search" icon.
  • Next step, rotate to landscape mode, then the app will crash.


  • Device: Xiaomi Redmi 4X
  • Operating system: Marshmallow, 6.0.1 mmb29m (CPU: Octa-core Max 1.9 GHz, RAM: 2 GB)
  • Application Version: 1.4

Recording Of The Bug

Proof of Work Done

https://github.com/apadet90

Logcat

05-28 03:06:41.018 6626 6626 E AndroidRuntime: FATAL EXCEPTION: main
05-28 03:06:41.018 6626 6626 E AndroidRuntime: Process: com.smartjinyu.mybookshelf, PID: 6626
05-28 03:06:41.018 6626 6626 E AndroidRuntime: java.lang.RuntimeException: Unable to resume activity {com.smartjinyu.mybookshelf/com.smartjinyu.mybookshelf.MainActivity}: java.lang.IllegalStateException: Cannot start this animator on a detached view!
05-28 03:06:41.018 6626 6626 E AndroidRuntime: at android.app.ActivityThread.performResumeActivity(ActivityThread.java:3136)
05-28 03:06:41.018 6626 6626 E AndroidRuntime: at android.app.ActivityThread.handleResumeActivity(ActivityThread.java:3167)
05-28 03:06:41.018 6626 6626 E AndroidRuntime: at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2514)
05-28 03:06:41.018 6626 6626 E AndroidRuntime: at android.app.ActivityThread.handleRelaunchActivity(ActivityThread.java:4120)
05-28 03:06:41.018 6626 6626 E AndroidRuntime: at android.app.ActivityThread.access$1100(ActivityThread.java:153)
05-28 03:06:41.018 6626 6626 E AndroidRuntime: at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1381)
05-28 03:06:41.018 6626 6626 E AndroidRuntime: at android.os.Handler.dispatchMessage(Handler.java:102)
05-28 03:06:41.018 6626 6626 E AndroidRuntime: at android.os.Looper.loop(Looper.java:154)
05-28 03:06:41.018 6626 6626 E AndroidRuntime: at android.app.ActivityThread.main(ActivityThread.java:5527)
05-28 03:06:41.018 6626 6626 E AndroidRuntime: at java.lang.reflect.Method.invoke(Native Method)
05-28 03:06:41.018 6626 6626 E AndroidRuntime: at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:739)
05-28 03:06:41.018 6626 6626 E AndroidRuntime: at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:629)
05-28 03:06:41.018 6626 6626 E AndroidRuntime: Caused by: java.lang.IllegalStateException: Cannot start this animator on a detached view!
05-28 03:06:41.018 6626 6626 E AndroidRuntime: at android.view.RenderNode.addAnimator(RenderNode.java:812)
05-28 03:06:41.018 6626 6626 E AndroidRuntime: at android.view.RenderNodeAnimator.setTarget(RenderNodeAnimator.java:300)
05-28 03:06:41.018 6626 6626 E AndroidRuntime: at android.view.RenderNodeAnimator.setTarget(RenderNodeAnimator.java:282)
05-28 03:06:41.018 6626 6626 E AndroidRuntime: at android.animation.RevealAnimator.(RevealAnimator.java:37)
05-28 03:06:41.018 6626 6626 E AndroidRuntime: at android.view.ViewAnimationUtils.createCircularReveal(ViewAnimationUtils.java:55)
05-28 03:06:41.018 6626 6626 E AndroidRuntime: at com.lapism.searchview.SearchAnimator.revealClose(SearchAnimator.java:107)
05-28 03:06:41.018 6626 6626 E AndroidRuntime: at com.lapism.searchview.SearchView.close(SearchView.java:779)
05-28 03:06:41.018 6626 6626 E AndroidRuntime: at com.smartjinyu.mybookshelf.MainActivity$16.onItemClick(MainActivity.java:485)
05-28 03:06:41.018 6626 6626 E AndroidRuntime: at com.mikepenz.materialdrawer.Drawer.notifySelect(Drawer.java:619)
05-28 03:06:41.018 6626 6626 E AndroidRuntime: at com.mikepenz.materialdrawer.Drawer.setSelection(Drawer.java:542)
05-28 03:06:41.018 6626 6626 E AndroidRuntime: at com.mikepenz.materialdrawer.Drawer.setSelection(Drawer.java:522)
05-28 03:06:41.018 6626 6626 E AndroidRuntime: at com.smartjinyu.mybookshelf.MainActivity.setDrawer(MainActivity.java:581)
05-28 03:06:41.018 6626 6626 E AndroidRuntime: at com.smartjinyu.mybookshelf.MainActivity.onResume(MainActivity.java:955)
05-28 03:06:41.018 6626 6626 E AndroidRuntime: at android.app.Instrumentation.callActivityOnResume(Instrumentation.java:1259)
05-28 03:06:41.018 6626 6626 E AndroidRuntime: at android.app.Activity.performResume(Activity.java:6379)
05-28 03:06:41.018 6626 6626 E AndroidRuntime: at android.app.ActivityThread.performResumeActivity(ActivityThread.java:3125)
05-28 03:06:41.018 6626 6626 E AndroidRuntime: ... 11 more
05-28 03:06:41.023 6626 6626 E MQSEventManagerDelegate: failed to get MQSService.

H2
H3
H4
3 columns
2 columns
1 column
Join the conversation now
Logo
Center