mirror of
https://github.com/rustdesk/rustdesk.git
synced 2026-03-02 19:26:56 -05:00
with possible solution! SIGSEGV in AudioRecord::getMinFrameCount on ARMv7 on Android 11 #3963
Labels
No labels
bug
documentation
duplicate
enhancement
enhancement
enhancement
good first issue
help wanted
invalid
question
unreproducible
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/rustdesk-rustdesk#3963
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @aantnn on GitHub (Jan 31, 2026).
Bug Description
Build debug version of rustdesk commit
96075fdf49Verified:
Set a breakpoint in lldb at
android::AudioRecord::getMinFrameCount.Manually setting in lldb
r2 to 0x1(AUDIO_FORMAT_PCM_16_BIT) viaexpr $r2 = 1before continuing allows the function to return successfully without a crash and start streaming successfully.Description
A segmentation fault occurs in libaudioclient.so when initializing recording on ARMv7 devices.
Architecture: ARMv7 (32-bit)
Component: android.media.AudioRecord / libaudioclient.so
Context: RustDesk / Flutter Audio Plugin
Debug Trace Analysis
The crash occurs at android::AudioRecord::getMinFrameCount. Inspection of the ARM registers at the time of the call revealed:
Root Cause
The
AUDIO_FORMAT_PCM_FLOAT(value 0x5) is not supported by the underlying hardware abstraction layer or the libaudioclient implementation on this specific ARMv7 SoC. When this format is passed, the native function attempts to access an invalid memory address or performs an illegal operation (likely a division by zero or a null-pointer dereference) while calculating frame sizes.Attach LLDB to the process on an ARMv7 device.
Set a breakpoint at
android::AudioRecord::getMinFrameCount.Observe that
r2 is set to 0x5.Executing continue results in a
SIGSEGV.Workaround Verified: Manually setting
r2 to 0x1(AUDIO_FORMAT_PCM_16_BIT) viaexpr $r2 = 1before continuing allows the function to return successfully without a crash.How to Reproduce
Start stream
Expected Behavior
Start streaming
Operating system(s) on local (controlling) side and remote (controlled) side
Android -> Android 11
RustDesk Version(s) on local (controlling) side and remote (controlled) side
commit
96075fdf49Screenshots
Additional Context
No response
@rustdesk commented on GitHub (Jan 31, 2026):
#763