在 Android Studio 中运行我的应用程序时,它崩溃了:
F/libc (28855): Fatal signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 0x0 in tid 28898 (1.ui), pid 28855 (nalquest.survey)
*** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
Build fingerprint: 'motorola/guamna_retail/guamna:11/RZA31.Q2-146-14-22-2/8a7d1:user/release-keys'
Revision: 'pvt'
ABI: 'arm64'
Timestamp: 2023-09-15 11:29:06-0400
pid: 28855, tid: 28898, name: 1.ui >>> com.signalquest.survey <<<
uid: 10497
signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 0x0
Cause: null pointer dereference
x0 0000006e0069b9e1 x1 0000000000000000 x2 0000000000000000 x3 0000000000000000
x4 0000000000000000 x5 0000006e0920cfd1 x6 0000006e0a3d4430 x7 000000000000534f
x8 0000000000000007 x9 0000000000000001 x10 000000700cbf4c68 x11 0000000000000001
x12 000000000003c000 x13 0000000000000010 x14 0000006e09980081 x15 0000007009c09ae8
x16 0000007009b31000 x17 0000006e08f00e01 x18 000000700980a000 x19 0000007009b30000
x20 0000006e08052be1 x21 b4000071d3115f70 x22 0000006e00008081 x23 b4000071d3115f70
x24 0000006e08456f51 x25 0000007009b30000 x26 b4000071d3115f70 x27 0000006e08456f20
x28 000000080000006e x29 0000007009c09af8
lr 0000007012308184 sp 0000007009b30000 pc 0000006fe493497c pst 0000000020000000
backtrace:
#00 pc 000000000003497c [anon:dart-code]
在 Android Studio 中调试 Android 项目时,我也能够重现这一点,但我也在那里得到了不透明的堆栈跟踪。
以下是我的 Flutter 环境的详细信息:
[✓] Flutter (Channel stable, 3.13.2, on macOS 13.4.1 22F770820d darwin-arm64, locale en-US)
• Flutter version 3.13.2 on channel stable at /Users/csabbey/homebrew/Caskroom/flutter/3.3.6/flutter
• Upstream repository https://github.com/flutter/flutter.git
• Framework revision ff5b5b5fa6 (3 weeks ago), 2023-08-24 08:12:28 -0500
• Engine revision b20183e040
• Dart version 3.1.0
• DevTools version 2.25.0
我遇到了
flutter symbolize
,但要使用它,看起来我必须运行项目的混淆版本,在其中生成供其使用的调试信息,但我想未混淆的版本将是可符号化的.
我怎样才能找到这个“空指针取消引用”的原因?
编辑@DharamBudh 询问我的 pubspec 文件;这是我的直接依赖项:
也许您的问题与包“maplibre_gl”有关,您可以在github上检查此问题:https://github.com/maplibre/flutter-maplibre-gl/issues/182
并查看所做的提交:https://github.com/maplibre/flutter-maplibre-gl/pull/259。 由于已合并到主分支中,您可以从主分支安装软件包并在项目中尝试修复。
像这样:
dependencies:
...
maplibre_gl:
git:
url: https://github.com/maplibre/flutter-maplibre-gl.git
ref: main
希望你能解决问题。 最好的问候