ASIHTTPRequest 在 iOS 3.1.3 上崩溃

发布于 2024-11-27 18:09:39 字数 767 浏览 3 评论 0原文

当我调用 [[ASIHTTPRequest alloc] initWithURL:url]; 时,我的应用程序崩溃了在我的 iPod Touch 1G 上。在 iOS 4.x 上没有问题。

我看到的错误是 Error Domain=ASIHTTPRequestErrorDomain Code=10 UserInfo=0x368790 "NSRangeException"

并且我从我实现的崩溃管理器系统得到的回溯是

backtrace: (
"0   MayasDUp                            0x0007f21b -[SWCrashManager backtrace] + 18",
"1   MayasDUp                            0x0007ece1 sighandler + 144",
"2   libSystem.B.dylib                   0x3049e7eb _sigtramp + 26",
"3   MayasDUp                            0x0005128b -[ASIHTTPRequest buildPostBody] + 850"

我什至单独放置了 [[ASIHTTPRequest alloc] initWithURL:url] 调用,没有执行其他任何操作,例如设置后变量和启动连接。崩溃仍然发生。

我在 ASIHTTPRequest 中放置了断点并记录 NSLogs,但没有任何有用的结果。

有人遇到过类似的问题吗?

My application crashes as soon as I call [[ASIHTTPRequest alloc] initWithURL:url]; on my iPod Touch 1G. It has no issue on iOS 4.x.

The error I see is Error Domain=ASIHTTPRequestErrorDomain Code=10 UserInfo=0x368790 "NSRangeException"

and the backtrace I get from a crash manager system I have implemented is

backtrace: (
"0   MayasDUp                            0x0007f21b -[SWCrashManager backtrace] + 18",
"1   MayasDUp                            0x0007ece1 sighandler + 144",
"2   libSystem.B.dylib                   0x3049e7eb _sigtramp + 26",
"3   MayasDUp                            0x0005128b -[ASIHTTPRequest buildPostBody] + 850"

)

I even placed the [[ASIHTTPRequest alloc] initWithURL:url] call alone, without performing anything else like setting post variables and starting the connection. The crash still happens.

I've placed breakpoints and log NSLogs inside ASIHTTPRequest but nothing useful came out.

Has anyone had a similar issue?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

沉溺在你眼里的海 2024-12-04 18:09:39

经过一番挖掘,我发现这个问题很深,实际上是一个编译器错误。

简而言之,使用 LLVM 2.0 并设置 Optimization Level >该项目没有导致编译文件损坏(ASIHTTPRequest 和 ASIFormDataRequest),从而导致崩溃并且在堆栈跟踪中没有提供真实数据。

我们应用的解决方案是保持编译器和优化设置不变,并为有问题的 2 个 ASIHttp 文件添加 -O0 编译器标志。

其他用户报告 XCode 4.0.2 修复了编译器问题。

对于任何有兴趣的人,这里有一些详细信息:
http://groups.google.com/group/asihttprequest/browse_thread/thread/c598649bfe71643c/8ee09defd12386ba?lnk=gst&q=crashes#8ee09defd12386ba

After much digging, I found that the issue was very deep and it actually was a compiler bug.

In short, using LLVM 2.0 and setting Optimization Level > None for the project resulted in corrupted compiled files (ASIHTTPRequest and ASIFormDataRequest) which caused the crash and provided no real data in the stack trace.

The solution we applied was to leave Compiler and Optimization settings intact and add a -O0 compiler flag for the 2 ASIHttp files that had the issue.

Other users reported that XCode 4.0.2 fixed the compiler issue.

For anyone interested, there are some details here:
http://groups.google.com/group/asihttprequest/browse_thread/thread/c598649bfe71643c/8ee09defd12386ba?lnk=gst&q=crashes#8ee09defd12386ba

凉薄对峙 2024-12-04 18:09:39

您的主线程上可能有一些运行时间超过 10 秒的东西。你在做同步http请求吗? 必须使用: 。

[request startAsynchronous];

如果您在主线程上,则

You probably have something running on the main thread that is taking over 10 seconds. Are you doing synchronous http requests? You must use:

[request startAsynchronous];

if you're on the main thread.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文