I’ve generated an Audio Application project using Projucer, exported it through Android Studio (didn’t change anything in the Projucer configs or the code), successfully built the app and ran it on the device (samsung SM-960F). The app keeps crashing at start up with the following backtrace:
Signal: SIGBUS (signal SIGBUS: illegal address)
flowgraph::SinkI16::read(void*, int) 0x0000007cd829f1c8
aaudio::AudioStreamInternalPlay::writeNowWithConversion(void const*, int) 0x0000007cd8293c08
aaudio::AudioStreamInternalPlay::processDataNow(void*, int, long, long*) 0x0000007cd8293664
aaudio::AudioStreamInternal::processData(void*, int, long) 0x0000007cd8290e4c
I’ve tried this with JUCE 6.0.5 and android ndk 21.0.6113669, and JUCE 6.0.7 both with ndk 21.0.6113669 and 22.0.7026061 (forced it through ndkVersion in gradle) which appears to be the latest.
The device is running Android 10.
Min SDK and Target SDK are the default ones (19 and 29) respectively, but I’ve also tried with 26 and the result is still the same.
I can get by this crash if I launch the app with some external BT speaker connected prior, so the problem must come from the device’s default audio device. I tried my best trying to debug the problem but as you can see the crash actually happens inside libaaudio.so, so I’m kinda blindfolded. It definitely happens shortly after the output stream is started, during the first callback.
Same issue here, but no useful info: Crash on Android on libaudioutils.memcpy_to_i16_from_float (memcpy_to_i16_from_float:212) - Community Q&A
Does somebody know something about this?