gpt4 book ai didi

objective-c - appendBezierPathWithGlyph 在 [NSBezierPath currentPoint] 中失败

转载 作者:行者123 更新时间:2023-12-03 17:17:25 24 4
gpt4 key购买 nike

有人知道在什么情况下会发生这种情况吗?

GDB 输出:

0 .. 8:  kill, abort, objc_exception_throw etc.
9: 0x00007fff87ea21f4 in +[NSException raise:format:] ()
10: 0x00007fff8694e9e2 in -[NSBezierPath currentPoint] ()
11: 0x00007fff869e3b3b in __NSAppendBezierPathWithGlyphs ()
12: 0x00007fff869e5baf in -[NSBezierPath appendBezierPathWithGlyphs:count:inFont:]()
13: 0x00007fff869e2e2d in -[NSBezierPath appendBezierPathWithGlyph:inFont:] ()

最佳答案

objc_exception_throw 是抛出异常的函数。在这种情况下,有两件事需要查看:控制台日志(它将识别异常本身)和导致 objc_exception_throw 的调用堆栈。

在这种情况下,我可以仅从调用堆栈猜测异常是什么:如果路径没有当前点,则 currentPoint 将抛出。这是由 the documentation for the appendBezierPathWithGlyphs:count:inFont: method 支持的(以及 for the method you're directly calling ):

You must set the path's current point (using the moveToPoint: method or through the creation of a preceding line or curve segment) before you invoke this method.

关于objective-c - appendBezierPathWithGlyph 在 [NSBezierPath currentPoint] 中失败,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/2984776/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com