hypeapps / episodie

Episodie is a TV show time tracker app with unusual design written in kotlin and clean architecture approach. Get to know how much time you spent watching tv shows.
GNU General Public License v3.0
127 stars 20 forks source link

[1.0.1] - Fatal Exception when marking seasons as watched/unwatched #28

Closed tobias-g1 closed 6 years ago

tobias-g1 commented 6 years ago

Expected behaviour

I should be able to mark shows as watched and unwatched without interruption. When I mark a show as watched it should add to my watched hours, when I mark a show as unwatched it should be removed from my watched shows.

Actual behaviour

Occasionally when marking a shows as watched or unwatched the application will crash.

How to reproduce

  1. From either a fresh install or existing install select enter the application and select a TV show. For the purpose of clarity, select "Supernatural"

  2. Select the episodes tab.
  3. Quickly switch between marking the two different seasons as watched. For example, click season 1 then 2 then 1 again repeatedly. 

  4. Repeat step until a crash occurs.

Please note that the above steps were not the first way I replicated this issue, this issue first occurred during normal application use, but the above is the only way I can seem to replicate over and over again. Please note I checked the error on the standard behaviour crash and the crash mentioned in my steps and it’s the same exception. I realise that the steps provided may be a low priority crash so I would like to make you’re aware it does occur in normal use. The behaviour I carried out first was simply adding shows I've watched to my watched list and randomly it would crash, this will cause it to crash eventually although nothing I can state with replicable steps. I believe fixing the error mentioned below caused by the steps mention within the steps to reproduce will resolve the issue in standard behaviour too.



05-27 01:50:25.089 18389-18389/pl.hypeapp.episodie E/AndroidRuntime: FATAL EXCEPTION: main
    Process: pl.hypeapp.episodie, PID: 18389
    java.lang.NullPointerException: Attempt to invoke virtual method 'float android.text.Layout.getLineLeft(int)' on a null object reference
        at com.hanks.htextview.evaporate.EvaporateText.animateText(EvaporateText.java:52)
        at com.hanks.htextview.evaporate.EvaporateTextView.animateText(EvaporateTextView.java:46)
        at pl.hypeapp.episodie.ui.widget.RuntimeAlerterView$startSlideInDownAnimation$2.call(RuntimeAlerterView.kt:56)
        at com.daimajia.androidanimations.library.YoYo$AnimationComposer$2.onAnimationEnd(YoYo.java:181)
        at android.animation.Animator$AnimatorListener.onAnimationEnd(Animator.java:552)
        at android.animation.AnimatorSet.endAnimation(AnimatorSet.java:1294)
        at android.animation.AnimatorSet.doAnimationFrame(AnimatorSet.java:1079)
        at android.animation.AnimationHandler.doAnimationFrame(AnimationHandler.java:146)
        at android.animation.AnimationHandler.-wrap2(Unknown Source:0)
        at android.animation.AnimationHandler$1.doFrame(AnimationHandler.java:54)
        at android.view.Choreographer$CallbackRecord.run(Choreographer.java:909)
        at android.view.Choreographer.doCallbacks(Choreographer.java:723)
        at android.view.Choreographer.doFrame(Choreographer.java:655)
        at android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:897)
        at android.os.Handler.handleCallback(Handler.java:790)
        at android.os.Handler.dispatchMessage(Handler.java:99)
        at android.os.Looper.loop(Looper.java:164)
        at android.app.ActivityThread.main(ActivityThread.java:6494)
        at java.lang.reflect.Method.invoke(Native Method)
        at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:438)
        at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:807)

Environment


Application Version: 1.0.1



Tested on multiple different Android versions both using a physical device and emulators.

Device Android Version Emulator/Physical Reproducible?
Motorola 3 (3rd Generation) 6.0.1 Physical Yes
Pixel 2 7.1 Emulated Yes
Pixel 2 8.0 Emulated Yes 



Recording of the issue



The following video helps to show this issue further:

https://www.youtube.com/embed/nUQYE45Xuzw?ecver=2

hypeapps commented 6 years ago

32