dump 生成了,但是并不是在 attachments 的路径下,我们接了友盟的 sdk,直接 crash 信息传到了友盟的平台上~
我在代码中增加了手动造了一个崩溃,具体如下:
在 Delegate.m 中添加: self.window.rootViewController = self.tabBarController; self.window.backgroundColor = [UIColor orangeColor]; [self.window makeKeyAndVisible]; [NSTimer scheduledTimerWithTimeInterval:5 target:self selector:@selector(test) userInfo:nil repeats:NO]; NSMutableArray *array1 = [NSMutableArray array]; self.array = array1; return YES; 并且添加函数: - (void) test{ [self.array addObject:@"1"]; }
然后运行之后出现错误:(一般是在 app 自己卡住出现了崩溃的情况下会出现下面这样的错误)
t = 42.96s Snapshot accessibility hierarchy for com.xxx
2017-09-12 15:22:03.469370 XCTRunner[404:27133] *** Terminating app due to uncaught exception '_XCTestCaseInterruptionException', reason: 'Interrupting test' *** First throw call stack: (0x184cb41c0 0x1836ec55c 0x184cb4108 0x1001db1f0 0x1001f17c0 0x10021769c 0x1001e1d2c 0x100217484 0x100216748 0x100214214 0x1001e1d2c 0x100214174 0x1008ac8a8 0x1008d80a8 0x1008d7434 0x1008d6d08 0x10089e860 0x183b48dd4 0x183b3d1c0 0x183b4e0c4 0x183b3d1c0 0x183b41d6c 0x184c61f2c 0x184c5fb18 0x184b8e048 0x18569cb1c 0x1856f12a0 0x10089fd20 0x1008e2f00 0x1008e2f54 0x184cba160 0x184badc3c 0x1001dca30 0x1001dc67c 0x100217dac 0x1001dc430 0x1001dcd80 0x1001d9f44 0x1001d9b64 0x1001d9d54 0x1001d9f44 0x1001d9b64 0x1001d9d54 0x1001d9f44 0x1001d9b64 0x1001d9d54 0x100225a14 0x1001e88dc 0x100225894 0x1001c4f70 0x10021b6f8 0x184c62160 0x184c6195c 0x184c5f7b0 0x184b8e048 0x186611198 0x18ab67818 0x18ab62550 0x10009c474 0x183b705b8) libc++abi.dylib: terminating with uncaught exception of type _XCTestCaseInterruptionException
....
2017-09-12 15:22:09.940061 XCTRunner[419:27958] Running tests...
2017-09-12 15:22:10.819493 XCTRunner[419:27958] Continuing to run tests in the background with task ID 1 Restarting after unexpected exit or crash in XCTextWDRunner/testRunner(); summary will include totals from previous launches. Test Suite 'Selected tests' started at 2017-09-12 15:22:11.419
Test Suite 'XCTestWDUITests.xctest' started at 2017-09-12 15:22:11.422
Test Suite 'XCTestWDUITests.xctest' failed at 2017-09-12 15:22:11.423.
Executed 1 test, with 1 failure (0 unexpected) in 0.000 (0.001) seconds Test Suite 'Selected tests' failed at 2017-09-12 15:22:11.426.
Executed 1 test, with 1 failure (0 unexpected) in 0.000 (0.007) seconds Failing tests: -[XCTextWDRunner testRunner()]
** TEST FAILED **
用另一台 6P 就没有出现这个问题,用 5C 的这个单机跑也出现过这个问题~
好像跟是不是单机没关系,而且后来再跑的时候,不知道是不是因为没有正常结束,会出现这个错误提示:
), NSLocalizedRecoverySuggestion=Too many instances of this service are already running., NSLocalizedDescription=Too many instances of this service are already running.}
2017-09-11 17:51:19.038 xcodebuild[97561:2368496] Error Domain=IDETestOperationsObserverErrorDomain Code=6 "Early unexpected exit, operation never finished bootstrapping - no restart will be attempted" UserInfo={NSLocalizedDescription=Early unexpected exit, operation never finished bootstrapping - no restart will be attempted}
Testing failed:
Test target XCTestWDUITests encountered an error (Early unexpected exit, operation never finished bootstrapping - no restart will be attempted)
** TEST FAILED **
XCTRunner(242,0x3b9c9e40) malloc: *** mach_vm_map(size=1363546112) failed (error code=3)
*** error: can't allocate region
*** set a breakpoint in malloc_error_break to debug
2017-09-11 17:00:07.105276+0800 XCTRunner[242:6204] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '*** -[NSXPCEncoder checkObject:]: This coder only encodes objects that adopt NSSecureCoding (object is of class 'NSMallocBlock_').'
这个 mach_vm_map 括号里面的 size 值都是一样的,基本都是刚起来到了某一个页面加载页面的时候出现的
只修改了 name 的字段之后,在跑第二台设备的时候,是一台 5C 设备,系统是 10.3.3,先跑起来了,然后出现了这个异常:
t = 8.19s Find the Application "com.xxx" 0x15e064c0
t = 8.19s Snapshot accessibility hierarchy for com.xxx
2017-09-11 15:23:11.219048+0800 XCTRunner[314:39254] XCTestWDSetup->start fastmonkey<-XCTestWDSetup
t = 13.78s Find the Any
t = 13.79s Use cached accessibility hierarchy for com.xxx
t = 13.79s Find: Descendants matching type Any
t = 13.80s Find: Element at index 0
t = 13.81s Find the Application "com.xxx" 0x15e064c0
t = 13.81s Use cached accessibility hierarchy for com.xxx
XCTRunner(314,0x3b7b1e40) malloc: *** mach_vm_map(size=1363546112) failed (error code=3)
*** error: can't allocate region
*** set a breakpoint in malloc_error_break to debug
2017-09-11 15:23:20.310614+0800 XCTRunner[314:39254] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '*** -[NSXPCEncoder checkObject:]: This coder only encodes objects that adopt NSSecureCoding (object is of class 'NSMallocBlock_').'
*** First throw call stack:
(0x1dfdbb3d 0x1d263067 0x1dfdba85 0x1e836ecd 0x1e836c2f 0x2cad7d 0x1e837421 0x1e837833 0x1e837597 0x1e837421 0x1ea1715f 0x1ea16883 0x1e836809 0x1dfdef63 0x1df07dc8 0x2da867 0x240dd8c 0x2445fe8 0x244606c 0x244526c 0x2444ad4 0x2443ed8 0x1d6b4067 0x1d6b8d77 0x1d6a9783 0x1d6add05 0x1df97d69 0x1df95e19 0x1dee91af 0x1dee8fd1 0x1e83daf5 0x1e88adb9 0x24040ac 0x2453644 0x24536b0 0x1dfe0354 0x1df042b9 0x2d06bd 0x311099 0x2d0295 0x30912b 0x2cffeb 0x2d0a39 0x2cdc23 0x2cd74b 0x2cd9bf 0x2cdc23 0x2cd74b 0x2cd9bf 0x2cdc23 0x2cd74b 0x2cd9bf 0x3160cb 0x2dc279 0x315f63 0x2b962b 0x30c439 0x1df97f15 0x1df97925 0x1df95f47 0x1dee91af 0x1dee8fd1 0x1f693b41 0x23271a53 0xf6fc5 0x1d6d64eb)
这个错误是代表有些区域获取结构的时候出现了异常吗?
跑多台设备的话,xcodebuild -project XCTestWD.xcodeproj -scheme XCTestWDUITests -destination 'platform=iOS,name=xxx' XCTESTWD_PORT=8001 clean test,还是用这个命令吗?这个 destination 将 name=xxx 修改成另一台设备的名字即可对吧?这个 port 需要做修改吗?
xcodebuild 设置不同的 deviceName 也不行,iproxy 8001 8001 serialid xxx 设置了之后,curl 运行之后提示 number of available devices == 2,不知道是哪里出错了,大神能不能说的更详细一些呢?
请问你用多台设备测试成功了吗?我这边用 xcodebuild 方式,在 iproxy 中添加了 serialid 之后,再通过 curl 会提示 number of avaible devices == 2,是因为 curl 中的内容填写的不正确吗?
代码很渣的不知道能不能学习一下。 邮箱:250637932@qq.com github 账号:zwdlp