开发者

Application Crash - EXC_CRASH (SIGABRT) - iOS 4.3 - three20

I have included three20 library in my project. I am making use of the TTThumbsViewController. Everything was working great until i upgraded to Xcode 3.2.6 and iOS 4.3. The grid of photos appears fine, but as soon as i click on one the thumbs, the app crashes. I am certain that this is not a memory issue. It works fine on the simulator though. Here is the crash report :

Incident Identifier: 3C6395开发者_运维知识库6F-F718-468F-B113-116E457DEB4E

CrashReporter Key: 32180af33b999869f98369f8d85412b799a88fdb

Hardware Model: iPhone3,1

Process: MyApp [15071]

Path: /var/mobile/Applications/13C32157-F4CA-44BC-BB8F-D9A9FE9EAE38/MyApp.app/MyApp

Identifier: MyApp

Version: ??? (???)

Code Type: ARM (Native)

Parent Process: launchd [1]

Date/Time: 2011-05-06 21:48:06.042 -0500

OS Version: iPhone OS 4.3 (8F190)

Report Version: 104

Exception Type: EXC_CRASH (SIGABRT)

Exception Codes: 0x00000000, 0x00000000

Crashed Thread: 0

Thread 0 name: Dispatch queue: com.apple.main-thread

Thread 0 Crashed:

0 libsystem_kernel.dylib 0x00011a1c __pthread_kill + 8

1 libsystem_c.dylib 0x000333b4 pthread_kill + 52

2 libsystem_c.dylib 0x0002bbf8 abort + 72

3 libstdc++.6.dylib 0x00044a64 __gnu_cxx::__verbose_terminate_handler() + 376

4 libobjc.A.dylib 0x0000606c _objc_terminate + 104

5 libstdc++.6.dylib 0x00042e36 _cxxabiv1::_terminate(void (*)()) + 46

6 libstdc++.6.dylib 0x00042e8a std::terminate() + 10

7 libstdc++.6.dylib 0x00042f5a __cxa_throw + 78

8 libobjc.A.dylib 0x00004c84 objc_exception_throw + 64

9 CoreFoundation 0x0009e48a +[NSException raise:format:arguments:] + 62

10 CoreFoundation 0x0009e4c4 +[NSException raise:format:] + 28

11 QuartzCore 0x00001616 CALayerSetPosition(CALayer*, CA::Vec2 const&, bool) + 134

12 QuartzCore 0x00001584 -[CALayer setPosition:] + 32

13 QuartzCore 0x000014d0 -[CALayer setFrame:] + 384

14 UIKit 0x0000544e -[UIView(Geometry) setFrame:] + 182

15 MyApp 0x00078366 -[TTPhotoView layoutSubviews] (TTPhotoView.m:221)

16 UIKit 0x000055f4 -[UIView(CALayerDelegate) layoutSublayersOfLayer:] + 20

17 CoreFoundation 0x0000befc -[NSObject(NSObject) performSelector:withObject:] + 16

18 QuartzCore 0x00002bae -[CALayer layoutSublayers] + 114

Any ideas anyone ?

Thanks


The function CALayerSetPosition is throwing an exception of type NSException, and nobody is catching it, so your application is getting terminated. Try adding this code around the call to -[UIView(Geometry) setFrame:] inside the function -[TTPhotoView layoutSubviews] (which should be on line 221 of TTPhotoView.m):

@try
{
    [myUIView setFrame:someFrame];
}
@catch(NSException *exception)
{
    NSLog(@"Caught exception: %@", exception);
}

That should give you more information about why the exception is being thrown; most likely, you're passing an invalid parameter or something.


Yes..It was a NaN that was being passed. Basically if you use the constructor(MockPhotoSource class) which by default assigns a null value to the caption variable, it throws this exception. So i used the other constructor and gave a blank value to the caption parameter


I also just recently saw this exception and per what Adam said, I believe the problem is that a NaN is being passed in as a parameter and this is throwing the exception. If it's the same problem I was facing, I was able to comment the line out to just get around the problem (AFAICT the line is only dealing with the loading spinner progress indicator). So if you're willing to live w/o that, you can get around it

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜