开发者

TTURLRequest failing on adhoc release, but succeeding otherwise

I'm seeing the following crash on two different devices (an iphone 3g and an ipod touch) when in adhoc mode, although it seems to be OK when building in debug mode for those devices. It also seem开发者_运维百科s to be OK on iPhone 4's.

Here's the stack trace that I'm getting in ad hoc mode:

https://gist.github.com/af5ea32f2dacc795387e

From what I can tell, this stack trace is producing a recursive call to requestWithURL:delegate: - although it makes no such call in code:

///////////////////////////////////////////////////////////////////////////////////////////////////
+ (TTURLRequest*)requestWithURL:(NSString*)URL delegate:(id /*<TTURLRequestDelegate>*/)delegate {
  return [[[TTURLRequest alloc] initWithURL:URL delegate:delegate] autorelease];
}

So what's going on here? How can I debug this further?


From your stack trace (line 8) it looks like something is calling an undefined function

8   CoreFoundation                  0x000a5b28 -[NSObject(NSObject)    doesNotRecognizeSelector:] + 8
9   CoreFoundation                  0x0004ae00 ___forwarding___ + 500
10  CoreFoundation                  0x0004abb8 _CF_forwarding_prep_0 + 40
11  App                         0x0005684a +[TTURLRequest requestWithURL:delegate:] + 42
12  App                         0x00056840 +[TTURLRequest requestWithURL:delegate:] + 32

First add some print statements in to see which function call is the offender, use:

[object doesRespondToSelector:@selector(someFunction:withArg:)]

If it is not your code which is calling an undefined function make sure the arguments you are passing in are valid, print out the value of URL, and delegate to ensure they are are indeed of the expected type and value. Most importantly make sure that delegate does respond to whatever messages TTURLRequest will pass to it.

Also, is TTURLRequest your class, can you give the full definition, does it extend another class, does it define 'initWithURL'? Can we see the source? Those are important questions for anyone trying to debug your code.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜