Hi
We've integrated Ableton Link in all our apps since a while.
Ableton Link is a technology that synchronizes beat, phase and tempo of Ableton Live and Link-enabled apps over a wireless network.
The initial integration was done in April this year with NDK r14. The current live version is compiled with NDK r15c.
The integration is based on the Ableton Link cross platform library (
https://github.com/Ableton/link ) and partially on Peter Brinkmann’s Ableton Link for PD Android example (
https://github.com/libpd/abl_link ).
Ableton Link uses ifaddrs for the communication over WLAN :
https://github.com/libpd/abl_link/tree/master/external/android-ifaddrs
Last week drove some first tests with NDK r16.
Compiling with NDK r16 worked without any problems.
But we ran into crashes on ARMv7 devices as soon as Ableton Link starts to communicate over the wireless network.
All devices with ARMv7 CPU architecture ran into these crashes, independent of the installed Android version. I’ve tested it on Android 5.x, 6.x and 7.x. I don’t know how it is on Android 8.x, as we only have ARM64v8a devices running on the latest OS. But I’m pretty sure that the behavior will be the same.
Devices with ARM64v8a CPU architecture work without any problems (tested on Android 7.x and 8.x).
Also, when compiling the same code with NDK r15c, all CPU architectures work perfectly fine.
Here's the log output of the r16 crashes:
11-23 08:00:30.531 4396-4438/? A/libc: Fatal signal 7 (SIGBUS), code 1, fault addr 0x449d in tid 4438 (neth.linktomidi)
11-23 08:00:30.588 190-190/? A/DEBUG: *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
11-23 08:00:30.588 190-190/? A/DEBUG: Build fingerprint: 'google/razor/flo:6.0.1/MOB30X/3036618:user/release-keys'
11-23 08:00:30.588 190-190/? A/DEBUG: Revision: '0'
11-23 08:00:30.588 190-190/? A/DEBUG: ABI: 'arm'
11-23 08:00:30.588 190-190/? A/DEBUG: pid: 4396, tid: 4438, name: neth.linktomidi >>> com.planeth.linktomidi <<<
11-23 08:00:30.588 190-190/? A/DEBUG: signal 7 (SIGBUS), code 1 (BUS_ADRALN), fault addr 0x449d
11-23 08:00:30.612 190-190/? A/DEBUG: r0 b6c994b5 r1 0000449d r2 a03fce3c r3 a03fce8e
11-23 08:00:30.612 190-190/? A/DEBUG: r4 00004499 r5 a0adb968 r6 d66ab45d r7 a0cf37c8
11-23 08:00:30.612 190-190/? A/DEBUG: r8 a03e6000 r9 b3abb3d8 sl a0aaff40 fp a0cf389c
11-23 08:00:30.612 190-190/? A/DEBUG: ip a0fdf804 sp a0cf37c0 lr a0f633cb pc a0f633e4 cpsr 000f0030
11-23 08:00:30.627 190-190/? A/DEBUG: backtrace:
11-23 08:00:30.627 190-190/? A/DEBUG: #00 pc 0006e3e4 /data/app/com.planeth.linktomidi-1/lib/arm/libabl-link-facade.so
11-23 08:00:30.627 190-190/? A/DEBUG: #01 pc 0006e3c7 /data/app/com.planeth.linktomidi-1/lib/arm/libabl-link-facade.so (_ZNSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EED2Ev+10)
11-23 08:00:30.628 190-190/? A/DEBUG: #02 pc 0007e34b /data/app/com.planeth.linktomidi-1/lib/arm/libabl-link-facade.so (_ZNK7ableton4util16SafeAsyncHandlerINS_9platforms4asio6SocketILj512EE4ImplEEclIJRKSt10error_codeRKjEEEvDpOT_+82)
11-23 08:00:30.628 190-190/? A/DEBUG: #03 pc 0007e24b /data/app/com.planeth.linktomidi-1/lib/arm/libabl-link-facade.so (_ZN4asio6detail27reactive_socket_recvfrom_opINS_17mutable_buffers_1ENS_2ip14basic_endpointINS3_3udpEEEN7ableton4util16SafeAsyncHandlerINS7_9platforms4asio6SocketILj512EE4ImplEEEE11do_completeEPvPNS0_19scheduler_operationERKSt10error_codej+90)
11-23 08:00:30.628 190-190/? A/DEBUG: #04 pc 00070d43 /data/app/com.planeth.linktomidi-1/lib/arm/libabl-link-facade.so (_ZN4asio6detail9scheduler10do_run_oneERNS0_11scoped_lockINS0_11posix_mutexEEERNS0_21scheduler_thread_infoERKSt10error_code+218)
11-23 08:00:30.628 190-190/? A/DEBUG: #05 pc 00070bbd /data/app/com.planeth.linktomidi-1/lib/arm/libabl-link-facade.so (_ZN4asio6detail9scheduler3runERSt10error_code+92)
11-23 08:00:30.628 190-190/? A/DEBUG: #06 pc 00070b35 /data/app/com.planeth.linktomidi-1/lib/arm/libabl-link-facade.so (_ZN4asio10io_context3runEv+32)
11-23 08:00:30.628 190-190/? A/DEBUG: #07 pc 000766d9 /data/app/com.planeth.linktomidi-1/lib/arm/libabl-link-facade.so (_ZZN7ableton9platforms4asio7ContextINS0_5posix13ScanIpIfAddrsENS_4util7NullLogEEC1INS_4link10ControllerISt8functionIFvjEESB_IFvNS9_5TempoEEENS0_5linux5ClockILi1EEES7_E23UdpSendExceptionHandlerEEET_ENKUlRN4asio10io_contextESL_E_clESP_SL_+38)
11-23 08:00:30.628 190-190/? A/DEBUG: #08 pc 000b53cf /data/app/com.planeth.linktomidi-1/lib/arm/libabl-link-facade.so
11-23 08:00:30.629 190-190/? A/DEBUG: #09 pc 0003f45f /system/lib/libc.so (_ZL15__pthread_startPv+30)
11-23 08:00:30.629 190-190/? A/DEBUG: #10 pc 00019b43 /system/lib/libc.so (__start_thread+6)
11-23 08:00:31.391 190-190/? A/DEBUG: Tombstone written to: /data/tombstones/tombstone_09
11-23 08:00:31.391 190-190/? E/DEBUG: AM write failed: Broken pipe
Any help would be appreciated.
Thanks in advance