Replies: 2 comments
-
|
Device cleanup is handled exactly the same on Android as everywhere else. Not sure what's going on here. It looks like it's coming from deep inside Android so not sure there is anything I can do about this? Does the AAudio backend work? |
Beta Was this translation helpful? Give feedback.
-
|
Found the reason: I was calling ma_stop() inside an atexit() function. There's no crash if I move it out of that function. AAudio was disabled and it was using OpenSL. Git blame says: "added back the disabling of AAUDIO in the makefile, that is needed for kew to work on android" It does seem to work with AAudio now though. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
I am trying to quit my terminal app in Android/Termux.
I'm using these functions:
It crashes on ma_device_stop__opensl:
#0 0x0000007feaf5d044 in abort () from /apex/com.android.runtime/lib64/bionic/libc.so
#1 0x0000007feaf60a10 in __fortify_fatal(char const*, ...) () from /apex/com.android.runtime/lib64/bionic/libc.so
#2 0x0000007feaf703e0 in HandleUsingDestroyedMutex(pthread_mutex_t*, char const*) () from /apex/com.android.runtime/lib64/bionic/libc.so
#3 0x0000007feaf7025c in pthread_mutex_lock () from /apex/com.android.runtime/lib64/bionic/libc.so
#4 0x0000007fe9998b64 in std::__1::mutex::lock() () from /system/lib64/libc++.so
#5 0x0000007f568b62c0 in android::mediametrics::BaseItem::getService() [clone .cfi] () from /system/lib64/libmediametrics.so
#6 0x0000007f568b6088 in android::mediametrics::BaseItem::submitBuffer(char const*, unsigned long) [clone .cfi] () from /system/lib64/libmediametrics.so
#7 0x0000007f67b66e58 in android::mediametrics::BufferedItem::record() () from /system/lib64/libaudioclient.so
#8 0x0000007f67bb6698 in std::__1::__function::__func<android::AudioTrack::stop()::$_0, std::1::allocatorandroid::AudioTrack::stop()::$_0, void ()>::operator()() () from /system/lib64/libaudioclient.so
#9 0x0000007f67bb6364 in android::AudioTrack::stop() () from /system/lib64/libaudioclient.so
#10 0x0000007f67be839c in android::TrackPlayerBase::playerStop() () from /system/lib64/libaudioclient.so
#11 0x0000007f67be43f8 in android::PlayerBase::stop() () from /system/lib64/libaudioclient.so
#12 0x0000007f430d49a8 in android_audioPlayer_setPlayState(CAudioPlayer_struct*) () from /system/lib64/libwilhelm.so
#13 0x0000007f430cffac in handler_AudioPlayer_play_state () from /system/lib64/libwilhelm.so
#14 0x0000007f430d072c in object_unlock_exclusive_attributes(Object_interface*, unsigned int, char const*, int) () from /system/lib64/libwilhelm.so
#15 0x0000007f430ec66c in IPlay_SetPlayState(SLPlayItf const* const*, unsigned int) () from /system/lib64/libwilhelm.so
#16 0x00000055556460b4 in ma_device_stop__opensl (pDevice=0x55558064f8 ) at include/miniaudio/miniaudio.h:41299
#17 0x00000055555ce208 in ma_device_stop (pDevice=0x55558064f8 ) at include/miniaudio/miniaudio.h:44364
#18 0x000000555569ae70 in stop_playback () at src/sound/playback.c:138
#19 0x000000555569b194 in cleanup_playback_device () at src/sound/playback.c:240
#20 0x000000555569b208 in pb_sound_shutdown () at src/sound/playback.c:255
#21 0x000000555569f7dc in sound_shutdown () at src/ops/playback_system.c:46
#22 0x000000555574a3ac in kew_shutdown () at src/kew.c:572
#23 0x0000007feaf5dc14 in __cxa_finalize () from /apex/com.android.runtime/lib64/bionic/libc.so
#24 0x0000007feaf625ac in exit () from /apex/com.android.runtime/lib64/bionic/libc.so
#25 0x000000555569d33c in quit () at src/sys/sys_integration.c:427
#26 0x00000055556a67ac in handle_event (event=0x7fffffba44) at src/ui/input.c:258
#27 0x00000055556a752c in on_tb_input (source=0xb400007fe9e1e280, cond=G_IO_IN, data=0x0) at src/ui/input.c:658
#28 0x0000007fedd3ecf0 in ?? () from /data/data/com.termux/files/usr/lib/libglib-2.0.so.0.8600.4
#29 0x0000007fedd3f00c in ?? () from /data/data/com.termux/files/usr/lib/libglib-2.0.so.0.8600.4
#30 0x0000007fedd3f278 in g_main_loop_run () from /data/data/com.termux/files/usr/lib/libglib-2.0.so.0.8600.4
#31 0x0000005555749d68 in create_loop () at src/kew.c:352
#32 0x0000005555749f54 in run (start_playing=false) at src/kew.c:411
#33 0x000000555574a35c in init_default_state () at src/kew.c:525
#34 0x000000555574af04 in main (argc=1, argv=0x7fffffeb18) at src/kew.c:880
Warning: 'set logging off', an alias for the command 'set logging enabled', is deprecated.
Use 'set logging enabled off'.
If I remove the stop, it crashes on ma_device_uninit because it has problems destroying the object (IObject_Destroy).
Beta Was this translation helpful? Give feedback.
All reactions