iPodTouch Crash

984 views
Skip to first unread message

David Most

unread,
Apr 8, 2011, 5:10:39 PM4/8/11
to ASIHTTPRequest
Since this is my 1st post to the group, I should say "hi all", and esp. "Thanks Ben!".

I'm curious if anyone has seen the following crash:

ASI-HTTP-REQUEST crashes on an iPod touch (2nd generation) running iOS 4.2.1.
Requests only crash in RELEASE mode on this exact setup (device + iOS).
We can crash 2 devices.  Building in debug mode doesn't crash, nor does any other device / OS combo we've tried.  I have a pretty recent version: "pokeb-asi-http-request-d9bac03".

I'm making a simple async POST request.

In ASIHTTPRequest.m line 858, the code calls [self buildPostBody];
The code runs through to ASIFormDataRequest.m line 212 (last line of the buildPostBody method).
And ... upon returning from that method the app crashes; entire stack lost.
I assume something is overwriting stack memory; but don't see anything obvious.

Thanks,
Dave

David Most

unread,
Apr 8, 2011, 5:11:57 PM4/8/11
to ASIHTTPRequest
Nuts, I left out the most important part...
I'm building using xcode 4.0.1 & LLVM 2.0.

Matthew Berry

unread,
Apr 9, 2011, 6:10:31 AM4/9/11
to asihttp...@googlegroups.com, ASIHTTPRequest
Hi David:

I have had this issue in my app and I think it is an issue with the LLVM compiler and optimizations. To see if this is the case you can go into project settings and change the optimizations to None instead of the default Smallest, Fastest. See if the issue is gone. If so, I think your issue is the same as mine. Since I didn't want to release an app with no optimization I then wound up changing my compiler selection to LLVM + GCC 4.2 and this works with the original optimization setting. 

Regards,
Matthew
--
You received this message because you are subscribed to the Google Groups "ASIHTTPRequest" group.
To post to this group, send email to asihttp...@googlegroups.com.
To unsubscribe from this group, send email to asihttpreques...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/asihttprequest?hl=en.

Hal Mueller

unread,
Apr 9, 2011, 8:14:48 PM4/9/11
to asihttp...@googlegroups.com

You filed bugs on this, right? The compiler folks love reports on cases like this, and they are very responsive in my experience. 

Hal

David Most

unread,
Apr 11, 2011, 4:22:35 PM4/11/11
to ASIHTTPRequest
All,

I still need to perform additional debugging to determine if this issue occurs in the out-of-the-box ASI project, or if it's something that is my fault and/or exacerbated by the way I'm using this library.

It seems the issue is related to a know compiler issue:

I am able to prevent the crash by turning off optimization for the following 2 files:
ASIFormDataRequest.m
ASIHTTPRequest.m

Do this by selecting the target project, select the file in "Compile sources" section of the "Build Phases" tab; and add -O0 (capitol O zero).

If I can identify the specific code that is causing the issue, I'll send it to the llvm team.  As of now, I can not say definitively that this isn't my fault; though I strongly suspect it's not.

--Dave
Reply all
Reply to author
Forward
0 new messages