TableView creates Zombie from ARC autorelease - objective-c

I have a table inside of another table. I can add cells to both the "supertable" and "subtable" with no problem - they'll display, scroll, etc. However, when I try to interact with the "subtable" (select one of its textfields for editing) the program crashes. I ran the zombies tool on the program and it backtraced the crash to this code (I am using ARC):
- (UITableViewCell *) tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath
{
if (saveTheTable == nil) saveTheTable = tableView;
static NSString *licenseCellId = #"licenseID";
UINib *nib = [UINib nibWithNibName:#"LicenseCell" bundle:nil];
[tableView registerNib:nib forCellReuseIdentifier:licenseCellId];
//This line causes the crash
LicenseCell *cell = [tableView dequeueReusableCellWithIdentifier:licenseCellId];
cell.delegate = self;
[licenseFields replaceObjectAtIndex:indexPath.row withObject:cell];
return cell;
}
The responsible caller is the UITextField. It seems that the "subtable" is being dealloc'd by an autoreleasepool drain. Why would this be and how can I fix it? I tried storing strong references to the cells.
-Edit- Maybe the backtrace will help
* thread #1: tid = 0x1f03, 0x017a309b libobjc.A.dylib`objc_msgSend + 15, stop reason = EXC_BAD_ACCESS (code=2, address=0x8)
frame #0: 0x017a309b libobjc.A.dylib`objc_msgSend + 15
frame #1: 0x003c7c7e UIKit`-[UITextField canBecomeFirstResponder] + 167
frame #2: 0x00405fe7 UIKit`-[UIResponder becomeFirstResponder] + 179
frame #3: 0x005e58fb UIKit`-[UITextInteractionAssistant setFirstResponderIfNecessary] + 208
frame #4: 0x005e75f8 UIKit`-[UITextInteractionAssistant oneFingerTap:] + 1989
frame #5: 0x005dfe29 UIKit`_UIGestureRecognizerSendActions + 143
frame #6: 0x005df133 UIKit`-[UIGestureRecognizer _updateGestureWithEvent:] + 379
frame #7: 0x005e03bf UIKit`-[UIGestureRecognizer _delayedUpdateGesture] + 46
frame #8: 0x005e2a21 UIKit`___UIGestureRecognizerUpdate_block_invoke_0541 + 57
frame #9: 0x005e297c UIKit`_UIGestureRecognizerApplyBlocksToArray + 277
frame #10: 0x005db3d7 UIKit`_UIGestureRecognizerUpdate + 1026
frame #11: 0x003401a2 UIKit`-[UIWindow _sendGesturesForEvent:] + 1121
frame #12: 0x00340532 UIKit`-[UIWindow sendEvent:] + 93
frame #13: 0x00326dc4 UIKit`-[UIApplication sendEvent:] + 464
frame #14: 0x0031a634 UIKit`_UIApplicationHandleEvent + 8196
frame #15: 0x01f9aef5 GraphicsServices`PurpleEventCallback + 1274
frame #16: 0x012b3195 CoreFoundation`__CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE1_PERFORM_FUNCTION__ + 53
frame #17: 0x01217ff2 CoreFoundation`__CFRunLoopDoSource1 + 146
frame #18: 0x012168da CoreFoundation`__CFRunLoopRun + 2218
frame #19: 0x01215d84 CoreFoundation`CFRunLoopRunSpecific + 212
frame #20: 0x01215c9b CoreFoundation`CFRunLoopRunInMode + 123
frame #21: 0x01f997d8 GraphicsServices`GSEventRunModal + 190
frame #22: 0x01f9988a GraphicsServices`GSEventRun + 103
frame #23: 0x00318626 UIKit`UIApplicationMain + 1163
frame #24: 0x0000274d trainingAttendance`main + 141 at main.m:16
frame #25: 0x000026b5 trainingAttendance`start + 53

It turns out that, like phix23 said, the problem was with the registernib command. Here's the new cellForRowAtIndexPath method:
- (UITableViewCell *) tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath
{
if (saveTheTable == nil) saveTheTable = tableView;
static NSString *licenseCellId = #"licenseID";
LicenseCell *cell = (LicenseCell *)[tableView dequeueReusableCellWithIdentifier:licenseCellId];
if( cell == nil ) {
NSArray *nib = [[NSBundle mainBundle] loadNibNamed:#"LicenseCell" owner:self options:nil];
cell = (LicenseCell *)[nib objectAtIndex:0];
}
cell.delegate = self;
[licenseFields replaceObjectAtIndex:indexPath.row withObject:cell];
if (nibRetainer == nil) nibRetainer = [[NSMutableArray alloc] initWithObjects:cell, nil];
else [nibRetainer addObject:cell];
return cell;
}

Related

iOS8 app getting crash while opening popover

This is the code that I have written and it is in the method when the user selects the popover:
- (IBAction) onSelectingDefect:(id)sender
{
if ([description isFirstResponder]) {
[self hideKeyBoard];
return;
}
UIButton *button = (UIButton*)(sender);
UIButton *doneSelectingStatusButton = [UIButton buttonWithType:UIButtonTypeCustom];
doneSelectingStatusButton.frame = CGRectMake(85, 223, 149, 32);
[doneSelectingStatusButton setTintColor:[UIColor blackColor]];
[doneSelectingStatusButton setTitle:#"Done" forState:UIControlStateNormal];
[doneSelectingStatusButton setTitleColor:[UIColor blackColor] forState:UIControlStateNormal];
[doneSelectingStatusButton setBackgroundImage:[UIImage imageNamed:#"cancel_button02.png"] forState:UIControlStateNormal];
[doneSelectingStatusButton addTarget:self action:#selector(onPickerSelection:) forControlEvents:UIControlEventTouchUpInside];
UIPickerView *pickerView = [[UIPickerView alloc] initWithFrame:CGRectMake(0, 0, 320, 216)];
pickerView.showsSelectionIndicator = YES;
pickerView.delegate = self;
pickerView.dataSource = self;
BOOL isNill = TRUE;
int i;
for(i=0; i<[tableData count]; i++)
{
if([selectedPickerText isEqualToString:[tableData objectAtIndex:i]])
{
isNill = FALSE;
break;
}
}
if(isNill)
{
[pickerView selectRow:0 inComponent:0 animated:YES]; //Orig
//self.selectedPickerText = [tableData objectAtIndex:0];
self.selectedPickerText = [tableData objectAtIndex:0];
}
else
[pickerView selectRow:i inComponent:0 animated:YES];//Orig
UIView *containerView = [[UIView alloc] initWithFrame:CGRectMake(0,0, 320, 255)];
[containerView addSubview:doneSelectingStatusButton];
[containerView addSubview:pickerView];
UIViewController *pickerViewController = [[UIViewController alloc] init];
CGRect myRect = button.frame;
myRect.origin.x += 10;
myRect.origin.y += 10;
selectionPopover = [[UIPopoverController alloc] initWithContentViewController:pickerViewController];
((AppDelegate*) [UIApplication sharedApplication].delegate).secondPopOver = selectionPopover;
selectionPopover.delegate =self;
selectionPopover.popoverContentSize = CGSizeMake(320, 255);
[selectionPopover presentPopoverFromRect:selectDefect.frame inView:self.view permittedArrowDirections:UIPopoverArrowDirectionAny animated:YES]; //Error iOS8
pickerViewController.view = containerView;
[containerView release];
[pickerView release];
[pickerViewController release];
}
This is the error I am geting:
2014-11-04 20:01:30.740 Service360[447:5288] -[UITextField length]: unrecognized selector sent to instance 0x7f0d6520
2014-11-04 20:01:30.743 Service360[447:5288] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[UITextField length]: unrecognized selector sent to instance 0x7f0d6520'
*** First throw call stack:
(
0 CoreFoundation 0x0321f946 __exceptionPreprocess + 182
1 libobjc.A.dylib 0x02d01a97 objc_exception_throw + 44
2 CoreFoundation 0x032275c5 -[NSObject(NSObject) doesNotRecognizeSelector:] + 277
3 CoreFoundation 0x031703e7 ___forwarding___ + 1047
4 CoreFoundation 0x0316ffae _CF_forwarding_prep_0 + 14
5 CoreFoundation 0x03108d26 CFStringAppend + 374
6 CoreFoundation 0x0310684a __CFStringAppendFormatCore + 11754
7 CoreFoundation 0x031fc5f5 _CFStringCreateWithFormatAndArgumentsAux2 + 245
8 Foundation 0x028b7697 -[NSPlaceholderString initWithFormat:locale:arguments:] + 159
9 Foundation 0x028baf42 +[NSString stringWithFormat:] + 89
10 UIKit 0x0183dd34 -[UIViewController _presentViewController:withAnimationController:completion:] + 2825
11 UIKit 0x018405d2 __62-[UIViewController presentViewController:animated:completion:]_block_invoke + 345
12 UIKit 0x01840424 -[UIViewController presentViewController:animated:completion:] + 224
13 UIKit 0x01db0791 -[UIPopoverController _presentShimmedPopoverFromRect:inView:permittedArrowDirections:animated:] + 217
14 UIKit 0x01db0991 -[UIPopoverController presentPopoverFromRect:inView:permittedArrowDirections:animated:] + 355
15 Service360 0x00369b52 -[POVendorFeedbackViewController onSelectingDefect:] + 2770
16 libobjc.A.dylib 0x02d177cd -[NSObject performSelector:withObject:withObject:] + 84
17 UIKit 0x016da23d -[UIApplication sendAction:to:from:forEvent:] + 99
18 UIKit 0x016da1cf -[UIApplication sendAction:toTarget:fromSender:forEvent:] + 64
19 UIKit 0x0180de86 -[UIControl sendAction:to:forEvent:] + 69
20 UIKit 0x0180e2a3 -[UIControl _sendActionsForEvents:withEvent:] + 598
21 UIKit 0x0180d50d -[UIControl touchesEnded:withEvent:] + 660
22 UIKit 0x0172a60a -[UIWindow _sendTouchesForEvent:] + 874
23 UIKit 0x0172b0e5 -[UIWindow sendEvent:] + 791
24 UIKit 0x016f0549 -[UIApplication sendEvent:] + 242
25 Service360 0x00068f22 -[MyApplication sendEvent:] + 178
26 UIKit 0x0170037e _UIApplicationHandleEventFromQueueEvent + 20690
27 UIKit 0x016d4b19 _UIApplicationHandleEventQueue + 2206
28 CoreFoundation 0x031431df __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 15
29 CoreFoundation 0x03138ced __CFRunLoopDoSources0 + 253
30 CoreFoundation 0x03138248 __CFRunLoopRun + 952
31 CoreFoundation 0x03137bcb CFRunLoopRunSpecific + 443
32 CoreFoundation 0x031379fb CFRunLoopRunInMode + 123
33 GraphicsServices 0x044b424f GSEventRunModal + 192
34 GraphicsServices 0x044b408c GSEventRun + 104
35 UIKit 0x016d88b6 UIApplicationMain + 1526
36 Service360 0x0006793f main + 159
37 libdyld.dylib 0x077a7ac9 start + 1
)
libc++abi.dylib: terminating with uncaught exception of type NSException
THe line which is causing the app to crash is:
[selectionPopover presentPopoverFromRect:selectDefect.frame inView:self.view permittedArrowDirections:UIPopoverArrowDirectionAny animated:YES]; //Error iOS8
What can be the issue which is causing this error. The app works fine in earlier or previous releases of iOS.
Can you pls help me?
Thanks
As of ios8 you need a UIPopoverPresentationController For the popovercontroller.
if ( NSClassFromString(#"UIPopoverPresentationController") ) {
selectionPopover.popoverPresentationController.sourceView = button; //view the popover arrow points to...
}
/// then present popover...

Thread 1 signal SIGABRT

I am doing a project for CodeSchool which requires you to import information from the AFNetworking database. I have done all of that and there are no errors in my code, but when I debug it and click the ProfileViewController I get the Thread 1 signal SIGABRT.
Here is the code in the ProfileViewController.m:
#import "ProfileViewController.h"
#import "UIKit+AFNetworking/UIImageView+AFNetworking.h"
#interface ProfileViewController ()
#end
#implementation ProfileViewController
- (id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil
{
self = [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil];
if (self) {
self.title = #"Profile";
self.tabBarItem.image = [UIImage imageNamed:#"tab_icon_profile"];
}
return self;
}
- (void)viewDidLoad
{
[super viewDidLoad];
self.scrollView =[[UIScrollView alloc] initWithFrame:self.view.bounds];
self.scrollView.contentSize = CGSizeMake(320, 480);
self.scrollView.autoresizingMask = (UIViewAutoresizingFlexibleHeight| UIViewAutoresizingFlexibleWidth);
self.view.backgroundColor = [UIColor darkGrayColor];
UIImageView *bigBirdView = [[UIImageView alloc] init];
bigBirdView.frame = CGRectMake(20, 20, 100, 114);
[bigBirdView setImageWithURL:[NSURL URLWithString:#"http://images3.wikia.nocookie.net/__cb20100901224145/muppet/images/f/f8/Big-bird-NEW.jpg"] placeholderImage:[UIImage imageNamed:#"placeholder.png"]];
[self.scrollView addSubview:bigBirdView];
UILabel *nameLabel = [[UILabel alloc] initWithFrame:CGRectMake(20, 140, 280, 40)];
[nameLabel setBackgroundColor:[UIColor clearColor]];
[nameLabel setTextColor:[UIColor whiteColor]];
nameLabel.text = #"Name: Big Bird";
[self.scrollView addSubview:nameLabel];
UILabel *cityLabel = [[UILabel alloc] initWithFrame:CGRectMake(20, 200, 280, 40)];
[cityLabel setBackgroundColor:[UIColor clearColor]];
[cityLabel setTextColor:[UIColor whiteColor]];
cityLabel.text = #"From: Sesame Street";
[self.scrollView addSubview:cityLabel];
UITextView *biography= [[UITextView alloc] initWithFrame:CGRectMake(12, 260, 200, 200)];
[biography setBackgroundColor:[UIColor clearColor]];
biography.font = [UIFont fontWithName:#"Helvetica" size:15];
[biography setTextColor:[UIColor whiteColor]];
biography.editable = NO;
biography.text = #"Big Bird likes long walks on the beach, hanging with friends, and singing songs about various subjects. Big Bird is also really into organic bird seed.";
[self.scrollView addSubview:biography];
UILabel *memberSince = [[UILabel alloc] initWithFrame:CGRectMake(20, 400, 280, 40)];
[memberSince setBackgroundColor:[UIColor clearColor]];
[memberSince setTextColor:[UIColor whiteColor]];
memberSince.text = #"Member Since: 1969";
[self.scrollView addSubview:memberSince];
[self.view addSubview:self.scrollView];
}
- (void)didReceiveMemoryWarning
{
[super didReceiveMemoryWarning];
// Dispose of any resources that can be recreated.
}
#end
and here is the entire error, including the bt on the lldl:
(lldb) bt
* thread #1: tid = 0x28a71, 0x05b6fa6a libsystem_kernel.dylib`__pthread_kill + 10, queue = 'com.apple.main-thread, stop reason = signal SIGABRT
frame #0: 0x05b6fa6a libsystem_kernel.dylib`__pthread_kill + 10
frame #1: 0x05a2bb2f libsystem_c.dylib`pthread_kill + 101
frame #2: 0x057b2e12 libsystem_sim_c.dylib`abort + 127
frame #3: 0x055a69f9 libc++abi.dylib`abort_message + 105
frame #4: 0x055c76ab libc++abi.dylib`default_terminate_handler() + 292
frame #5: 0x014beb64 libobjc.A.dylib`_objc_terminate() + 108
frame #6: 0x055c4f60 libc++abi.dylib`std::__terminate(void (*)()) + 14
frame #7: 0x055c497d libc++abi.dylib`__cxa_throw + 116
frame #8: 0x014be9cd libobjc.A.dylib`objc_exception_throw + 323
frame #9: 0x023fd903 CoreFoundation`-[NSObject(NSObject) doesNotRecognizeSelector:] + 275
frame #10: 0x0235090b CoreFoundation`___forwarding___ + 1019
frame #11: 0x023504ee CoreFoundation`_CF_forwarding_prep_0 + 14
frame #12: 0x0000415c InstaPhoto`-[ProfileViewController viewDidLoad](self=0x0899ef40, _cmd=0x007b1d27) + 1260 at ProfileViewController.m:39
frame #13: 0x001379a8 UIKit`-[UIViewController loadViewIfRequired] + 696
frame #14: 0x0015d1a5 UIKit`-[UINavigationController _layoutViewController:] + 39
frame #15: 0x0015d6bb UIKit`-[UINavigationController _updateScrollViewFromViewController:toViewController:] + 235
frame #16: 0x0015d7b3 UIKit`-[UINavigationController _startTransition:fromViewController:toViewController:] + 78
frame #17: 0x0015e72c UIKit`-[UINavigationController _startDeferredTransitionIfNeeded:] + 645
frame #18: 0x0015f349 UIKit`-[UINavigationController __viewWillLayoutSubviews] + 57
frame #19: 0x0029839d UIKit`-[UILayoutContainerView layoutSubviews] + 213
frame #20: 0x0008edd7 UIKit`-[UIView(CALayerDelegate) layoutSublayersOfLayer:] + 355
frame #21: 0x014d081f libobjc.A.dylib`-[NSObject performSelector:withObject:] + 70
frame #22: 0x029fc72a QuartzCore`-[CALayer layoutSublayers] + 148
frame #23: 0x029f0514 QuartzCore`CA::Layer::layout_if_needed(CA::Transaction*) + 380
frame #24: 0x029f0380 QuartzCore`CA::Layer::layout_and_display_if_needed(CA::Transaction*) + 26
frame #25: 0x02958156 QuartzCore`CA::Context::commit_transaction(CA::Transaction*) + 294
frame #26: 0x029594e1 QuartzCore`CA::Transaction::commit() + 393
frame #27: 0x02a15870 QuartzCore`+[CATransaction flush] + 52
frame #28: 0x00040979 UIKit`_afterCACommitHandler + 131
frame #29: 0x0232853e CoreFoundation`__CFRUNLOOP_IS_CALLING_OUT_TO_AN_OBSERVER_CALLBACK_FUNCTION__ + 30
frame #30: 0x0232848f CoreFoundation`__CFRunLoopDoObservers + 399
frame #31: 0x023063b4 CoreFoundation`__CFRunLoopRun + 1076
frame #32: 0x02305b33 CoreFoundation`CFRunLoopRunSpecific + 467
frame #33: 0x0230594b CoreFoundation`CFRunLoopRunInMode + 123
frame #34: 0x022bc9d7 GraphicsServices`GSEventRunModal + 192
frame #35: 0x022bc7fe GraphicsServices`GSEventRun + 104
frame #36: 0x0002494b UIKit`UIApplicationMain + 1225
frame #37: 0x00001add InstaPhoto`main(argc=1, argv=0xbfffee84) + 141 at main.m:16
(lldb)
Your problem is at ProfileViewController.m line 39:
frame #12: 0x0000415c InstaPhoto`- [ProfileViewController viewDidLoad](self=0x0899ef40, _cmd=0x007b1d27) + 1260 at ProfileViewController.m:39
The doesNotRecognizeSelector exception being thrown:
frame #9: 0x023fd903 CoreFoundation`-[NSObject(NSObject) doesNotRecognizeSelector:] + 275
... indicates that an unimplemented method is being called.
I also suspect on following code,
UIImageView *bigBirdView = [[UIImageView alloc] init];
bigBirdView.frame = CGRectMake(20, 20, 100, 114);
[bigBirdView setImageWithURL:[NSURL URLWithString:#"http://images3.wikia.nocookie.net/__cb20100901224145/muppet/images/f/f8/Big-bird-NEW.jpg"] placeholderImage:[UIImage imageNamed:#"placeholder.png"]];
[self.scrollView addSubview:bigBirdView];
1st)- their is not any method available in UIImageview like setImageWithURL:placeholderImage. Read documentation of UIImageview
2nd) - why you downloading image on main thread using following line,
[bigBirdView setImageWithURL:[NSURL URLWithString:#"http://images3.wikia.nocookie.net/__cb20100901224145/muppet/images/f/f8/Big-bird-NEW.jpg"] placeholderImage:[UIImage imageNamed:#"placeholder.png"]];
download your image asynchronously using NSURLConnection delegate/block method yeah using GCD.

Blocks / dispatch_async: what is wrong with my simple code?

I tried to modify a simple CS193P iTunes U example/homework that just displays a UIImage inside a UIScrollView. I'm new to Obj-C blocks.
As soon as I try to wrap the line of code that downloads the Image inside a *dispatch_async* Block I break the zooming and get a
Uncaught exception: CALayer position contains NaN: [nan nan]
(showing the image and "scrolling" works, though)
- (void)viewDidAppear:(BOOL)animated
{
[super viewDidAppear:animated];
[self.activityIndicatorView startAnimating];
[self resetImage];
}
- (void)resetImage
{
if (self.detailItem && self.scrollView) {
//reset
self.scrollView.contentSize = CGSizeZero;
self.imageView.image = nil;
NSURL *imageURL = [FlickrFetcher urlForPhoto:self.detailItem format:FlickrPhotoFormatLarge];
__block NSData *imageData;
dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0), ^{
imageData = [[NSData alloc] initWithContentsOfURL:imageURL];
dispatch_async(dispatch_get_main_queue(), ^{ //because of UI Stuff
UIImage *image = [[UIImage alloc] initWithData:imageData];
if (image) {
[self.activityIndicatorView stopAnimating];
[self.activityIndicatorView removeFromSuperview];
self.scrollView.zoomScale = 1.0;
self.scrollView.contentSize = image.size;
self.imageView.image = image;
CGRect frame = { CGPointZero , image.size };
self.imageView.frame = frame;
[self addToRecentPhotosList:self.detailItem];
NSLog(#"\n self.imageView.frame:%# \n self.imageView.bounds: %# \n self.scrollView.contentSize: %# \n self.scrollView.frame: %# \n self.scrollView.bounds: %# ", NSStringFromCGRect(self.imageView.frame), NSStringFromCGRect(self.imageView.bounds), NSStringFromCGSize(self.scrollView.contentSize), NSStringFromCGRect(self.scrollView.frame), NSStringFromCGRect(self.scrollView.bounds));
}
});
});
}
}
- (void)viewDidLoad
{
[super viewDidLoad];
[self.scrollView addSubview:self.imageView];
[self.scrollView addSubview:self.activityIndicatorView];
self.scrollView.minimumZoomScale = 0.2;
self.scrollView.maximumZoomScale = 5.0;
self.scrollView.delegate = self;
}
- (void)viewDidLayoutSubviews
{
[super viewDidLayoutSubviews];
if (self.imageView.image) [self.scrollView zoomToRect:self.imageView.bounds animated:YES];
else self.activityIndicatorView.center = self.view.center;
}
- (UIView *)viewForZoomingInScrollView:(UIScrollView *)scrollView
{
return self.imageView;
}
logged frames/bounds:
without dispatch_async blocks:
self.imageView.frame: {{0, 0}, {1024, 768}}
self.imageView.bounds: {{0, 0}, {1024, 768}}
with dispatch_async blocks:
self.imageView.frame: {{-7.62939e-06, -1.52588e-05}, {1024, 768}}
self.imageView.bounds: {{0, 0}, {204.8, 153.6}}
self.scrollView.contentSize: {1024, 768}
self.scrollView.frame: {{0, 0}, {320, 367}}
self.scrollView.bounds: {{0, 0}, {320, 367}}
Stack trace:
0 CoreFoundation 0x01ca002e __exceptionPreprocess + 206
1 libobjc.A.dylib 0x010dde7e objc_exception_throw + 44
2 CoreFoundation 0x01c9fdeb +[NSException raise:format:] + 139
3 QuartzCore 0x02293e0b _ZN2CA5Layer12set_positionERKNS_4Vec2IdEEb + 151
4 QuartzCore 0x0229eba1 -[CALayer(CALayerPrivate) setDoublePosition:] + 81
5 UIKit 0x000874a2 -[UIScrollView setZoomScale:withAnchorPoint:validatingScrollOffset:allowRubberbanding:animated:duration:notifyDelegate:force:] + 1476
6 UIKit 0x00083004 -[UIScrollView _updatePinchGestureForState:] + 3499
7 UIKit 0x00083960 -[UIScrollView handlePinch:] + 59
8 UIKit 0x002ec85a _UIGestureRecognizerSendActions + 139
9 UIKit 0x002eb99b -[UIGestureRecognizer _updateGestureWithEvent:] + 333
10 UIKit 0x002ed0df -[UIGestureRecognizer _delayedUpdateGesture] + 46
11 UIKit 0x002efd2d ___UIGestureRecognizerUpdate_block_invoke_0543 + 57
12 UIKit 0x002efcac _UIGestureRecognizerRemoveObjectsFromArrayAndApplyBlocks + 331
13 UIKit 0x002e7a28 _UIGestureRecognizerUpdate + 1348
14 UIKit 0x00054972 -[UIWindow _sendGesturesForEvent:] + 1283
15 UIKit 0x00054e53 -[UIWindow sendEvent:] + 98
16 UIKit 0x00032d4a -[UIApplication sendEvent:] + 436
17 UIKit 0x00024698 _UIApplicationHandleEvent + 9874
18 GraphicsServices 0x01bfbdf9 _PurpleEventCallback + 339
19 GraphicsServices 0x01bfbad0 PurpleEventCallback + 46
20 CoreFoundation 0x01c15bf5 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE1_PERFORM_FUNCTION__ + 53
21 CoreFoundation 0x01c15962 __CFRunLoopDoSource1 + 146
22 CoreFoundation 0x01c46bb6 __CFRunLoopRun + 2118
23 CoreFoundation 0x01c45f44 CFRunLoopRunSpecific + 276
24 CoreFoundation 0x01c45e1b CFRunLoopRunInMode + 123
25 GraphicsServices 0x01bfa7e3 GSEventRunModal + 88
26 GraphicsServices 0x01bfa668 GSEventRun + 104
27 UIKit 0x00021ffc UIApplicationMain + 1211
28 CS193P.4.SPoT 0x00002b84 main + 164
29 CS193P.4.SPoT 0x00002a95 start + 53
maybe, it'd be a good idea to synchronise threads each other first of all, if you want to use an object on a thread which is created on another thread. it would not be an award-winning idea to start to use the imageData before it is ready to use.
// ...
dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0), ^{
dispatch_semaphore_t _semaphore = dispatch_semaphore_create(0);
imageData = [[NSData alloc] initWithContentsOfURL:imageURL];
dispatch_semaphore_signal(_semaphore);
dispatch_async(dispatch_get_main_queue(), ^{ //because of UI Stuff
dispatch_semaphore_wait(_semaphore, DISPATCH_TIME_FOREVER);
dispatch_release(_semaphore);
UIImage *image = [[UIImage alloc] initWithData:imageData];
// etc...
};
};
// ...
UPDATE
try this solution as well, it works as well as the GCD version should have.
SPoTDetailViewController.h
#interface SPoTImageViewController : UIViewController <UISplitViewControllerDelegate, UIScrollViewDelegate> {
dispatch_semaphore_t _semaphore;
__block NSData *imageData;
}
// ...
#end
SPoTDetailViewController.m
- (void)resetImage
{
// Update the user interface for the detail item.
[self.activityIndicatorView startAnimating];
if (self.detailItem && self.scrollView) {
self.scrollView.contentSize = CGSizeZero;
self.imageView.image = nil;
[self performSelectorInBackground:#selector(downloadImageDataOnBackgroundThread) withObject:nil];
dispatch_semaphore_wait(_semaphore, DISPATCH_TIME_FOREVER);
// dispatch_release(_semaphore);
UIImage *image = [[UIImage alloc] initWithData:imageData];
if (image) {
[_activityIndicatorView stopAnimating];
_scrollView.zoomScale = 1.0;
_scrollView.contentSize = image.size;
_imageView.image = image;
CGRect frame = { CGPointZero , image.size };
NSLog(#"\n new CGRect frame:%# \n ", NSStringFromCGRect(frame));
_imageView.frame = frame;
NSLog(#"\n self.imageView.frame:%# \n self.imageView.bounds: %#", NSStringFromCGRect(self.imageView.frame), NSStringFromCGRect(self.imageView.bounds));
}
}
}
- (void)downloadImageDataOnBackgroundThread {
_semaphore = dispatch_semaphore_create(0);
NSURL *imageURL = [FlickrFetcher urlForPhoto:self.detailItem format:FlickrPhotoFormatLarge];
imageData = [[NSData alloc] initWithContentsOfURL:imageURL];
dispatch_semaphore_signal(_semaphore);
}

UIImagePickerControllerDelegate on iPad on iOS4 crashes (works fine in iOS5)

I have a problem where accessing the photo library triggers a crash AFTER I have selected the photo.
The log output is:
[GEPhotoControllerPopOver respondsToSelector:]: message sent to deallocated instance 0x239fbf40
The crash occurs in Main with no call stack. I only get the above error in the log if I run with Guard Malloc.
GEPhotoControllerPopOver is my Photo Library popover. It seems like something is trying to access it after it is deallocated, but for the life of me I can't figure out what. I set breakpoints in every piece of code that calls GEPhotoControllerPopover and none of it is called after GEPhotoControllerPopover is released.
It is declared like so:
#interface GEPhotoControllerPopOver : UIViewController < UINavigationControllerDelegate,
UIImagePickerControllerDelegate,
UIPopoverControllerDelegate
>
{
char* m_pPixelData;
int m_photoWidth;
int m_photoHeight;
int m_bytesPerPixel;
GEClient *m_pClient;
int m_longEdge;
UIImage* m_pLevelFrame;
UIImageView* m_pLevelFrameView;
UIPopoverController *m_pPopoverController;
}
- (void)UseImage:(UIImage*)theImage:(UIImagePickerController *)picker;
#end
The code to get the image from the photo library is:
extern UIView *g_glView;
#implementation GEPhotoControllerPopOver
- (id)init
{
return [super init];
}
- (void)loadView
{
[super loadView];
}
- (void)dealloc
{
[super dealloc];
}
- (void)SelectPhoto
{
if( [UIImagePickerController isSourceTypeAvailable:UIImagePickerControllerSourceTypePhotoLibrary ] )
{
self.view = g_glView;
UIImagePickerController *pImagePicker;
pImagePicker = [[UIImagePickerController alloc] init];
pImagePicker.sourceType = UIImagePickerControllerSourceTypePhotoLibrary;
pImagePicker.delegate = self;
pImagePicker.mediaTypes = [NSArray arrayWithObjects:(NSString *) kUTTypeImage, nil];
pImagePicker.allowsEditing = NO;
m_pPopoverController = [[UIPopoverController alloc] initWithContentViewController:pImagePicker];
m_pPopoverController.delegate = self;
[m_pPopoverController setPopoverContentSize:CGSizeMake(160,160) animated:YES];
CGRect selectedRect = CGRectMake(0,0,1,1);
[m_pPopoverController presentPopoverFromRect:selectedRect inView:self.view permittedArrowDirections:UIPopoverArrowDirectionAny animated:YES];
[pImagePicker release];
}
}
-(void)imagePickerController:(UIImagePickerController *)picker didFinishPickingMediaWithInfo:(NSDictionary *)info
{
[m_pPopoverController dismissPopoverAnimated:true];
[m_pPopoverController release];
m_pPopoverController = nil;
NSString *mediaType = [info objectForKey:UIImagePickerControllerMediaType];
[self dismissModalViewControllerAnimated:YES];
if ([mediaType isEqualToString:(NSString *)kUTTypeImage]) {
UIImage *picture = [info objectForKey:UIImagePickerControllerOriginalImage];
[self UseImage:picture:picker];
}
}
I don't think I am doing anything too crazy. I am passing the image data to the rest of my code in UseImage, where I make a copy of it so I am not pointing to the same memory.
I then deallocate GEPhotoControllerPopOver and never call it again. Unfortunately a few frames later and the above error occurs. Only on iPad on iOS4.3. It works great on iPhone (different interface object) and on iPad with iOS3.x and iOS5.x
Anyone have any ideas?
Thanks!
EDIT - It appears that removing the call to [super dealloc] makes the problem go away. Obviously not the best solution but maybe will help in figuring out what is happening?
I also stepped through the all my code to try and figure out where it is crashing to no avail. It dismisses the popover, goes through a full rendering cycle, finished the draw cycle, then crashes deep in assembly.
EDIT 2 - The following code no longer crashes on iOS4, but leaks both 32k and 128k of memory.
32K leak:
0 libsystem_c.dylib calloc
1 MusicLibrary MemNewPtrClear
2 MusicLibrary ReadITImageDB
3 MusicLibrary -[MLPhotoLibrary _loadImageLibrary]
4 MusicLibrary -[MLPhotoLibrary albums]
5 PhotoLibrary -[PLPhotoLibrary albums]
6 PhotoLibrary -[PLPhotoLibrary imagePickerAlbums]
7 PhotoLibrary -[PLPhotoLibrary(Utilities) albumsForContentMode:]
8 PhotoLibrary -[PLLibraryViewController _updateAlbumsIfNecessary]
9 PhotoLibrary -[PLLibraryViewController viewWillAppear:]
10 PhotoLibrary -[PLUILibraryViewController viewWillAppear:]
11 UIKit -[UINavigationController _startTransition:fromViewController:toViewController:]
12 UIKit -[UINavigationController _startDeferredTransitionIfNeeded]
13 UIKit -[UILayoutContainerView layoutSubviews]
14 QuartzCore -[CALayer layoutSublayers]
15 QuartzCore CALayerLayoutIfNeeded
16 QuartzCore CA::Context::commit_transaction(CA::Transaction*)
17 QuartzCore CA::Transaction::commit()
18 QuartzCore CA::Transaction::observer_callback(__CFRunLoopObserver*, unsigned long, void*)
19 CoreFoundation __CFRUNLOOP_IS_CALLING_OUT_TO_AN_OBSERVER_CALLBACK_FUNCTION__
20 CoreFoundation __CFRunLoopDoObservers
21 CoreFoundation __CFRunLoopRun
22 CoreFoundation CFRunLoopRunSpecific
23 CoreFoundation CFRunLoopRunInMode
24 GraphicsServices GSEventRunModal
25 GraphicsServices GSEventRun
26 UIKit UIApplicationMain
128K leak:
0 libsystem_c.dylib malloc
1 MusicLibrary ReadITImageDB
2 MusicLibrary -[MLPhotoLibrary _loadImageLibrary]
3 MusicLibrary -[MLPhotoLibrary albums]
4 PhotoLibrary -[PLPhotoLibrary albums]
5 PhotoLibrary -[PLPhotoLibrary imagePickerAlbums]
6 PhotoLibrary -[PLPhotoLibrary(Utilities) albumsForContentMode:]
7 PhotoLibrary -[PLLibraryViewController _updateAlbumsIfNecessary]
8 PhotoLibrary -[PLLibraryViewController viewWillAppear:]
9 PhotoLibrary -[PLUILibraryViewController viewWillAppear:]
10 UIKit -[UINavigationController _startTransition:fromViewController:toViewController:]
11 UIKit -[UINavigationController _startDeferredTransitionIfNeeded]
12 UIKit -[UILayoutContainerView layoutSubviews]
13 QuartzCore -[CALayer layoutSublayers]
14 QuartzCore CALayerLayoutIfNeeded
15 QuartzCore CA::Context::commit_transaction(CA::Transaction*)
16 QuartzCore CA::Transaction::commit()
17 QuartzCore CA::Transaction::observer_callback(__CFRunLoopObserver*, unsigned long, void*)
18 CoreFoundation __CFRUNLOOP_IS_CALLING_OUT_TO_AN_OBSERVER_CALLBACK_FUNCTION__
19 CoreFoundation __CFRunLoopDoObservers
20 CoreFoundation __CFRunLoopRun
21 CoreFoundation CFRunLoopRunSpecific
22 CoreFoundation CFRunLoopRunInMode
23 GraphicsServices GSEventRunModal
24 GraphicsServices GSEventRun
25 UIKit UIApplicationMain
New code:
-(void)imagePickerController:(UIImagePickerController *)picker didFinishPickingMediaWithInfo:(NSDictionary *)info
{
[m_pPopoverController dismissPopoverAnimated:true];
[m_pPopoverController release];
m_pPopoverController = nil;
NSString *mediaType = [info objectForKey:UIImagePickerControllerMediaType];
[self dismissModalViewControllerAnimated:YES];
if ([mediaType isEqualToString:(NSString *)kUTTypeImage]) {
UIImage *picture = [info objectForKey:UIImagePickerControllerOriginalImage];
[self UseImage:picture:picker];
}
[picker dismissModalViewControllerAnimated:YES];
// [picker release]; // <- CAUSES CRASH on BOTH iOS4 and iOS5.
}
- (void)SelectPhoto
{
if( [UIImagePickerController isSourceTypeAvailable:UIImagePickerControllerSourceTypePhotoLibrary ] )
{
self.view = g_glView;
UIImagePickerController *pImagePicker;
pImagePicker = [[UIImagePickerController alloc] init];
pImagePicker.sourceType = UIImagePickerControllerSourceTypePhotoLibrary;
pImagePicker.delegate = self;
pImagePicker.mediaTypes = [NSArray arrayWithObjects:(NSString *) kUTTypeImage, nil];
pImagePicker.allowsEditing = NO;
m_pPopoverController = [[UIPopoverController alloc] initWithContentViewController:pImagePicker];
m_pPopoverController.delegate = self;
[m_pPopoverController setPopoverContentSize:CGSizeMake(160,160) animated:YES];
CGRect selectedRect = CGRectMake(0,0,1,1);
[m_pPopoverController presentPopoverFromRect:selectedRect inView:self.view permittedArrowDirections:UIPopoverArrowDirectionAny animated:YES];
[pImagePicker release];
}
}
Here is my UseImage code:
- (void)UseImage:(UIImage*)theImage:(UIImagePickerController *)picker
{
CGFloat width, height;
// if image came from camera, save it to photo library
if( picker.sourceType == UIImagePickerControllerSourceTypeCamera )
{
UIImageWriteToSavedPhotosAlbum(theImage, nil, nil, nil);
}
CGImageRef imageRef = [theImage CGImage];
width = CGImageGetWidth(imageRef);
height = CGImageGetHeight(imageRef);
size_t bitsPerPixel = CGImageGetBitsPerPixel( imageRef );
m_photoWidth = width;
m_photoHeight = height;
m_bytesPerPixel = bitsPerPixel / 8;
CGContextRef cgctx = CreateARGBBitmapContextPopOver(theImage.CGImage, picker.sourceType, m_pClient);
if (cgctx == NULL)
{
// error creating context
return;
}
// Get image width, height. We'll use the entire image.
size_t w = CGImageGetWidth(theImage.CGImage);
size_t h = CGImageGetHeight(theImage.CGImage);
CGRect rect = {{0,0},{w,h}};
// set the blend mode so we don't blend into the previous pixels, instead we copy over them.
CGContextSetBlendMode(cgctx, kCGBlendModeCopy);
// Draw the image to the bitmap context. Once we draw, the memory
// allocated for the context for rendering will then contain the
// raw image data in the specified color space.
CGContextDrawImage(cgctx, rect, theImage.CGImage);
// Now we can get a pointer to the image data associated with the bitmap
// context.
m_pPixelData = reinterpret_cast<char*>(CGBitmapContextGetData (cgctx));
m_bytesPerPixel = 4;
// any client using the photo processing package is required to implement SELECT_PHOTO to its CLIENT_STATE
m_pClient->SetState( GEClient::LOADING_PHOTO );
m_pClient->PassPixelDataFromCamera( m_pPixelData, m_photoWidth, m_photoHeight, m_bytesPerPixel );
// When finished, release the context
CGContextRelease(cgctx);
}
CGContextRef CreateARGBBitmapContextPopOver (CGImageRef inImage, UIImagePickerControllerSourceType sourceType, GEClient* pClient )
{
CGContextRef context = NULL;
CGColorSpaceRef colorSpace;
void * bitmapData;
int bitmapByteCount;
int bitmapBytesPerRow;
// Get image width, height. We'll use the entire image.
size_t pixelsWide = CGImageGetWidth(inImage);
size_t pixelsHigh = CGImageGetHeight(inImage);
NSLog(#"Camera resolution:%lu x %lu", pixelsWide, pixelsHigh );
// Declare the number of bytes per row. Each pixel in the bitmap in this
// example is represented by 4 bytes; 8 bits each of red, green, blue, and
// alpha.
bitmapBytesPerRow = (pixelsWide * 4);
bitmapByteCount = (bitmapBytesPerRow * pixelsHigh);
// Use the generic RGB color space.
colorSpace = CGColorSpaceCreateDeviceRGB();
if (colorSpace == NULL)
{
fprintf(stderr, "Error allocating color space\n");
return NULL;
}
// Allocate memory for image data. This is the destination in memory
// where any drawing to the bitmap context will be rendered.
bitmapData = malloc( bitmapByteCount );
if (bitmapData == NULL)
{
fprintf (stderr, "Memory not allocated!");
CGColorSpaceRelease( colorSpace );
return NULL;
}
// Create the bitmap context. We want pre-multiplied ARGB, 8-bits
// per component. Regardless of what the source image format is
// (CMYK, Grayscale, and so on) it will be converted over to the format
// specified here by CGBitmapContextCreate.
context = CGBitmapContextCreate (bitmapData,
pixelsWide,
pixelsHigh,
8, // bits per component
bitmapBytesPerRow,
colorSpace,
kCGImageAlphaPremultipliedFirst);
if (context == NULL)
{
free (bitmapData);
fprintf (stderr, "Context not created!");
}
// Make sure and release colorspace before returning
CGColorSpaceRelease( colorSpace );
return context;
}
I'm taking a wild stab here. Your code looks pretty good, I'm tired and might be missing something, but just for testing, remove the line "[pImagePicker release];" and see what happens. That's not a final recommendation, but worth trying.
I ran into something similar with the image picker and changed where I did the release and it resolved the issue.
Set the popover controller's delegate to nil when you dismiss the popover. I think there's something in the framework code that's trying to access a delegate method in your viewController after it's released. Removing the delegate from the popover solved this problem for me and I was able to release the popover properly. No clue why it only happens on 4, but there you go. Hopefully that solves your problem, even if it's a month later.

MPMoviePlayer crashing app on device but not in simulator, but only when trying to play some files

I am writing an app that displays videos using MPMoviePlayer which are stored locally on the device. When I try to play most of the videos, the app crashes on the device, but not on the simulator where they play fine. I am using the same code to play all of the videos, I have tried deleting and reinstalling the app, cleaning then building again, with no luck.
The simulator is version 4.3 and the iPad I am testing the app on is version 4.3.1. I am using Xcode 4
This is the code I am using to play one of the videos that crashes:
#implementation SinglePendulumControl
-(IBAction)playMovie:(id)sender
{
NSString *filepath = [[NSBundle mainBundle] pathForResource:#"SinglePendulumControl" ofType:#"mp4"];
NSURL *fileURL = [NSURL fileURLWithPath:filepath];
MPMoviePlayerController *moviePlayerController = [[MPMoviePlayerController alloc] initWithContentURL:fileURL];
[[NSNotificationCenter defaultCenter] addObserver:self
selector:#selector(moviePlaybackComplete:)
name:MPMoviePlayerPlaybackDidFinishNotification
object:moviePlayerController];
[self.view addSubview:moviePlayerController.view];
[[UIApplication sharedApplication] setStatusBarOrientation:UIInterfaceOrientationLandscapeRight animated:YES];
[[self view] setBounds:CGRectMake(0, 0, 1024, 768)];
[[self view] setTransform:CGAffineTransformMakeRotation(M_PI / 2)];
moviePlayerController.fullscreen = YES;
[moviePlayerController play];
}
- (void)moviePlaybackComplete:(NSNotification *)notification
{
MPMoviePlayerController *moviePlayerController = [notification object];
[[NSNotificationCenter defaultCenter] removeObserver:self
name:MPMoviePlayerPlaybackDidFinishNotification
object:moviePlayerController];
[moviePlayerController.view removeFromSuperview];
[moviePlayerController release];
}
This is the code I am using to play one of the videos that doesn't crash:
#implementation GlueSettings
-(IBAction)playMovie:(id)sender
{
NSString *filepath = [[NSBundle mainBundle] pathForResource:#"gluesettings" ofType:#"mp4"];
NSURL *fileURL = [NSURL fileURLWithPath:filepath];
MPMoviePlayerController *moviePlayerController = [[MPMoviePlayerController alloc] initWithContentURL:fileURL];
[[NSNotificationCenter defaultCenter] addObserver:self
selector:#selector(moviePlaybackComplete:)
name:MPMoviePlayerPlaybackDidFinishNotification
object:moviePlayerController];
[self.view addSubview:moviePlayerController.view];
[[UIApplication sharedApplication] setStatusBarOrientation:UIInterfaceOrientationLandscapeRight animated:YES];
[[self view] setBounds:CGRectMake(0, 0, 1024, 768)];
[[self view] setTransform:CGAffineTransformMakeRotation(M_PI / 2)];
moviePlayerController.fullscreen = YES;
[moviePlayerController play];
}
- (void)moviePlaybackComplete:(NSNotification *)notification
{
MPMoviePlayerController *moviePlayerController = [notification object];
[[NSNotificationCenter defaultCenter] removeObserver:self
name:MPMoviePlayerPlaybackDidFinishNotification
object:moviePlayerController];
[moviePlayerController.view removeFromSuperview];
[moviePlayerController release];
}
The console log of the crash:
May 16 17:55:31 unknown Vector[3590] <Error>: *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '*** -[NSURL initFileURLWithPath:]: nil string parameter'
*** Call stack at first throw:
(
0 CoreFoundation 0x33c3d64f __exceptionPreprocess + 114
1 libobjc.A.dylib 0x33f01c5d objc_exception_throw + 24
2 CoreFoundation 0x33c3d491 +[NSException raise:format:arguments:] + 68
3 CoreFoundation 0x33c3d4cb +[NSException raise:format:] + 34
4 Foundation 0x36da018f -[NSURL(NSURL) initFileURLWithPath:] + 70
5 Foundation 0x36da012f +[NSURL(NSURL) fileURLWithPath:] + 30
6 Vector 0x000eb7e5 -[BumpBarBumpSwitch playMovie:] + 80
7 CoreFoundation 0x33bad571 -[NSObject(NSObject) performSelector:withObject:withObject:] + 24
8 UIKit 0x31f43ec9 -[UIApplication sendAction:to:from:forEvent:] + 84
9 UIKit 0x31f43e69 -[UIApplication sendAction:toTarget:fromSender:forEvent:] + 32
10 UIKit 0x31f43e3b -[UIControl sendAction:to:forEvent:] + 38
11 UIKit 0x31f43b8d -[UIControl(Internal) _sendActionsForEvents:withEvent:] + 356
12 UIKit 0x31f44423 -[UIControl touchesEnded:withEvent:] + 342
13 UIKit 0x31f42bf5 -[UIWindow _sendTouchesForEvent:] + 368
14 UIKit 0x31f4256f -[UIWindow sendEvent:] + 262
15 UIKit 0x31f2b313 -[UIApplication sendEvent:] + 298
16 UIKit 0x31f2ac53 _UIApplicationHandleEvent + 5090
17 GraphicsServices 0x3257ee77 PurpleEventCallback + 666
18 CoreFoundation 0x33c14a97 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE1_PERFORM_FUNCTION__ + 26
19 CoreFoundation 0x33c1683f __CFRunLoopDoSource1 + 166
20 CoreFoundation 0x33c1760d __CFRunLoopRun + 520
21 CoreFoundation 0x33ba7ec3 CFRunLoopRunSpecific + 230
22 CoreFoundation 0x33ba7dcb CFRunLoopRunInMode + 58
23 GraphicsServices 0x3257e41f GSEventRunModal + 114
24 GraphicsServices 0x3257e4cb GSEventRun + 62
25 UIKit 0x31f55d69 -[UIApplication _run] + 404
26 UIKit 0x31f53807 UIApplicationMain + 670
27 Vector 0x000e9f31 main + 48
28 Vector 0x000e9efc start + 40
)
May 16 17:55:31 unknown UIKitApplication:Vector-Systems.Vector[0xc457][3590] <Notice>: terminate called after throwing an instance of 'NSException'
May 16 17:55:31 unknown ReportCrash[3591] <Notice>: Formulating crash report for process Vector[3590]
May 16 17:55:31 unknown com.apple.launchd[1] <Warning>: (UIKitApplication:Vector-Systems.Vector[0xc457]) Job appears to have crashed: Abort trap: 6
May 16 17:55:31 unknown SpringBoard[29] <Warning>: Application 'Vector' exited abnormally with signal 6: Abort trap: 6
May 16 17:55:31 unknown ReportCrash[3591] <Error>: Saved crashreport to /var/mobile/Library/Logs/CrashReporter/Vector_2011-05-16-175531_Duncans-iPad.plist using uid: 0 gid: 0, synthetic_euid: 501 egid: 0
May 16 17:55:34 unknown DTPower[3080] <Warning>: Task info failed for task Vector-Systems.Vector