[Qurany App][v2.5.1] The app crashed when tried to minimize and maximize the app while listening to Ayah.

in #utopian-io5 years ago

Project Information

Expected behavior

I expected that I could minimize and maximize the app again while listening to the Ayah.

Actual behavior

When I tried to minimize and maximize the app while listening to the Ayah, then the app crashed.

How to reproduce

Here is every possible detail to reproduce the bug.

  1. Open the app.
  2. Go to the "Listen" tab.
  3. Give the Ayah's number in the start from and end at the field.
  4. Then click on the "LISTEN" button.
  5. When the Ayah start to play, minimize and maximize the app and see a crash.
  • App version: 2.5.1
  • Operating system: Android 6.0.1

Recording Of The Bug

LogCat

07-02 01:30:09.218 27728 27728 E AndroidRuntime: FATAL EXCEPTION: main

07-02 01:30:09.218 27728 27728 E AndroidRuntime: Process: education.mahmoud.quranyapp, PID: 27728

07-02 01:30:09.218 27728 27728 E AndroidRuntime: java.lang.NullPointerException: Attempt to invoke virtual method 'void android.widget.Button.setEnabled(boolean)' on a null object reference

07-02 01:30:09.218 27728 27728 E AndroidRuntime:    at education.mahmoud.quranyapp.feature.listening_activity.ListenFragment$7.onCompletion(Unknown Source)

07-02 01:30:09.218 27728 27728 E AndroidRuntime:    at android.media.MediaPlayer$EventHandler.handleMessage(MediaPlayer.java:3717)

07-02 01:30:09.218 27728 27728 E AndroidRuntime:    at android.os.Handler.dispatchMessage(Handler.java:102)

07-02 01:30:09.218 27728 27728 E AndroidRuntime:    at android.os.Looper.loop(Looper.java:148)

07-02 01:30:09.218 27728 27728 E AndroidRuntime:    at android.app.ActivityThread.main(ActivityThread.java:7325)

07-02 01:30:09.218 27728 27728 E AndroidRuntime:    at java.lang.reflect.Method.invoke(Native Method)

07-02 01:30:09.218 27728 27728 E AndroidRuntime:    at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1230)

07-02 01:30:09.218 27728 27728 E AndroidRuntime:    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1120)
Sort:  

Hi @sagorahmed, thanks for this contribution

This is strange. I see the PO has acknowledged the issue with a promise to come up with a fix. The logcat you provided was indeed helpful but a quick analysis of the error returned from the log could have have also shed more light on the issue

Like what really causes the sudden crash when the application is minimized to the background? Your report ought to answer this very question. Still a very good find

Thanks again for the contribution. I look forward to reviewing more of your reports

Your contribution has been evaluated according to Utopian policies and guidelines, as well as a predefined set of questions pertaining to the category.

To view those questions and the relevant answers related to your post, click here.


Need help? Chat with us on Discord.

[utopian-moderator]

Thank you for your review, @fego! Keep up the good work!

Hi @sagorahmed!

Your post was upvoted by @steem-ua, new Steem dApp, using UserAuthority for algorithmic post curation!
Your post is eligible for our upvote, thanks to our collaboration with @utopian-io!
Feel free to join our @steem-ua Discord server

Hey, @sagorahmed!

Thanks for contributing on Utopian.
We’re already looking forward to your next contribution!

Get higher incentives and support Utopian.io!
Simply set @utopian.pay as a 5% (or higher) payout beneficiary on your contribution post (via SteemPlus or Steeditor).

Want to chat? Join us on Discord https://discord.gg/h52nFrV.

Vote for Utopian Witness!