gauravjot / android-noad-music-player

Noad Music Player for android. Available on Play Store.
https://play.google.com/store/apps/details?id=com.droidheat.musicplayer
GNU General Public License v3.0
67 stars 11 forks source link

The app crashed when I tried to turn on and off the equalizer from the "Equalizer" menu after activating equalizer from the app settings #9

Closed sagorahmed closed 5 years ago

sagorahmed commented 5 years ago

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.

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)
gauravjot commented 5 years ago

Thank you for providing the crash log. I will patch it in next update.

gauravjot commented 5 years ago

The issue is fixed in the next update which will be available in a few hours.

sagorahmed commented 5 years ago

Thanks for solving this issue!