Tencent / libpag

The official rendering library for PAG (Portable Animated Graphics) files that renders After Effects animations natively across multiple platforms.
https://pag.art
Other
4.73k stars 437 forks source link

iOS pag使用过程中捕捉到的崩溃 #2171

Open Amuxiaomu opened 2 months ago

Amuxiaomu commented 2 months ago

【版本信息】

4.3.47

【平台信息】

iOS 原生

【预期的表现】

【实际的情况】

捕捉到的崩溃信息: 1. Application threw exception NSInvalidArgumentException: -[NSURL length]: unrecognized selector sent to instance 0x2866081505 libpag 0x00000001084cd208 +[PAGFileImpl IsNetWorkPath:] + [PAGFileImpl.mm : 53] 累计影响用户数 1,147 累计错误次数 1,874

2. Attempted to dereference garbage pointer 0x8ace9a8d2310.1 libpag 0x00000001091414cc +[PAGFileImpl Load:size:path:] + [PAGFileImpl.mm : 93] 累计影响用户数 1,586 累计错误次数 2,084

3. 使用pag组件后 关联的类会报.cxx_destruct这种类型的崩溃 Attempted to dereference garbage pointer 0x4b5ebeb70.Originated at or in a subcall of std::__1::char_traits::eq(char, char)1 HelloPet 0x00000001058519c0 0x102354000 + 55564736

【Demo及附件】

kevingpqi123 commented 2 months ago

从 1、2 的 crash 信息中看,你们应该是传入了 NSURL,这个问题应该是必现的,pag 中所有和 path 相关的输入都是 NSString 类型的,没有 NSURL,建议你们排查下

至于问题 3, 堆栈信息太少,无法判断

Amuxiaomu commented 2 months ago

我们检查了一下,没有发现有传递NSURL类型的地址,我们在是在升级pag到4.3.45后就开始有这个问题了. 我们调用的方式一般有两种 1.这个地方的path有时候会传递本地path [self.pagView setPath:pagPath]; [self.pagView play];

2.这个地方一般都是网络地址的path,没有转换成NSURL [self.pagView setPathAsync:path completionBlock:^(PAGFile * file) { @strongify(self); [self.pagView play]; }];

Amuxiaomu commented 2 months ago

方便建个交流群么.好像也没有别的方式能联系到你们

kevingpqi123 commented 2 months ago

GitHub discussion 是我们唯一的对接渠道,由于人力有限,我们不支持实时对接,只对企业版用户进行实时对接 Application threw exception NSInvalidArgumentException: -[NSURL length]: unrecognized selector sent to instance 感觉你们没有认真排查,这里的报错信息显示传入的就是 NSURL 哈,这类问题是必现的,和机型没有任何关系

我本地就可以复现出这个 crash:

image image