[codex] 修复 Android 录音 SIGILL 崩溃#98
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
背景 / 根因
Issue #29 在 Android 真机点击录音后会发生 native
SIGILL崩溃。排查日志和反汇编显示:VoiceActivityDetector.acceptWaveform()时。libonnxruntime.so,旧包sherpa_onnx_android 1.12.36携带的 ORT 为1.23.2。sme2,因此执行 SME2 指令触发SIGILL。这更像是上游 native runtime 的 CPU feature dispatch 兼容问题,不是 Dart 侧异常、权限问题,也不是 SenseVoice 模型文件损坏。
修复方案
sherpa_onnx从^1.12.36精确升级到1.13.2。1.12.37/#3494将 Android ORT 升到1.24.3。1.12.38/#3501继续更新 ORT 版本线。1.12.40/#3522拆分 Android ABI 包,但该版本有BuildConfig is defined multiple times的 release 构建问题(#3557)。1.13.0/#3559修复 ABI split 后的 Android namespace 冲突,所以这里直接落到1.13.2,避免卡在 1.12.40 的构建坑。^后续自动跳版本扩大风险。兼容性检查
sherpa_onnx1.12.36 与 1.13.2 的lib/目录逐文件一致;本项目使用的VoiceActivityDetector、OfflineRecognizer、readWave等 API 没有签名变化。libsherpa-onnx-c-api.so都导出当前使用的 VAD / OfflineRecognizer / ReadWave 相关 C API。sherpa_onnx_ioslock 同步到 1.13.2;podspec 除版本号外无接口性变化。验证
flutter pub get --offlineflutter analyze --no-pub lib/data/services/streaming_transcriber.dart lib/ui/main_screen/widgets/input_sheet.dart lib/main.dartlib/main.dart既有 16 个 info 级 lint,无新增 error。flutter test --no-pub test/ui/main_screen/widgets/input_sheet_test.dartflutter build apk --debug --flavor globalDev --target-platform android-arm64 --split-per-abi --no-pubflutter build apk --debug --flavor globalDev --target-platform android-arm --split-per-abi --no-pubflutter build apk --debug --flavor globalDev --target-platform android-x64 --split-per-abi --no-pubflutter build apk --debug --flavor globalDev --no-pubflutter build appbundle --debug --flavor globalDev --no-pubflutter build ios --debug --flavor global --no-codesign --no-pub已知情况
GeneratedPluginRegistrant中flutter_native_splashJava 编译问题挡住,未作为本 PR 的通过项。Fixes #29