[Noad Player][V0.9.4] The app crashed when I tried to turn on and off the equalizer from the "Equalizer" menu after activating equalizer from the app settings

in #utopian-io5 years ago

Project Information

Expected behavior

I expected that I could able to turn on/off the equalizer from the "Equalizer" menu after activating equalizer from settings.

Actual behavior

When I tried to turn on and off the equalizer from the "Equalizer" menu after activating equalizer from the app settings, then the app crashed.

How to reproduce

Here is every possible detail to reproduce the bug.

  1. Open the app.
  2. Go to "Settings" and enable the "Equalizer".
  3. Now click on "Equalizer" that based on the main menu.
  4. After that try to disable and enable it and then notice the bug.
  • App version: v0.9.4
  • Operating system: Android 6.0.1

Possible Fix

I think this crash occurred because of the equalizer option from settings. I believe removing this option from the app would be the easiest way to fix it.
It won't affect the user experience at all because we have another option to use this feature.

Recording Of The Bug

bug

LogCat

06-19 01:28:38.246 15730 15730 E AndroidRuntime: FATAL EXCEPTION: main

06-19 01:28:38.246 15730 15730 E AndroidRuntime: Process: com.droidheat.musicplayer, PID: 15730

06-19 01:28:38.246 15730 15730 E AndroidRuntime: java.lang.UnsupportedOperationException: AudioEffect: invalid parameter operation

06-19 01:28:38.246 15730 15730 E AndroidRuntime:    at android.media.audiofx.AudioEffect.checkStatus(AudioEffect.java:1327)

06-19 01:28:38.246 15730 15730 E AndroidRuntime:    at android.media.audiofx.Equalizer.setBandLevel(Equalizer.java:223)

06-19 01:28:38.246 15730 15730 E AndroidRuntime:    at com.droidheat.musicplayer.EqualizerActivity$1.onCheckedChanged(EqualizerActivity.java:79)

06-19 01:28:38.246 15730 15730 E AndroidRuntime:    at android.widget.CompoundButton.setChecked(CompoundButton.java:165)

06-19 01:28:38.246 15730 15730 E AndroidRuntime:    at android.support.v7.widget.SwitchCompat.setChecked(SwitchCompat.java:1060)

06-19 01:28:38.246 15730 15730 E AndroidRuntime:    at android.support.v7.widget.SwitchCompat.toggle(SwitchCompat.java:1055)

06-19 01:28:38.246 15730 15730 E AndroidRuntime:    at android.widget.CompoundButton.performClick(CompoundButton.java:123)

06-19 01:28:38.246 15730 15730 E AndroidRuntime:    at android.view.View$PerformClick.run(View.java:22589)

06-19 01:28:38.246 15730 15730 E AndroidRuntime:    at android.os.Handler.handleCallback(Handler.java:739)

06-19 01:28:38.246 15730 15730 E AndroidRuntime:    at android.os.Handler.dispatchMessage(Handler.java:95)

06-19 01:28:38.246 15730 15730 E AndroidRuntime:    at android.os.Looper.loop(Looper.java:148)

06-19 01:28:38.246 15730 15730 E AndroidRuntime:    at android.app.ActivityThread.main(ActivityThread.java:7325)

06-19 01:28:38.246 15730 15730 E AndroidRuntime:    at java.lang.reflect.Method.invoke(Native Method)

06-19 01:28:38.246 15730 15730 E AndroidRuntime:    at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1230)

06-19 01:28:38.246 15730 15730 E AndroidRuntime:    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1120)
Sort:  

Hi @sagorahmed, thanks for making this contribution

I can see that the contribution has been acknowledged by the PO. And I see he fixed it in this commit - https://github.com/gauravjot/android-noad-music-player/commit/576e4bc477a955dce8d4115cb40d877391f9e8d8. I love that you included a logcat but these days we expect a bit of analysis to complement the stack trace. Some explanations on what could have possibly gone wrong

I noticed you suggested a fix. Good, but removing the feature entirely will only solve the case for you. There are other users that would have found the feature useful

Still a good post. We look forward to 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!