0

iPhone アプリがクラッシュし、次の警告が表示される

warning: Unable to restore previously selected frame.
Current language:  auto; currently objective-c
warning: Unable to restore previously selected frame.
warning: Unable to restore previously selected frame.
warning: Unable to restore previously selected frame.
warning: Unable to restore previously selected frame.
warning: Unable to restore previously selected frame.
warning: Unable to restore previously selected frame.
warning: Unable to restore previously selected frame.

実際にクラッシュするコードは次のとおりです

+(id) tbxmlWithURL:(NSURL*)aURL;{
    return [[TBXML alloc] initWithURL:aURL];
}


-(id)initWithURL:(NSURL*)aURL{
    return [self initWithURL:aURL];
}
4

1 に答える 1

2

あなたの-initWithURL:メソッドは再帰的に自分自身を呼び出しています。そのたびにスタック フレームが追加され、最終的にはスタック スペースが不足してクラッシュします。通常、このような場合、デバッガーはあまり有用な情報を提供しません。

これのことですか?

-(id)initWithURL:(NSURL*)aURL{
    return [super initWithURL:aURL];
}
于 2012-03-11T05:02:33.290 に答える