Nier-Visualizer icon indicating copy to clipboard operation
Nier-Visualizer copied to clipboard

sometime wrong

Open Citrussss opened this issue 4 years ago • 11 comments

kotlin.UninitializedPropertyAccessException: lateinit property mDestWaveData has not been initialized at me.bogerchan.niervisualizer.util.KeyFrameMaker.updateWaveData(KeyFrameMaker.kt:32) at me.bogerchan.niervisualizer.core.NierVisualizerRenderWorker.processUpdateWaveEvent(NierVisualizerRenderWorker.kt:118) at me.bogerchan.niervisualizer.core.NierVisualizerRenderWorker.access$processUpdateWaveEvent(NierVisualizerRenderWorker.kt:22) at me.bogerchan.niervisualizer.core.NierVisualizerRenderWorker$mRenderHandler$2$1.handleMessage(NierVisualizerRenderWorker.kt:56) at android.os.Handler.dispatchMessage(Handler.java:106) at android.os.Looper.loop(Looper.java:223) at android.os.HandlerThread.run(HandlerThread.java:67)

Citrussss avatar Jul 26 '20 02:07 Citrussss

Thanks for reporting the issues, I would fix it ASAP. : )

bogerchan avatar Dec 16 '20 08:12 bogerchan

@Citrussss I am facing the same issue Did you find something to handle this issue?

akshitk007 avatar Mar 13 '21 08:03 akshitk007

@Citrussss I am facing the same issue Did you find something to handle this issue?

i am download code and change it at local .

    fun updateWaveData(waveData: ByteArray) {
        if(this::mDestWaveData.isInitialized){//add this line..
            System.arraycopy(waveData, 0, mDestWaveData, 0, mDestWaveData.size)
            System.arraycopy(computedWaveData, 0, mPrevWaveData, 0, mPrevWaveData.size)
//        System.arraycopy(waveData, 0, computedWaveData, 0, computedWaveData.size)
//        System.arraycopy(waveData, 0, mPrevWaveData, 0, mPrevWaveData.size)
            mWaveAnimator.reset()
        }
    }

Citrussss avatar Mar 18 '21 14:03 Citrussss

I am facing the same issue when restar activity.

olivaresrafael avatar Apr 23 '21 19:04 olivaresrafael

are there any updates related to the issue?

sergeykrupenich avatar Apr 07 '22 15:04 sergeykrupenich

Sorry for the late reply, the issue is happened when you are not call the start event, you can call the following codes after the activity is restarted.

mVisualizerManager?.start(svWave, mRenderers[idx % mRenderers.size])

Next release will fix this issue. : )

bogerchan avatar Apr 19 '22 15:04 bogerchan

Thanks for the wonderful library. when are you releasing the fix for this issue?

rameezhandel avatar May 10 '22 08:05 rameezhandel

@rameezhandel I dont think so what he would fix it ASAP when he tell at 2020 but 🐦 咕咕咕(joke!)

Citrussss avatar May 10 '22 08:05 Citrussss

fun updateWaveData(waveData: ByteArray) { if(this::mDestWaveData.isInitialized){//add this line.. System.arraycopy(waveData, 0, mDestWaveData, 0, mDestWaveData.size) System.arraycopy(computedWaveData, 0, mPrevWaveData, 0, mPrevWaveData.size) // System.arraycopy(waveData, 0, computedWaveData, 0, computedWaveData.size) // System.arraycopy(waveData, 0, mPrevWaveData, 0, mPrevWaveData.size) mWaveAnimator.reset() } }

@Citrussss this fixed the crash for you?

kishorekumarek avatar May 10 '22 08:05 kishorekumarek

sure ,but aren't you an IOS developer? @kishorekumarek

Citrussss avatar May 10 '22 08:05 Citrussss

@Citrussss yes i work on android as well.. :)

kishorekumarek avatar May 10 '22 08:05 kishorekumarek