Closed YogarajRamesh closed 2 years ago
Guys, I'm sorry but attaching a video of an unresponsive app isn't providing any sort of clue. I can understand from the log that something crashed, but I can't really do anything as I am unaware of what your program is doing. It looks like the example activity, but from the log I can tell that code has been altered and I can't really do anything without seeing it.
I would urge to backtrack how you set up the engine instead of ignoring earlier warnings that you should not send direct messages via the website (I will also ignore the second issue mentioned under 2 because you are also ignoring "limit to one issue per post" without providing any kind of description on how the issue manifests itself).
Here's some pointers, I see that a file "yo.wav" of a whopping 50 mb in size is read three times before starting the engine.
Also check the part that says
W/Activity: Can request only one set of permissions at a time
D/MWENGINE: MWEngineActivity::onWindowFocusChanged, has focus: true
Is the window focus change for the permissions popup ? Are you sure you all permissions are granted prior to continuing ? Does it make sense that the permissions are requested after the engine is started / samples are loaded from device storage (which requires granting of a storage related permission).
I would urge to backtrack the setup phase of your program and see if all criterion are met before you continue to the next step of setting up the engine and its environment.
Hi @igorski,
I am really Sorry for the DM,
Here's some pointers, I see that a file "yo.wav" of a whopping 50 mb in size is read three times before starting the engine.
It happens because I load the assets during init, mean while it also check the mic and storage permissions. so it keep changing the focus, it causes to parse it 3 audio file time. I have changed this by loading songs after click the button and also after permissions handled. Now the song parse only one time But still same problems occurs. I try to minimize the thread weight for past two days but still
getting the error "Crash thread undumpable
"
So I try to run the example activity without any changes. it still getting crash with error "Crash thread undumpable" for few devices (REALME C11 2021). The log is below.
05/24 12:37:45: Launching 'mwengine_example' on realme RMX3231.
Install successfully finished in 529 ms.
$ adb shell am start -n "nl.igorski.mwengine.example/nl.igorski.mwengine.example.MWEngineActivity" -a android.intent.action.MAIN -c android.intent.category.LAUNCHER
Connected to process 18866 on device 'realme-rmx3231-0002127R5000232C'.
Capturing and displaying logcat messages from application. This behavior can be disabled in the "Logcat output" section of the "Debugger" settings page.
I/chatty: uid=10230(nl.igorski.mwengine.example) expire 480 lines
W/wengine.exampl: Accessing hidden field Landroid/app/ResourcesManager;->sResourcesManager:Landroid/app/ResourcesManager; (greylist-max-o, linking, denied)
I/chatty: uid=10230(nl.igorski.mwengine.example) identical 1 line
W/wengine.exampl: Accessing hidden field Landroid/app/ResourcesManager;->sResourcesManager:Landroid/app/ResourcesManager; (greylist-max-o, linking, denied)
W/wengine.exampl: Accessing hidden method Landroid/app/ResourcesManager;->getOrCreateActivityResourcesStructLocked(Landroid/os/IBinder;)Landroid/app/ResourcesManager$ActivityResources; (greylist-max-o, linking, denied)
W/wengine.exampl: Accessing hidden method Landroid/app/ResourcesManager$ActivityResources;->
Thanks in advance
Assuming that the crash happens with the example Activity with all of its code unchanged (please pull latest code and assemble mwengine
project prior to building mwengine_example
project) what is exactly happening for this crash to happen ? Is it happening the moment the application is launched or after some interaction with the UI, like start/stop playback and/or recording ?
Yes crash happened with example Activity and yes I pushed the latest code and assemble mwengine
prior .
it happens when i start to Recording(with in one second).
Thanks @igorski
Recording of the engine output (startOutputRecording()
) or the device input (e.g. recordInput()
) ?
Hi @igorski
I try to narrow down the issues by changing the code. but it happens in both case
when i try to Record with out device input(startOutputRecording()
) app get crash some times.
but when i add try to set true to input device ( recordInput(true)
) it get either get crashed immediately or with in few seconds.
seems it happens mostly during device input.
Thank you for your time
I struggle to reproduce this on any hardware device or emulator. Is there an AVD configuration you use that can reproduce this issue ? If so, what is its hardware profile and OS version ?
Hi @igorski ,
I am trying to reproduce this issue using emulator. but unfortunately emulator doesn't crash for this scenario.
but It happens every time in this device (REALME C11 2021)
Device name : realme c11 2021
version : BaseBand & kernel
Android Version : 11
Processor : Octa-core
Ram : 2.0 GB
Model : RMX3231
also facing same issues in some other devices like Realme 5s
Sadly I have no access to this device. Is the processor an ARM or Intel type ? Could you verify whether the application is stable if you would force the driver to be OpenSL instead of AAudio ?
Hi @igorski
The device Realme c11 which I am facing issues has the processor ARM 64 bit. and I set drive to OpenSL the app still behave the same and still app the crash like before.
I am still trying to reproduce the issues in AVD.
Is their way to Minimize the thread weight while recording with mic turn on?
Thank you @igorski
Took a little investigation but it is likely that the processor used by the C11 is a derivative of the Cortex A53|A55-types and might be running in 32-bit mode, meaning it doesn't use the aarch64 ABI. I have taken a step in commit dbe5e6fee455411752b05f315502e0b20174c841 to tune the AAudio burst size for 32-bit ARM processors that don't expose exclusive CPU's. Can you verify that after a rebuild of the engine stability has been achieved ?
Hi @igorski First of all thank you for your time and reply. After Rebuild engine is stable I have checked in few device which we are facing (including C11) the issues before. so far stable in C11 device.
Thanks once again.
Hi @igorski
Device : Realme C11, mi 11 lite ne 5g, Realme 5s
Video : https://mega.nz/file/YNk1mIja#PxnJGm-ipp6_izCFug1ainy_LS3_DpAM_fsf_zcwv98
Log cat
05/18 19:27:42: Launching 'mwengine_example' on realme RMX3231. Install successfully finished in 2 s 479 ms. $ adb shell am start -n "nl.igorski.mwengine.example/nl.igorski.mwengine.example.MWEngineActivity" -a android.intent.action.MAIN -c android.intent.category.LAUNCHER Connected to process 3072 on device 'realme-rmx3231-0002127R5000232C'. Capturing and displaying logcat messages from application. This behavior can be disabled in the "Logcat output" section of the "Debugger" settings page. I/wengine.exampl: Late-enabling -Xcheck:jni I/wengine.exampl: Unquickening 15 vdex files! W/wengine.exampl: Using default instruction set features for ARM CPU variant (generic) using conservative defaults D/NetworkSecurityConfig: No Network Security Config specified, using platform default D/NetworkSecurityConfig: No Network Security Config specified, using platform default W/wengine.exampl: Accessing hidden method Landroid/view/View;->computeFitSystemWindows(Landroid/graphics/Rect;Landroid/graphics/Rect;)Z (greylist, reflection, allowed) W/wengine.exampl: Accessing hidden method Landroid/view/ViewGroup;->makeOptionalFitsSystemWindows()V (greylist, reflection, allowed) I/ActivityThread: smart_link is not supported!!! E/OpenGLRenderer: ~SkiaDisplayList() ##### pid = 3072 D/IMGGralloc: Gralloc Register w:720, h:1600, f:0x1, usage:0xb00, ui64Stamp:68712, sSize:4608000, line = 2335 I/OpenGLRenderer: Davey! duration=1004ms; Flags=1, IntendedVsync=19354334247923, Vsync=19354350913923, OldestInputEvent=9223372036854775807, NewestInputEvent=0, HandleInputStart=19354355327079, AnimationStart=19354355342772, PerformTraversalsStart=19354355353156, DrawStart=19354946774194, SyncQueued=19355093861386, SyncStart=19355106997579, IssueDrawCommandsStart=19355107877771, SwapBuffers=19355350259079, FrameCompleted=19355352269732, DequeueBufferDuration=0, QueueBufferDuration=1596461, GpuCompleted=0, I/Choreographer: Skipped 62 frames! The application may be doing too much work on its main thread. D/IMGGralloc: Gralloc Register w:720, h:1600, f:0x1, usage:0xb00, ui64Stamp:68758, sSize:4608000, line = 2335 I/OpenGLRenderer: Davey! duration=1100ms; Flags=0, IntendedVsync=19354384273325, Vsync=19355417565325, OldestInputEvent=9223372036854775807, NewestInputEvent=0, HandleInputStart=19355431146886, AnimationStart=19355431172694, PerformTraversalsStart=19355433519925, DrawStart=19355448881694, SyncQueued=19355452993886, SyncStart=19355458606117, IssueDrawCommandsStart=19355458866617, SwapBuffers=19355489198348, FrameCompleted=19355490251078, DequeueBufferDuration=13856308, QueueBufferDuration=530653, GpuCompleted=0, D/IMGGralloc: Gralloc Register w:720, h:1600, f:0x1, usage:0xb00, ui64Stamp:68765, sSize:4608000, line = 2335 D/MWENGINE: MWEngineActivity::init, had existing _inited state: false W/wengine.example: type=1400 audit(0.0:45021): avc: denied { read } for name="cpus" dev="cgroup" ino=99 scontext=u:r:untrusted_app:s0:c218,c256,c512,c768 tcontext=u:object_r:cgroup:s0 tclass=file permissive=0 app=nl.igorski.mwengine.example W/wengine.example: type=1400 audit(0.0:45026): avc: denied { read } for name="cpus" dev="cgroup" ino=27 scontext=u:r:untrusted_app:s0:c218,c256,c512,c768 tcontext=u:object_r:cgroup:s0 tclass=file permissive=0 app=nl.igorski.mwengine.example V/MWENGINE: About to parse data for WAV file '/storage/emulated/0/Download/Samp/yo.wav' V/MWENGINE: File size : 51724870 V/MWENGINE: Audio format : 1 V/MWENGINE: Channel amount : 2 V/MWENGINE: Sample rate : 44100 V/MWENGINE: Bytes per second : 176400 V/MWENGINE: Block align : 4 V/MWENGINE: Bits per sample : 16 V/MWENGINE: About to parse data for WAV file '/storage/emulated/0/Download/Samp/yo.wav' V/MWENGINE: File size : 51724870 V/MWENGINE: Audio format : 1 V/MWENGINE: Channel amount : 2 V/MWENGINE: Sample rate : 44100 V/MWENGINE: Bytes per second : 176400 V/MWENGINE: Block align : 4 V/MWENGINE: Bits per sample : 16 I/wengine.exampl: Thread[6,tid=3084,WaitingInMainSignalCatcherLoop,Thread*=0xf523b400,peer=0x134c1230,"Signal Catcher"]: reacting to signal 3 I/wengine.exampl: I/wengine.exampl: Wrote stack traces to tombstoned V/MWENGINE: About to parse data for WAV file '/storage/emulated/0/Download/Samp/yo.wav' V/MWENGINE: File size : 51724870 V/MWENGINE: Audio format : 1 V/MWENGINE: Channel amount : 2 V/MWENGINE: Sample rate : 44100 V/MWENGINE: Bytes per second : 176400 V/MWENGINE: Block align : 4 V/MWENGINE: Bits per sample : 16 D/MWENGINE: starting native audio rendering thread @ 44100 Hz using 480 samples per buffer V/MWENGINE: STARTING engine V/MWENGINE: STARTED engine V/MWENGINE: DriverAdapter::initializing AAudio driver I/AAudio: AAudioStreamBuilder_openStream() called ---------------------------------------- I/AudioStreamBuilder: rate = 0, channels = 2, format = 5, sharing = EX, dir = OUTPUT I/AudioStreamBuilder: device = 0, sessionId = -1, perfMode = 12, callback: ON with frames = 0 I/AudioStreamBuilder: usage = 0, contentType = 0, inputPreset = 0, allowedCapturePolicy = 0 I/AudioStreamBuilder: privacy sensitive = false D/AudioStreamBuilder: build() EXCLUSIVE sharing mode not supported. Use SHARED. D/wengine.exampl: PlayerBase::PlayerBase() D/AudioStreamTrack: open(), request notificationFrames = -8, frameCount = 0 I/AudioTrack: set(): streamType -1, sampleRate 0, format 0x5, channelMask 0x3, frameCount 0, flags #104, notificationFrames -8, sessionId 0, transferType 1, uid -1, pid -1 D/AudioTrack: createTrack_l(0): AUDIO_OUTPUT_FLAG_FAST denied by server; frameCount 0 -> 3848 W/AudioStreamTrack: open() sampleRate changed from 0 to 44100 D/AAudioStream: setState(s#1) from 0 to 2 W/AudioStreamTrack: open() flags changed from 0x00000104 to 0x00000000 W/AudioStreamTrack: open() perfMode changed from 12 to 10 I/AAudio: AAudioStreamBuilder_openStream() returns 0 = AAUDIO_OK for s#1 ---------------- V/MWENGINE: AAudio_IO::Output stream is NOT low latency. Check your requested format, sample rate and channel count V/MWENGINE: AAudio_IO::Setting buffer size to 882 I/AAudio: AAudioStreamBuilder_openStream() called ---------------------------------------- I/AudioStreamBuilder: rate = 44100, channels = 1, format = 5, sharing = EX, dir = INPUT I/AudioStreamBuilder: device = 0, sessionId = -1, perfMode = 12, callback: OFF with frames = 0 I/AudioStreamBuilder: usage = 0, contentType = 0, inputPreset = 0, allowedCapturePolicy = 0 I/AudioStreamBuilder: privacy sensitive = false D/AudioStreamBuilder: build() EXCLUSIVE sharing mode not supported. Use SHARED. D/wengine.exampl: PlayerBase::PlayerBase() W/Activity: Can request only one set of permissions at a time I/ActivityThread: smart_link is not supported!!! D/MWENGINE: MWEngineActivity::onWindowFocusChanged, has focus: true W/AudioStreamRecord: open() flags changed from 0x00000005 to 0x00000000 W/AudioStreamRecord: open() perfMode changed from 12 to 10 D/AAudioStream: setState(s#2) from 0 to 2 I/Choreographer: Skipped 1752 frames! The application may be doing too much work on its main thread. I/AAudio: AAudioStreamBuilder_openStream() returns 0 = AAUDIO_OK for s#2 ---------------- V/MWENGINE: AAudio_IO::Input stream is NOT low latency. Check your requested format, sample rate and channel count D/AAudio: AAudioStream_requestStart(s#2) called -------------- D/AAudioStream: setState(s#2) from 2 to 3 I/AudioRecord: start mClientUid:10218 mClientPid:3072 mSessionId:2457 app name:nl.igorski.mwengine.example D/wengine.exampl: PlayerBase::start() from IPlayer D/AAudio: AAudioStream_requestStart(s#2) returned 0 --------- D/AAudio: AAudioStream_requestStart(s#1) called -------------- D/AAudioStream: setState(s#1) from 2 to 3 D/AudioStreamLegacy: onAudioDeviceUpdate() devId 437 => 437 I/AudioTrack: start mClientUid:10218 mClientPid:3072 mSessionId:2449 app name:nl.igorski.mwengine.example D/AudioStreamLegacy: onAudioDeviceUpdate() devId 437 => 437 D/wengine.exampl: PlayerBase::start() from IPlayer D/AAudio: AAudioStream_requestStart(s#1) returned 0 --------- D/AudioStreamLegacy: onAudioDeviceUpdate() devId 435 => 435 V/MWENGINE: AAudio_IO::Error calculating latency: AAUDIO_ERROR_INVALID_STATE V/MWENGINE: Binding to current CPU ID 7 for thread 3225 A/libc: Fatal signal 11 (SIGSEGV), code 2 (SEGV_ACCERR), fault addr 0xf50a0000 in tid 3225 (AudioTrack), pid 3072 (wengine.example) I/OpenGLRenderer: Davey! duration=29445ms; Flags=1, IntendedVsync=19358068133437, Vsync=19387266965437, OldestInputEvent=9223372036854775807, NewestInputEvent=0, HandleInputStart=19387282933287, AnimationStart=19387282948402, PerformTraversalsStart=19387284449440, DrawStart=19387325903286, SyncQueued=19387406643671, SyncStart=19387407682056, IssueDrawCommandsStart=19387410170902, SwapBuffers=19387512805748, FrameCompleted=19387514880363, DequeueBufferDuration=788615, QueueBufferDuration=1250462, GpuCompleted=0, D/MWENGINE: MWEngineActivity::onWindowFocusChanged, has focus: false V/MWENGINE: STOPPING engine V/MWENGINE: STOPPED engine D/AAudio: AAudioStream_requestStop(s#1) called D/AAudioStream: setState(s#1) from 3 to 9 I/AudioTrack: stop mClientUid:10218 mClientPid:3072 mSessionId:2449 app name:nl.igorski.mwengine.example D/AudioTrack: stop(447): called with 882 frames delivered D/wengine.exampl: PlayerBase::stop() from IPlayer D/AAudio: AAudioStream_close(s#1) called --------------- D/AAudioStream: setState(s#1) from 9 to 11 I/DEBUG: Crash thread undumpable
Thanks in advance @igorski