Flutter崩溃iOS-NSInvalidArgumentException

如何解决Flutter崩溃iOS-NSInvalidArgumentException

有人知道这次崩溃是什么吗?我在网上查了一下,有些结果似乎相似,但不完全相同。这是Crashlytics中的痕迹:

致命异常:NSInvalidArgumentException-[__ NSCFString substringWithRange:]:范围{19,9223372036854775788}超出范围;字符串长度0

Fatal Exception: NSInvalidArgumentException
0  CoreFoundation                 0x1b3d19344 __exceptionPreprocess
1  libobjc.A.dylib                0x1b3a2ecc0 objc_exception_throw
2  CoreFoundation                 0x1b3d72550 -[__NSCFString characterAtIndex:].cold.1
3  CoreFoundation                 0x1b3d72650 -[__NSCFString hasPrefix:].cold.1
4  CoreFoundation                 0x1b3bf7c0c -[_CFXNotificationNameRegistration find:observer:matching:]
5  UIKitCore                      0x1b7cfece8 -[UIResponder(UITextInput_Internal) _rangeOfText:endingAtPosition:]
6  UIKitCore                      0x1b7c68ab0 -[UIKeyboardImpl applyAutocorrection:]
7  UIKitCore                      0x1b7c5c9c0 -[UIKeyboardImpl acceptAutocorrection:executionContextPassingTIKeyboardCandidate:]
8  UIKitCore                      0x1b7c5bd58 -[UIKeyboardImpl acceptAutocorrectionForWordTerminator:executionContextPassingTIKeyboardCandidate:]
9  UIKitCore                      0x1b7c5bc10 __56-[UIKeyboardImpl acceptAutocorrectionForWordTerminator:]_block_invoke
10 UIKitCore                      0x1b7c84188 -[UIKeyboardTaskEntry execute:]
11 UIKitCore                      0x1b7c82af0 -[UIKeyboardTaskQueue continueExecutionOnMainThread]
12 UIKitCore                      0x1b7c8317c -[UIKeyboardTaskQueue addAndReturnTask:]
13 UIKitCore                      0x1b7c8366c -[UIKeyboardTaskQueue performSingleTask:]
14 UIKitCore                      0x1b7c5bb1c -[UIKeyboardImpl acceptAutocorrectionForWordTerminator:]
15 UIKitCore                      0x1b7c5eddc -[UIKeyboardImpl acceptAutocorrection]
16 UIKitCore                      0x1b7c43bf0 -[UIKeyboardImpl setDelegate:force:]
17 UIKitCore                      0x1b791bfa0 -[UIInputResponderController _reloadInputViewsForKeyWindowSceneResponder:]
18 UIKitCore                      0x1b791b7b8 -[UIInputResponderController _reloadInputViewsForResponder:]
19 UIKitCore                      0x1b7e7037c -[UIResponder _finishResignFirstResponder]
20 UIKitCore                      0x1b7e70470 -[UIResponder resignFirstResponder]
21 UIKitCore                      0x1b82fb058 -[UIView(Hierarchy) _removeFirstResponderFromSubtree]
22 UIKitCore                      0x1b82fb564 __UIViewWillBeRemovedFromSuperview
23 UIKitCore                      0x1b82fb3ac -[UIView(Hierarchy) removeFromSuperview]
24 Flutter                        0x100555898 (Missing)
25 Flutter                        0x1005550cc (Missing)
26 Flutter                        0x100554e40 (Missing)
27 Flutter                        0x100a97e20 (Missing)
28 Flutter                        0x1005675bc (Missing)
29 Flutter                        0x10083a108 (Missing)
30 Flutter                        0x100570af4 (Missing)
31 Flutter                        0x1005727b0 (Missing)
32 CoreFoundation                 0x1b3c953a8 __CFRUNLOOP_IS_CALLING_OUT_TO_A_TIMER_CALLBACK_FUNCTION__
33 CoreFoundation                 0x1b3c950c0 __CFRunLoopDoTimer
34 CoreFoundation                 0x1b3c94740 __CFRunLoopDoTimers
35 CoreFoundation                 0x1b3c8f538 __CFRunLoopRun
36 CoreFoundation                 0x1b3c8ebc8 CFRunLoopRunSpecific
37 GraphicsServices               0x1be0705cc GSEventRunModal
38 UIKitCore                      0x1b7e41744 UIApplicationMain
39 Runner                         0x1000c9804 main + 6 (AppDelegate.swift:6)
40 libdyld.dylib                  0x1b3b0b384 start

并崩溃:com.twitter.crashlytics.ios.exception SIGABRT ABORT 0x00000001b3b00df0

Crashed: com.twitter.crashlytics.ios.exception
0  Runner                         0x1000e2fec CLSProcessRecordAllThreads + 4303040492
1  Runner                         0x1000e33d4 CLSProcessRecordAllThreads + 4303041492
2  Runner                         0x1000d2c4c CLSHandler + 4302974028
3  Runner                         0x1000e15f0 __CLSExceptionRecord_block_invoke + 4303033840
4  libdispatch.dylib              0x1b39bb5ac _dispatch_client_callout + 20
5  libdispatch.dylib              0x1b39c8360 _dispatch_lane_barrier_sync_invoke_and_complete + 60
6  Runner                         0x1000e105c CLSExceptionRecord + 4303032412
7  Runner                         0x1000e0e88 CLSExceptionRecordNSException + 4303031944
8  Runner                         0x1000e0a7c CLSTerminateHandler() + 4303030908
9  libc++abi.dylib                0x1b3ad340c std::__terminate(void (*)()) + 20
10 libc++abi.dylib                0x1b3ad6160 __cxa_rethrow + 148
11 libobjc.A.dylib                0x1b3a2ee84 objc_exception_rethrow + 44
12 CoreFoundation                 0x1b3c8ec38 CFRunLoopRunSpecific + 592
13 GraphicsServices               0x1be0705cc GSEventRunModal + 164
14 UIKitCore                      0x1b7e41744 UIApplicationMain + 1936
15 Runner                         0x1000c9804 main + 6 (AppDelegate.swift:6)
16 libdyld.dylib                  0x1b3b0b384 start + 4

这似乎与EditText有关(此崩溃发生在我的登录屏幕上),但我不知道是什么。仅影响一台设备-13.6.1上的XS Max。没有其他XS Max设备或13.6.1上的其他设备受到影响,仅此一个受到影响,可能是由于设备配置或其他原因造成的?任何想法都会有所帮助。

另一方面,是否有办法从Crashlytics获取更具可读性的日志?好像得到了Flutter在调试应用程序上抛出的确切错误?我没有使用Swift的经验,所以iOS的日志对我来说毫无意义。谢谢!

版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。

相关推荐


依赖报错 idea导入项目后依赖报错,解决方案:https://blog.csdn.net/weixin_42420249/article/details/81191861 依赖版本报错:更换其他版本 无法下载依赖可参考:https://blog.csdn.net/weixin_42628809/a
错误1:代码生成器依赖和mybatis依赖冲突 启动项目时报错如下 2021-12-03 13:33:33.927 ERROR 7228 [ main] o.s.b.d.LoggingFailureAnalysisReporter : *************************** APPL
错误1:gradle项目控制台输出为乱码 # 解决方案:https://blog.csdn.net/weixin_43501566/article/details/112482302 # 在gradle-wrapper.properties 添加以下内容 org.gradle.jvmargs=-Df
错误还原:在查询的过程中,传入的workType为0时,该条件不起作用 <select id="xxx"> SELECT di.id, di.name, di.work_type, di.updated... <where> <if test=&qu
报错如下,gcc版本太低 ^ server.c:5346:31: 错误:‘struct redisServer’没有名为‘server_cpulist’的成员 redisSetCpuAffinity(server.server_cpulist); ^ server.c: 在函数‘hasActiveC
解决方案1 1、改项目中.idea/workspace.xml配置文件,增加dynamic.classpath参数 2、搜索PropertiesComponent,添加如下 <property name="dynamic.classpath" value="tru
删除根组件app.vue中的默认代码后报错:Module Error (from ./node_modules/eslint-loader/index.js): 解决方案:关闭ESlint代码检测,在项目根目录创建vue.config.js,在文件中添加 module.exports = { lin
查看spark默认的python版本 [root@master day27]# pyspark /home/software/spark-2.3.4-bin-hadoop2.7/conf/spark-env.sh: line 2: /usr/local/hadoop/bin/hadoop: No s
使用本地python环境可以成功执行 import pandas as pd import matplotlib.pyplot as plt # 设置字体 plt.rcParams['font.sans-serif'] = ['SimHei'] # 能正确显示负号 p
错误1:Request method ‘DELETE‘ not supported 错误还原:controller层有一个接口,访问该接口时报错:Request method ‘DELETE‘ not supported 错误原因:没有接收到前端传入的参数,修改为如下 参考 错误2:cannot r
错误1:启动docker镜像时报错:Error response from daemon: driver failed programming external connectivity on endpoint quirky_allen 解决方法:重启docker -> systemctl r
错误1:private field ‘xxx‘ is never assigned 按Altʾnter快捷键,选择第2项 参考:https://blog.csdn.net/shi_hong_fei_hei/article/details/88814070 错误2:启动时报错,不能找到主启动类 #
报错如下,通过源不能下载,最后警告pip需升级版本 Requirement already satisfied: pip in c:\users\ychen\appdata\local\programs\python\python310\lib\site-packages (22.0.4) Coll
错误1:maven打包报错 错误还原:使用maven打包项目时报错如下 [ERROR] Failed to execute goal org.apache.maven.plugins:maven-resources-plugin:3.2.0:resources (default-resources)
错误1:服务调用时报错 服务消费者模块assess通过openFeign调用服务提供者模块hires 如下为服务提供者模块hires的控制层接口 @RestController @RequestMapping("/hires") public class FeignControl
错误1:运行项目后报如下错误 解决方案 报错2:Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.8.1:compile (default-compile) on project sb 解决方案:在pom.
参考 错误原因 过滤器或拦截器在生效时,redisTemplate还没有注入 解决方案:在注入容器时就生效 @Component //项目运行时就注入Spring容器 public class RedisBean { @Resource private RedisTemplate<String
使用vite构建项目报错 C:\Users\ychen\work>npm init @vitejs/app @vitejs/create-app is deprecated, use npm init vite instead C:\Users\ychen\AppData\Local\npm-