Closed YogarajRamesh closed 2 years ago
then i dispose the engine without stop the recording
Well, have you tried stopping the recording prior to disposing the engine ? 🙈
This can't be handled by the engine because when the recording stops, a notification is sent out to handle writing the file asynchronously in a separate thread. Meaning : your code needs to be aware of this. At this point, might as well adjust your code to first stop recording, prior to disposing.
To be clear: disposal is to be used when the engine should be destroyed (e.g. is not expected to do process any audio / will be recreated later).
Hi @igorski
Thank you for the reply. found the problem I am usingasync
function to stop and destroy recoding and engine. after handle it properly the problem get fixed.
so what's happening when i try to destroy the engine it take few min(clear other process), mean while i reinit()
the engine again and add effects to process. but the first destroy method dispose both the engine. so the effects is trying to add to the destroyed engine. it cause the crash.
Thanks for your suggestion @igorski
Hi @igorski I have added processor to the input channel while recording then i dispose the engine without stop the recording after that again when switch on the inputchannel the app get crashed.
Adding the effect to the engine _engine.getInputChannel().getProcessingChain().addProcessor(reverb);
Dispose the engine _engine.stop(); // free memory allocated by song _engine.dispose(); // dispose the engine
LOGCAT
F/libc ( 6001): Fatal signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 0x8 in tid 6001 (testapp.test), pid 6001 (testapp.test)
Build fingerprint: 'HONOR/LLD-AL10/HWLLD-H:9/HONORLLD-AL10/9.1.0.173C675:user/release-keys' Revision: '0' ABI: 'arm64' Happend: 'Thu May 5 23:09:20 2022 ' SYSVMTYPE: Art APPVMTYPE: Art pid: 6001, tid: 6001, name: testapp.test >>> com.testapp.test <<< signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 0x8 Cause: null pointer dereference x0 0000000000000000 x1 00000079d8697480 x2 0000007fdcc99c30 x3 0000007fdcc99c30 x4 0000000000000000 x5 0000000000000000 x6 00000079dee15c00 x7 0000000000000000 x8 0000000000000000 x9 00000079d8697480 x10 00000079c2f4c798 x11 0000000000000001 x12 0000007fdcc99ccc x13 0000007fdcc99cb8 x14 0000000000000002 x15 0000007fdcc98798 x16 00000079ab9afdf8 x17 00000079ab8bcf08 x18 0000000000000000 x19 00000079dee15c00 x20 0000000000000000 x21 00000079dee15c00 x22 0000007fdcc99fb0 x23 00000079c27c4096 x24 0000000000000018 x25 0000007a6578a5e0 x26 00000079dee15ca0 x27 0000000000000000 x28 0000007fdcc99cd0 x29 0000007fdcc99c40 sp 0000007fdcc99be0 lr 00000079ab8a5b40 pc 00000079ab8bcf1c backtrace:
00 pc 00000000000e4f1c /data/app/com.testapp.test-uzk8NHJMleI472FTW3aTbA==/base.apk (offset 0x4500000) (MWEngine::BaseProcessor::setChain(MWEngine::ProcessingChain*)+20)
28 pc 0000000000289b90 /dev/ashmem/dalvik-classes3.dex extracted in memory from /data/app/com.testapp.test-uzk8NHJMleI472FTW3aTbA==/base.apk!classes3.dex (deleted) (io.flutter.embedding.engine.dart.DartMessenger.invokeHandler+36)
32 pc 0000000000014ca8 /dev/ashmem/dalvik-jit-code-cache (deleted) (io.flutter.embedding.engine.dart.DartMessenger.lambda$dispatchMessageToQueue$0$DartMessenger+248)
39 pc 0000000000288cb4 /dev/ashmem/dalvik-classes3.dex extracted in memory from /data/app/com.testapp.test-uzk8NHJMleI472FTW3aTbA==/base.apk!classes3.dex (deleted) (io.flutter.embedding.engine.dart.-$$Lambda$DartMessenger$TsixYUB5E6FpKhMtCSQVHKE89gQ.run+24)
Lost connection to device. Exited (sigterm)
Thanks in Advance @igorski