ZTFtrue / MonsterMusic

A music player on android platform, developed by Andoroid composer
Apache License 2.0
222 stars 21 forks source link

instant crash when pitch changed #26

Open Unacceptium opened 2 months ago

Unacceptium commented 2 months ago

the app (0.1.15(f-droid)) instantly crashes when pitch gets changed.

i have no idea if theres logs anywhere, if i find one i upload there.

my device: Honor RKY-LX1 Android12(Magic UI6)

please note that i dont know if the app is even maintained, updated or will be in future.

if testing possibilities limited, i can test but i have no PC.

Edits: 1-same when pitch gets changed 2-echo dont work too, but notification does respond without playing at all

ZTFtrue commented 2 months ago

I guess your audio format encoding is not PCM 16-bit.

This is why the app crash or nor work.

    if (inputAudioFormat.encoding != C.ENCODING_PCM_16BIT) {
      throw new UnhandledAudioFormatException(inputAudioFormat);
    }

Could you provide the audio file? this will help me deal this crash and save time.

Unacceptium commented 2 months ago

this happens with every audio on my device. i dont have enough cloud storage to upload them all.

EDIT: echo does work before i try to change its values lol

ZTFtrue commented 2 months ago

Could you try this file? download from here https://helpguide.sony.net/high-res/sample1/v1/en/index.html

You only need to provide an audio (some clips, not all audio to avoid copyright)。

Unacceptium commented 2 months ago

https://github.com/ZTFtrue/MonsterMusic/assets/145642963/0e11a6ed-fb3d-4075-9e95-2cd274c369b4

this video meant to show the behaviour when the echo pitch or speed sliders get moved, but without moving the echo sliders it does work. the notification sometimes stay sometimes not.

edit again: i have tried old versions as if the code changed and etc but no difference.

i have no idea why the video done unplayable im not a github expert

ZTFtrue commented 2 months ago

Please install this release https://github.com/ZTFtrue/MonsterMusic/releases/tag/0.1.15-beta.1. I added a feature to collect crashes (https://github.com/ZTFtrue/MonsterMusic/assets/13563890/19741edd-1c11-4f94-bc61-e806a21a8221).

Unacceptium commented 2 months ago

this is the collected text:

sun.misc.FloatingDecimal.readJavaFormatString(FloatingDecimal.java:2043) sun.misc.FloatingDecimal.parseFloat(FloatingDecimal.java:122) java.lang.Float.parseFloat(Float.java:451) com.ztftrue.music.ui.play.EqualizerViewKt$EqualizerView$3$1$1$3.invoke(EqualizerView.kt:124) com.ztftrue.music.ui.play.EqualizerViewKt$EqualizerView$3$1$1$3.invoke(EqualizerView.kt:119) androidx.compose.material3.SliderState.dispatchRawDelta(Slider.kt:1833) androidx.compose.material3.SliderState$dragScope$1.dragBy(Slider.kt:1883) androidx.compose.foundation.gestures.DraggableNode$abstractDragScope$1.dragBy-k-4lQ0M(Draggable.kt:315) androidx.compose.foundation.gestures.DraggableNode.draggingBy(Draggable.kt:327) androidx.compose.foundation.gestures.AbstractDraggableNode$startListeningForEvents$1$1.invokeSuspend(Draggable.kt:437) kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33) kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:108) androidx.compose.ui.platform.AndroidUiDispatcher.performTrampolineDispatch(AndroidUiDispatcher.android.kt:81) androidx.compose.ui.platform.AndroidUiDispatcher.access$performTrampolineDispatch(AndroidUiDispatcher.android.kt:41) androidx.compose.ui.platform.AndroidUiDispatcher$dispatchCallback$1.doFrame(AndroidUiDispatcher.android.kt:68) android.view.Choreographer$CallbackRecord.run(Choreographer.java:1621) android.view.Choreographer.doCallbacks(Choreographer.java:1141) android.view.Choreographer.doFrame(Choreographer.java:1007) android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:1585) android.os.Handler.handleCallback(Handler.java:955) android.os.Handler.dispatchMessage(Handler.java:102) android.os.Looper.loopOnce(Looper.java:206) android.os.Looper.loop(Looper.java:296) android.app.ActivityThread.main(ActivityThread.java:8971) java.lang.reflect.Method.invoke(Native Method) com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:569) com.android.internal.os.ZygoteInit.main(ZygoteInit.java:976)

for Echo:

sun.misc.FloatingDecimal.readJavaFormatString(FloatingDecimal.java:2043) sun.misc.FloatingDecimal.parseFloat(FloatingDecimal.java:122) java.lang.Float.parseFloat(Float.java:451) com.ztftrue.music.ui.play.EqualizerViewKt$EqualizerView$3$1$2$6.invoke(EqualizerView.kt:271) com.ztftrue.music.ui.play.EqualizerViewKt$EqualizerView$3$1$2$6.invoke(EqualizerView.kt:266) androidx.compose.material3.SliderState.dispatchRawDelta(Slider.kt:1833) androidx.compose.material3.SliderState$dragScope$1.dragBy(Slider.kt:1883) androidx.compose.foundation.gestures.DraggableNode$abstractDragScope$1.dragBy-k-4lQ0M(Draggable.kt:315) androidx.compose.foundation.gestures.DraggableNode.draggingBy(Draggable.kt:327) androidx.compose.foundation.gestures.AbstractDraggableNode$startListeningForEvents$1$1.invokeSuspend(Draggable.kt:437) androidx.compose.foundation.gestures.AbstractDraggableNode$startListeningForEvents$1$1.invoke(Unknown Source:8) androidx.compose.foundation.gestures.AbstractDraggableNode$startListeningForEvents$1$1.invoke(Unknown Source:4) androidx.compose.foundation.gestures.DraggableNode$drag$2.invokeSuspend(Draggable.kt:322) androidx.compose.foundation.gestures.DraggableNode$drag$2.invoke(Unknown Source:8) androidx.compose.foundation.gestures.DraggableNode$drag$2.invoke(Unknown Source:4) androidx.compose.foundation.MutatorMutex$mutateWith$2.invokeSuspend(MutatorMutex.kt:173) androidx.compose.foundation.MutatorMutex$mutateWith$2.invoke(Unknown Source:8) androidx.compose.foundation.MutatorMutex$mutateWith$2.invoke(Unknown Source:4) kotlinx.coroutines.intrinsics.UndispatchedKt.startUndispatchedOrReturn(Undispatched.kt:78) kotlinx.coroutines.CoroutineScopeKt.coroutineScope(CoroutineScope.kt:264) androidx.compose.foundation.MutatorMutex.mutateWith(MutatorMutex.kt:166) androidx.compose.material3.SliderState$drag$2.invokeSuspend(Slider.kt:1820) androidx.compose.material3.SliderState$drag$2.invoke(Unknown Source:8) androidx.compose.material3.SliderState$drag$2.invoke(Unknown Source:4) kotlinx.coroutines.intrinsics.UndispatchedKt.startUndispatchedOrReturn(Undispatched.kt:78) kotlinx.coroutines.CoroutineScopeKt.coroutineScope(CoroutineScope.kt:264) androidx.compose.material3.SliderState.drag(Slider.kt:1818) androidx.compose.foundation.gestures.DraggableNode.drag(Draggable.kt:320) androidx.compose.foundation.gestures.AbstractDraggableNode$startListeningForEvents$1.invokeSuspend(Draggable.kt:435) kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33) kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:108) androidx.compose.ui.platform.AndroidUiDispatcher.performTrampolineDispatch(AndroidUiDispatcher.android.kt:81) androidx.compose.ui.platform.AndroidUiDispatcher.access$performTrampolineDispatch(AndroidUiDispatcher.android.kt:41) androidx.compose.ui.platform.AndroidUiDispatcher$dispatchCallback$1.doFrame(AndroidUiDispatcher.android.kt:68) android.view.Choreographer$CallbackRecord.run(Choreographer.java:1621) android.view.Choreographer.doCallbacks(Choreographer.java:1141) android.view.Choreographer.doFrame(Choreographer.java:1007) android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:1585) android.os.Handler.handleCallback(Handler.java:955) android.os.Handler.dispatchMessage(Handler.java:102) android.os.Looper.loopOnce(Looper.java:206) android.os.Looper.loop(Looper.java:296) android.app.ActivityThread.main(ActivityThread.java:8971) java.lang.reflect.Method.invoke(Native Method) com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:569) com.android.internal.os.ZygoteInit.main(ZygoteInit.java:976)

ZTFtrue commented 2 months ago

Sorry, I can't fix this. I don't no why it happened. I guess because the slider return value is not a number, but I read the slider of source code and can't find any problem.

Maybe, you can try to update your device system.

I don't have this device Honor RKY-LX1 Android12(Magic UI6), I test by other device (Android 12,MagicUI 6), this crash can't happen.

Screenshot from 2024-04-24 19-50-52

Unacceptium commented 2 months ago

i close this as unsolvable