Search Results

Search found 113 results on 5 pages for 'nsthread'.

Page 5/5 | < Previous Page | 1 2 3 4 5 

  • Sporadic EXC_BAD_INSTRUCTION (SIGILL) when in 64 bit mode

    - by Ger Teunis
    For some reason for a low-number of users (say 1 in a few hundred) the application seem to crash when run in 64bit mode on a Snow Leopard 10.6.3 I've attached the code, but please remind IT IS NOT A CODE issue. The crashed seem to be random in com.apple.AppKit at random locations and random moments. Anyone else had any experiences? Using GCC compiler of Xcode 3.2.2 Crash #1 of user Code Type: X86-64 (Native) Parent Process: launchd [90] Date/Time: 2010-05-02 04:12:59.708 -0500 OS Version: Mac OS X 10.6.3 (10D573) Report Version: 6 Exception Type: EXC_BAD_INSTRUCTION (SIGILL) Exception Codes: 0x0000000000000001, 0x0000000000000000 Crashed Thread: 0 Dispatch queue: com.apple.main-thread Application Specific Information: objc[232]: alt handlers in objc runtime are buggy! Thread 0 Crashed: Dispatch queue: com.apple.main-thread 0 libobjc.A.dylib 0x00007fff874dd8b7 _objc_fatal + 238 1 libobjc.A.dylib 0x00007fff874de57c objc_addExceptionHandler + 1026 2 com.apple.CoreFoundation 0x00007fff83914212 _CFDoExceptionOperation + 402 3 com.apple.AppKit 0x00007fff87afc55d _NSAppKitLock + 79 4 com.apple.AppKit 0x00007fff87bd1f93 +[NSColorList _findColorListNamed:forDeviceType:] + 86 5 com.apple.AppKit 0x00007fff87b9d304 -[NSCatalogColor colorUsingColorSpaceName:device:] + 255 6 com.apple.AppKit 0x00007fff87c985ad -[NSLayoutManager(NSPrivate) _drawGlyphsForGlyphRange:atPoint:parameters:] + 4764 7 com.apple.AppKit 0x00007fff87c5d79c -[NSTextView drawRect:] + 1839 8 com.apple.AppKit 0x00007fff87c5ce2e -[NSTextView _drawRect:clip:] + 2343 9 com.apple.AppKit 0x00007fff87be4485 -[NSView _recursiveDisplayAllDirtyWithLockFocus:visRect:] + 1325 10 com.apple.AppKit 0x00007fff87be47ef -[NSView _recursiveDisplayAllDirtyWithLockFocus:visRect:] + 2199 11 com.apple.AppKit 0x00007fff87be2b57 -[NSView _recursiveDisplayRectIfNeededIgnoringOpacity:isVisibleRect:rectIsVisibleRectForView:topView:] + 767 12 com.apple.AppKit 0x00007fff87be3a23 -[NSView _recursiveDisplayRectIfNeededIgnoringOpacity:isVisibleRect:rectIsVisibleRectForView:topView:] + 4555 13 com.apple.AppKit 0x00007fff87be3a23 -[NSView _recursiveDisplayRectIfNeededIgnoringOpacity:isVisibleRect:rectIsVisibleRectForView:topView:] + 4555 14 com.apple.AppKit 0x00007fff87be3a23 -[NSView _recursiveDisplayRectIfNeededIgnoringOpacity:isVisibleRect:rectIsVisibleRectForView:topView:] + 4555 15 com.apple.AppKit 0x00007fff87be3a23 -[NSView _recursiveDisplayRectIfNeededIgnoringOpacity:isVisibleRect:rectIsVisibleRectForView:topView:] + 4555 16 com.apple.AppKit 0x00007fff87be3a23 -[NSView _recursiveDisplayRectIfNeededIgnoringOpacity:isVisibleRect:rectIsVisibleRectForView:topView:] + 4555 17 com.apple.AppKit 0x00007fff87be3a23 -[NSView _recursiveDisplayRectIfNeededIgnoringOpacity:isVisibleRect:rectIsVisibleRectForView:topView:] + 4555 18 com.apple.AppKit 0x00007fff87be3a23 -[NSView _recursiveDisplayRectIfNeededIgnoringOpacity:isVisibleRect:rectIsVisibleRectForView:topView:] + 4555 19 com.apple.AppKit 0x00007fff87be3a23 -[NSView _recursiveDisplayRectIfNeededIgnoringOpacity:isVisibleRect:rectIsVisibleRectForView:topView:] + 4555 20 com.apple.AppKit 0x00007fff87be2678 -[NSThemeFrame _recursiveDisplayRectIfNeededIgnoringOpacity:isVisibleRect:rectIsVisibleRectForView:topView:] + 254 21 com.apple.AppKit 0x00007fff87bdef27 -[NSView _displayRectIgnoringOpacity:isVisibleRect:rectIsVisibleRectForView:] + 2683 22 com.apple.AppKit 0x00007fff87b58777 -[NSView displayIfNeeded] + 969 23 com.apple.AppKit 0x00007fff87b53622 _handleWindowNeedsDisplay + 678 24 com.apple.Foundation 0x00007fff8600fa4d __NSFireTimer + 114 25 com.apple.CoreFoundation 0x00007fff83908708 __CFRunLoopRun + 6488 26 com.apple.CoreFoundation 0x00007fff839068df CFRunLoopRunSpecific + 575 27 com.apple.HIToolbox 0x00007fff821b5ada RunCurrentEventLoopInMode + 333 28 com.apple.HIToolbox 0x00007fff821b58df ReceiveNextEventCommon + 310 29 com.apple.HIToolbox 0x00007fff821b5798 BlockUntilNextEventMatchingListInMode + 59 30 com.apple.AppKit 0x00007fff87b28a2a _DPSNextEvent + 708 31 com.apple.AppKit 0x00007fff87b28379 -[NSApplication nextEventMatchingMask:untilDate:inMode:dequeue:] + 155 32 com.apple.AppKit 0x00007fff87d37060 -[NSTextView mouseDown:] + 8426 33 com.apple.AppKit 0x00007fff87c21f1b -[NSWindow sendEvent:] + 5409 34 com.apple.AppKit 0x00007fff87b57662 -[NSApplication sendEvent:] + 4719 35 com.apple.AppKit 0x00007fff87aee0aa -[NSApplication run] + 474 36 com.apple.AppKit 0x00007fff87ae6d7c NSApplicationMain + 364 37 com.NZBVortex.NZBVortex 0x0000000100000fe0 start + 52 Crash #2 from same user moments later Code Type: X86-64 (Native) Parent Process: launchd [76] Date/Time: 2010-05-02 11:59:33.226 +0200 OS Version: Mac OS X 10.6.3 (10D573) Report Version: 6 Exception Type: EXC_BAD_INSTRUCTION (SIGILL) Exception Codes: 0x0000000000000001, 0x0000000000000000 Crashed Thread: 0 Dispatch queue: com.apple.main-thread Application Specific Information: objc[4360]: alt handlers in objc runtime are buggy! Thread 0 Crashed: Dispatch queue: com.apple.main-thread 0 libobjc.A.dylib 0x00007fff8015d8b7 _objc_fatal + 238 1 libobjc.A.dylib 0x00007fff8015e57c objc_addExceptionHandler + 1026 2 com.apple.CoreFoundation 0x00007fff85367212 _CFDoExceptionOperation + 402 3 com.apple.AppKit 0x00007fff840b5f2f -[NSViewHierarchyLock lockForReadingWithExceptionHandler:] + 478 4 com.apple.AppKit 0x00007fff8420753e -[NSConcreteTextStorage _lockForReading] + 243 5 com.apple.AppKit 0x00007fff841e1449 -[NSLayoutManager(NSPrivate) _fillGlyphHoleForCharacterRange:startGlyphIndex:desiredNumberOfCharacters:] + 320 6 com.apple.AppKit 0x00007fff840e204a _NSFastFillAllGlyphHolesForGlyphRange + 719 7 com.apple.AppKit 0x00007fff841e10e2 _NSFastFillAllLayoutHolesUpToEndOfContainerForGlyphIndex + 653 8 com.apple.AppKit 0x00007fff841e0c72 -[NSLayoutManager textContainerForGlyphAtIndex:effectiveRange:] + 243 9 com.apple.AppKit 0x00007fff840f6786 -[NSLayoutManager glyphRangeForTextContainer:] + 286 10 com.apple.AppKit 0x00007fff846664a9 -[NSToolTipStringDrawingLayoutManager _sizeWithSize:attributedString:] + 883 11 com.apple.AppKit 0x00007fff84665dad +[NSToolTipStringDrawingLayoutManager sizeForDisplayingAttributedString:] + 354 12 com.apple.AppKit 0x00007fff84667292 -[NSToolTipManager displayToolTip:] + 616 13 com.apple.AppKit 0x00007fff846657d4 toolTipTimerFired + 114 14 com.apple.CoreFoundation 0x00007fff8535b708 __CFRunLoopRun + 6488 15 com.apple.CoreFoundation 0x00007fff853598df CFRunLoopRunSpecific + 575 16 com.apple.HIToolbox 0x00007fff88510ada RunCurrentEventLoopInMode + 333 17 com.apple.HIToolbox 0x00007fff885108df ReceiveNextEventCommon + 310 18 com.apple.HIToolbox 0x00007fff88510798 BlockUntilNextEventMatchingListInMode + 59 19 com.apple.AppKit 0x00007fff840d1a2a _DPSNextEvent + 708 20 com.apple.AppKit 0x00007fff840d1379 -[NSApplication nextEventMatchingMask:untilDate:inMode:dequeue:] + 155 21 com.apple.AppKit 0x00007fff8409705b -[NSApplication run] + 395 22 com.apple.AppKit 0x00007fff8408fd7c NSApplicationMain + 364 23 com.NZBVortex.NZBVortex 0x0000000100000fe0 start + 52 Weirdly enough the crashes seem to go away for these users when running the code in 32 bit mode. Any suggestions other then running the application in 32 bit only? Please do not dilute the feedback by asking for or blaming the code, the code is 100% solid, guaranteed! No memory leaks, the crashes clearly are triggered in 32 bit mode only just after start inside the AppKit itself like deep inside NSThread sleep's callstack.

    Read the article

  • iphone image is leaking, but where?

    - by Brodie4598
    the image that is being displayed in this code is leaking but I cant figure out how. What I have a tableview that displays images to be displayed. Each time a user selects an image, it should remove the old image, download a new one, then add it to the scroll view. But the old image is not being released and I cant figure out why... -(void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath { [imageView removeFromSuperview]; self.imageView = nil; NSUInteger row = [indexPath row]; NSString *tempC = [[NSString alloc]initWithFormat:@"http://www.website.com/%@_0001.jpg",[pdfNamesFinalArray objectAtIndex:row] ]; chartFileName = tempC; pdfName = [pdfNamesFinalArray objectAtIndex:row]; [tableView deselectRowAtIndexPath:indexPath animated:YES]; NSArray* paths = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES); NSString *docsPath = [paths objectAtIndex:0]; NSString *tempString = [[[NSString alloc]initWithFormat:@"%@/%@.jpg",docsPath,pdfName]autorelease]; NSData *data = [NSData dataWithContentsOfFile:tempString]; if (data != NULL){ self.imageView = nil; [imageView removeFromSuperview]; self.imageView = nil; UIImageView *tempImage = [[[UIImageView alloc]initWithImage:[UIImage imageWithData:data]]autorelease]; self.imageView = tempImage; [data release]; scrollView.contentSize = CGSizeMake(imageView.frame.size.width , imageView.frame.size.height); scrollView.maximumZoomScale = 1; scrollView.minimumZoomScale = .6; scrollView.clipsToBounds = YES; scrollView.delegate = self; [scrollView addSubview:imageView]; scrollView.zoomScale = .37; } else { [data release]; self.imageView = nil; [imageView removeFromSuperview]; self.imageView = nil; activityIndicator.hidden = NO; getChartsButton.enabled = NO; chartListButton.enabled = NO; saveChartButton.enabled = NO; [NSThread detachNewThreadSelector:@selector(downloadImages) toTarget:self withObject:nil]; } chartPanel.hidden = YES; } -(void) downloadImages { NSAutoreleasePool* pool = [[NSAutoreleasePool alloc] init]; self.imageView = nil; [imageView removeFromSuperview]; NSURL *url = [[[NSURL alloc]initWithString:chartFileName]autorelease]; NSData *data = [NSData dataWithContentsOfURL:url]; UIImageView *tempImage = [[[UIImageView alloc]initWithImage:[UIImage imageWithData:data]]autorelease]; self.imageView = tempImage; tempImage = nil; scrollView.contentSize = CGSizeMake(imageView.frame.size.width , imageView.frame.size.height); scrollView.maximumZoomScale = 1; scrollView.minimumZoomScale = .37; scrollView.clipsToBounds = YES; scrollView.delegate = self; [scrollView addSubview:imageView]; scrollView.zoomScale = .6; activityIndicator.hidden = YES; getChartsButton.enabled = YES; chartListButton.enabled = YES; saveChartButton.enabled = YES; [pool drain]; [pool release]; }

    Read the article

  • Async networking + threading problem

    - by randallmeadows
    I kick off a network request, assuming no login credentials are required to talk to the destination server. If they are required, then I get an authentication challenge, at which point I display a view requesting said credentials from the user. When they are supplied, I restart the network request, using those credentials. That's all fine and dandy, as long as I only do one request at a time. But I'm not, typically. When both requests are kicked off, I get the first challenge, and present the prompt (using -presentModalViewController:). Then the 2nd challenge comes in. And I crash when it tries to display the 2nd prompt. I have the bulk of this wrapped in an @synchronized() block, but this has no effect because these delegate methods are all being called on the same (main) thread. The docs say the delegate methods are called on the same thread in which the connection was started. OK, no problem; I'll just write a method that I run on a background thread using -performSelectorInBackground: NSURLConnection *connection = [[NSURLConnection alloc] initWithRequest:request delegate:self startImmediately:NO]; [connections addObject:connection]; [self performSelectorInBackground:@selector(startConnection:) withObject:connection]; [connection release]; - (void)startConnection:(NSURLConnection *)connection { NSAutoreleasePool *pool = [NSAutoreleasePool new]; [connection scheduleInRunLoop:[NSRunLoop currentRunLoop] forMode:NSDefaultRunLoopMode]; [connection start]; [pool drain]; } which should put every network request, and its callbacks, on its own thread, and then my @synchronized() blocks will take effect. The docs for -initWithRequest:... state "Messages to the delegate will be sent on the thread that calls this method. By default, for the connection to work correctly the calling thread’s run loop must be operating in the default run loop mode." Ok, I'm doing that. They also state "If you pass NO [for startImmediately], you must schedule the connection in a run loop before starting it." OK, I'm doing that, too. Furthermore, the docs for NSRunLoop state "Each NSThread object, including the application’s main thread, has an NSRunLoop object automatically created for it as needed. If you need to access the current thread’s run loop, you do so with the class method currentRunLoop." I'm assuming this applies to the background thread created by the call -performSelectorInBackground... (which does appear to be the case, when I execute 'po [NSClassFromString(@"NSRunLoop") currentRunLoop]' in the -startConnection: method). The -startConnection: method is indeed being called. But after kicking off the connection, I now never get any callbacks on it. None of the -connectionDid… delegate methods. (I even tried explicitly starting the thread's run loop, but that made no difference; I've used threads like this before, and I've never had to start the run loop manually before--but I'm now grasping at straws...) I think I've come up with a workaround such that I only handle one request at a time, but it's kludgy and I'd like to do this the Right Way. But, what am I missing here? Thanks! randy

    Read the article

  • Instruments memory leak iphone

    - by dubbeat
    Hi, I posted this problem a few days ago but it was very muddled and my question wasnt very clear so I removed it. I've been digging around and the memory leak is still persiting. Hopefully this attempt will be clearer. First off I've run the static analyzer and it reports no memory leaks. I then ran Instruments and it pointed to a memory leak at this line of code. As far as I can see there is no memory leak. featured=[[UILabel alloc]initWithFrame:CGRectMake(130,15, 200, 15)]; //[featured setFont:[UIFont UIFontboldSystemFontOfSize:20]]; featured.font = [UIFont boldSystemFontOfSize:20]; featured.backgroundColor= [UIColor clearColor]; featured.textColor=[UIColor blackColor]; featured.text= @"Featured Promo"; [self.view addSubview:featured]; [featured release]; featured=nil; If I comment out the above code Instruments reports another memory leak in another block of code where there is no discernible leak. UIButton *populartbutton = [[UIButton buttonWithType:UIButtonTypeRoundedRect]]; populartbutton.frame = CGRectMake(112, 145, 90, 22); // size and position of button [populartbutton setTitle:@"Popular" forState:UIControlStateNormal]; populartbutton.backgroundColor = [UIColor clearColor]; populartbutton.adjustsImageWhenHighlighted = YES; [populartbutton addTarget:self action:@selector(getpopular:) forControlEvents:UIControlEventTouchUpInside]; [self.view addSubview:populartbutton]; Instruments also says Responsible Library = Core Graphics Responsible Frame = open_handle_to_dylib_path This Is the stack trace. 53 Promo start 52 Promo main /Users/..2/main.m:14 51 UIKit UIApplicationMain 50 UIKit -[UIApplication _run] 49 CoreFoundation CFRunLoopRunInMode 48 CoreFoundation CFRunLoopRunSpecific 47 GraphicsServices PurpleEventCallback 46 UIKit _UIApplicationHandleEvent 45 UIKit -[UIApplication sendEvent:] 44 UIKit -[UIApplication handleEvent:withNewEvent:] 43 UIKit -[UIApplication _reportAppLaunchFinished] 42 QuartzCore CA::Transaction::commit() 41 QuartzCore CA::Context::commit_transaction(CA::Transaction*) 40 QuartzCore CALayerLayoutIfNeeded 39 QuartzCore -[CALayer layoutSublayers] 38 UIKit -[UILayoutContainerView layoutSubviews] 37 UIKit -[UINavigationController _startDeferredTransitionIfNeeded] 36 UIKit -[UINavigationController _startTransition:fromViewController:toViewController:] 35 UIKit -[UINavigationController _layoutViewController:] 34 UIKit -[UINavigationController_computeAndApplyScrollContentInsetDeltaForViewController:] 33 UIKit -[UIViewController contentScrollView] 32 UIKit -[UIViewController view] 31 Promo -[FeaturedLevelViewController viewDidLoad] /Users/..s/FeaturedLevelViewController.m:67 // THIS IS MY CLASS WHERE THE CODE SAMPLES ABOVE ARE FROM 30 UIKit -[UILabel initWithFrame:] 29 UIKit -[UILabel _commonInit] 28 UIKit +[UILabel defaultFont] 27 UIKit +[UIFont systemFontOfSize:] 26 GraphicsServices GSFontCreateWithName 25 CoreGraphics CGFontCreateWithName 24 CoreGraphics CGFontCreateWithFontName 23 CoreGraphics CGFontFinderGetDefault 22 CoreGraphics CGFontGetVTable 21 libSystem.B.dylib pthread_once 20 CoreGraphics load_vtable 19 CoreGraphics load_library 18 CoreGraphics CGLibraryLoadFunction 17 CoreGraphics load_function 16 CoreGraphics open_handle_to_dylib_path 15 libSystem.B.dylib dlopen 14 dyld dlopen 13 dyld dyld::link(ImageLoader*, bool, ImageLoader::RPathChain const&) 12 dyld ImageLoader::link(ImageLoader::LinkContext const&, bool, bool, ImageLoader::RPathChain const&) 11 dyld ImageLoader::recursiveLoadLibraries(ImageLoader::LinkContext const&, bool, ImageLoader::RPathChain const&) 10 dyld dyld::libraryLocator(char const*, bool, char const*, ImageLoader::RPathChain const*) 9 dyld dyld::load(char const*, dyld::LoadContext const&) 8 dyld dyld::loadPhase0(char const*, dyld::LoadContext const&, std::vector<char const*, std::allocator<char const*> >*) 7 dyld dyld::loadPhase1(char const*, dyld::LoadContext const&, std::vector<char const*, std::allocator<char const*> >*) 6 dyld dyld::loadPhase3(char const*, dyld::LoadContext const&, std::vector<char const*, std::allocator<char const*> >*) 5 dyld dyld::loadPhase4(char const*, dyld::LoadContext const&, std::vector<char const*, std::allocator<char const*> >*) 4 dyld dyld::loadPhase5(char const*, dyld::LoadContext const&, std::vector<char const*, std::allocator<char const*> >*) 3 dyld dyld::mkstringf(char const*, ...) 2 dyld strdup 1 dyld malloc 0 libSystem.B.dylib malloc I'm really not too sure how to use this information to fix the problem so any guidance would be appreciated. Perhaps the answer is in the trace but I just don't know what to look for? EDIT:: The above stack trace is when running on the simulator. The following is from running on a device. This trace does not point to any of my own classes 23 Promo 0x0 22 libSystem.B.dylib _pthread_body 21 Foundation __NSThread__main__ 20 Foundation +[NSThread exit] 19 libSystem.B.dylib _pthread_exit 18 libSystem.B.dylib _pthread_tsd_cleanup 17 QuartzCore CA::Transaction::release_thread(void*) 16 QuartzCore CA::Transaction::commit() 15 QuartzCore CA::Context::commit_transaction(CA::Transaction*) 14 QuartzCore CALayerDisplayIfNeeded 13 QuartzCore -[CALayer display] 12 QuartzCore -[CALayer _display] 11 QuartzCore CABackingStoreUpdate 10 QuartzCore backing_callback(CGContext*, void*) 9 QuartzCore -[CALayer drawInContext:] 8 UIKit -[UIView(CALayerDelegate) drawLayer:inContext:] 7 UIKit -[UILabel drawRect:] 6 UIKit -[UILabel drawTextInRect:] 5 UIKit -[UILabel _drawTextInRect:baselineCalculationOnly:] 4 UIKit -[NSString(UIStringDrawing) drawAtPoint:forWidth:withFont:lineBreakMode:] 3 UIKit -[NSString(UIStringDrawing) drawAtPoint:forWidth:withFont:lineBreakMode:letterSpacing:includeEmoji:] 2 WebCore WKSetCurrentGraphicsContext 1 WebCore CurrentThreadContext() 0 libSystem.B.dylib calloc

    Read the article

  • NSOutlineView not refreshing when objects added to managed object context from NSOperations

    - by John Gallagher
    Background Cocoa app using core data Two processes - daemon and a main UI Daemon constantly writing to a data store UI process reads from same data store NSOutlineView in UI is bound to an NSTreeController which is bound to Application with key path of delegate.interpretedMOC What I want When the UI is activated, the outline view should update with the latest data inserted by the daemon. The Problem Main Thread Approach I fetch all the entities I'm interested in, then iterate over them, doing refreshObject:mergeChanges:YES. This works OK - the items get refreshed correctly. However, this is all running on the main thread, so the UI locks up for 10-20 seconds whilst it refreshes. Fine, so let's move these refreshes to NSOperations that run in the background instead. NSOperation Multithreaded Approach As soon as I move the refreshObject:mergeChanges: call into an NSOperation, the refresh no longer works. When I add logging messages, it's clear that the new objects are loaded in by the NSOperation subclass and refreshed. Not only that, but they are What I've tried I've messed around with this for 2 days solid and tried everything I can think of. Passing objectIDs to the NSOperation to refresh instead of an entity name. Resetting the interpretedMOC at various points - after the data refresh and before the outline view reload. I'd subclassed NSOutlineView. I discarded my subclass and set the view back to being an instance of NSOutlineView, just in case there was any funny goings on here. Added a rearrangeObjects call to the NSTreeController before reloading the NSOutlineView data. Made sure I had set the staleness interval to 0 on all managed object contexts I was using. I've got a feeling this problem is somehow related to caching core data objects in memory. But I've totally exhausted all my ideas on how I get this to work. I'd be eternally grateful of any ideas anyone else has. Code Main Thread Approach // In App Delegate -(void)applicationDidBecomeActive:(NSNotification *)notification { // Delay to allow time for the daemon to save [self performSelector:@selector(refreshTrainingEntriesAndGroups) withObject:nil afterDelay:3]; } -(void)refreshTrainingEntriesAndGroups { NSSet *allTrainingGroups = [[[NSApp delegate] interpretedMOC] fetchAllObjectsForEntityName:kTrainingGroup]; for(JGTrainingGroup *thisTrainingGroup in allTrainingGroups) [interpretedMOC refreshObject:thisTrainingGroup mergeChanges:YES]; NSError *saveError = nil; [interpretedMOC save:&saveError]; [windowController performSelectorOnMainThread:@selector(refreshTrainingView) withObject:nil waitUntilDone:YES]; } // In window controller class -(void)refreshTrainingView { [trainingViewTreeController rearrangeObjects]; // Didn't really expect this to have any effect. And it didn't. [trainingView reloadData]; } NSOperation Multithreaded Approach // In App Delegate -(void)refreshTrainingEntriesAndGroups { JGRefreshEntityOperation *trainingGroupRefresh = [[JGRefreshEntityOperation alloc] initWithEntityName:kTrainingGroup]; NSOperationQueue *refreshQueue = [[NSOperationQueue alloc] init]; [refreshQueue setMaxConcurrentOperationCount:1]; [refreshQueue addOperation:trainingGroupRefresh]; while ([[refreshQueue operations] count] > 0) { [[NSRunLoop currentRunLoop] runUntilDate:[NSDate dateWithTimeIntervalSinceNow:0.05]]; [windowController performSelectorOnMainThread:@selector(refreshTrainingView) withObject:nil waitUntilDone:YES]; } // JGRefreshEntityOperation.m @implementation JGRefreshEntityOperation @synthesize started; @synthesize executing; @synthesize paused; @synthesize finished; -(void)main { [self startOperation]; NSSet *allEntities = [imoc fetchAllObjectsForEntityName:entityName]; for(id thisEntity in allEntities) [imoc refreshObject:thisEntity mergeChanges:YES]; [self finishOperation]; } -(void)startOperation { [self willChangeValueForKey:@"isExecuting"]; [self willChangeValueForKey:@"isStarted"]; [self setStarted:YES]; [self setExecuting:YES]; [self didChangeValueForKey:@"isExecuting"]; [self didChangeValueForKey:@"isStarted"]; imoc = [[NSManagedObjectContext alloc] init]; [imoc setStalenessInterval:0]; [imoc setUndoManager:nil]; [imoc setPersistentStoreCoordinator:[[NSApp delegate] interpretedPSC]]; [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(mergeChanges:) name:NSManagedObjectContextDidSaveNotification object:imoc]; } -(void)finishOperation { saveError = nil; [imoc save:&saveError]; if (saveError) { NSLog(@"Error saving. %@", saveError); } imoc = nil; [self willChangeValueForKey:@"isExecuting"]; [self willChangeValueForKey:@"isFinished"]; [self setExecuting:NO]; [self setFinished:YES]; [self didChangeValueForKey:@"isExecuting"]; [self didChangeValueForKey:@"isFinished"]; } -(void)mergeChanges:(NSNotification *)notification { NSManagedObjectContext *mainContext = [[NSApp delegate] interpretedMOC]; [mainContext performSelectorOnMainThread:@selector(mergeChangesFromContextDidSaveNotification:) withObject:notification waitUntilDone:YES]; } -(id)initWithEntityName:(NSString *)entityName_ { [super init]; [self setStarted:false]; [self setExecuting:false]; [self setPaused:false]; [self setFinished:false]; [NSThread setThreadPriority:0.0]; entityName = entityName_; return self; } @end // JGRefreshEntityOperation.h @interface JGRefreshEntityOperation : NSOperation { NSString *entityName; NSManagedObjectContext *imoc; NSError *saveError; BOOL started; BOOL executing; BOOL paused; BOOL finished; } @property(readwrite, getter=isStarted) BOOL started; @property(readwrite, getter=isPaused) BOOL paused; @property(readwrite, getter=isExecuting) BOOL executing; @property(readwrite, getter=isFinished) BOOL finished; -(void)startOperation; -(void)finishOperation; -(id)initWithEntityName:(NSString *)entityName_; -(void)mergeChanges:(NSNotification *)notification; @end

    Read the article

  • post image and other data using mulipart form data in iphone

    - by abdulsamad
    Hi all I am sending some data and and an image to the server using multipart/form-data in objective C. kindly give me some Php code that how can i save the image on the server i am able to get the other variables on the server that i am passing with the image. kindly see my obj C code and php and tell me where i am wrong. your help will be highly appreciated. here i make the POST request. ////////////////////// NSString *stringBoundary, *contentType, *baseURLString, *urlString; NSData *imageData; NSURL *url; NSMutableURLRequest *urlRequest; NSMutableData *postBody; // Create POST request from message, imageData, username and password baseURLString = @"http://localhost:8888/Test.php"; urlString = [NSString stringWithFormat:@"%@", baseURLString]; url = [NSURL URLWithString:urlString]; urlRequest = [[[NSMutableURLRequest alloc] initWithURL:url] autorelease]; [urlRequest setHTTPMethod:@"POST"]; // Set the params NSString *path = [[NSBundle mainBundle] pathForResource:@"LibraryIcon" ofType:@"png"]; imageData = [[NSData alloc] initWithContentsOfFile:path]; // Setup POST body stringBoundary = [NSString stringWithString:@"0xKhTmLbOuNdArY"]; contentType = [NSString stringWithFormat:@"multipart/form-data; boundary=%@", stringBoundary]; [urlRequest addValue:contentType forHTTPHeaderField:@"Content-Type"]; // Setting up the POST request's multipart/form-data body postBody = [NSMutableData data]; [postBody appendData:[[NSString stringWithFormat:@"\r\n\r\n--%@\r\n", stringBoundary] dataUsingEncoding:NSUTF8StringEncoding]]; [postBody appendData:[[NSString stringWithString:@"Content-Disposition: form-data; name=\"source\"\r\n\r\n"] dataUsingEncoding:NSUTF8StringEncoding]]; [postBody appendData:[[NSString stringWithString:@"lighttable"] dataUsingEncoding:NSUTF8StringEncoding]]; // So Light Table show up as source in Twitter post [postBody appendData:[[NSString stringWithFormat:@"\r\n--%@\r\n", stringBoundary] dataUsingEncoding:NSUTF8StringEncoding]]; [postBody appendData:[[NSString stringWithString:@"Content-Disposition: form-data; name=\"title\"\r\n\r\n"] dataUsingEncoding:NSUTF8StringEncoding]]; [postBody appendData:[[NSString stringWithString:book.title] dataUsingEncoding:NSUTF8StringEncoding]]; // title [postBody appendData:[[NSString stringWithFormat:@"\r\n--%@\r\n", stringBoundary] dataUsingEncoding:NSUTF8StringEncoding]]; [postBody appendData:[[NSString stringWithString:@"Content-Disposition: form-data; name=\"isbn\"\r\n\r\n"] dataUsingEncoding:NSUTF8StringEncoding]]; [postBody appendData:[[NSString stringWithString:book.isbn] dataUsingEncoding:NSUTF8StringEncoding]]; // isbn [postBody appendData:[[NSString stringWithFormat:@"\r\n--%@\r\n", stringBoundary] dataUsingEncoding:NSUTF8StringEncoding]]; [postBody appendData:[[NSString stringWithString:@"Content-Disposition: form-data; name=\"price\"\r\n\r\n"] dataUsingEncoding:NSUTF8StringEncoding]]; [postBody appendData:[[NSString stringWithString:txtPrice.text] dataUsingEncoding:NSUTF8StringEncoding]]; // Price [postBody appendData:[[NSString stringWithFormat:@"\r\n--%@\r\n", stringBoundary] dataUsingEncoding:NSUTF8StringEncoding]]; [postBody appendData:[[NSString stringWithString:@"Content-Disposition: form-data; name=\"condition\"\r\n\r\n"] dataUsingEncoding:NSUTF8StringEncoding]]; [postBody appendData:[[NSString stringWithString:txtCondition.text] dataUsingEncoding:NSUTF8StringEncoding]]; // Price NSString *imageFileName = [NSString stringWithFormat:@"photo.jpeg"]; [postBody appendData:[[NSString stringWithFormat:@"\r\n--%@\r\n", stringBoundary] dataUsingEncoding:NSUTF8StringEncoding]]; [postBody appendData:[[NSString stringWithFormat:@"Content-Disposition: form-data; name=\"upload\"; filename=\"%@\"\r\n",imageFileName] dataUsingEncoding:NSUTF8StringEncoding]]; //[postBody appendData:[[NSString stringWithFormat:@"Content-Disposition: form-data; name=\"upload\"\r\n\n\n"]dataUsingEncoding:NSUTF8StringEncoding]]; [postBody appendData:[@"Content-Type: image/jpeg\r\n\r\n" dataUsingEncoding:NSUTF8StringEncoding]]; [postBody appendData:imageData]; [postBody appendData:[[NSString stringWithFormat:@"\r\n--%@\r\n", stringBoundary] dataUsingEncoding:NSUTF8StringEncoding]]; // [postBody appendData:[[NSString stringWithFormat:@"\r\n--%@--\r\n", stringBoundary] dataUsingEncoding:NSUTF8StringEncoding]]; NSLog(@"postBody=%@", [[NSString alloc] initWithData:postBody encoding:NSASCIIStringEncoding]); [urlRequest setHTTPBody:postBody]; NSLog(@"Image data=%@",[[NSString alloc] initWithData:imageData encoding:NSASCIIStringEncoding]); // Spawn a new thread so the UI isn't blocked while we're uploading the image [NSThread detachNewThreadSelector:@selector(uploadingDataWithURLRequest:) toTarget:self withObject:urlRequest]; I the method uploadingDataWithURLRequest i post the request to the server... Here is my php Code ?php $title = $_POST['title']; $isbn = $_POST['isbn']; $price = $_POST['price']; $condition = $_POST['condition']; $image=$_FILES['image']['name']; if($image) { $filename = 'newimage.jpeg'; file_put_contents($filename, $image); echo "image is there"; } else { echo "image is nil"; } ?> I am unable to get the image on server kindly help me where i am wrong.

    Read the article

  • Application is crash..

    - by user338322
    Below is my crash Report. 0 0x326712f8 in prepareForMethodLookup () 1 0x3266cf5c in lookUpMethod () 2 0x32668f28 in objc_msgSend_uncached () 3 0x33f70996 in NSPopAutoreleasePool () 4 0x33f82a6c in -[NSAutoreleasePool drain] () 5 0x00003d3e in -[CameraViewcontroller save:] (self=0x811400, _cmd=0x319c00d4, number=0x11e210) at /Users/hardikrathore/Desktop/LiveVideoRecording/Classes/CameraViewcontroller.m:266 6 0x33f36f8a in __NSFireDelayedPerform () 7 0x32da44c2 in CFRunLoopRunSpecific () 8 0x32da3c1e in CFRunLoopRunInMode () 9 0x31bb9374 in GSEventRunModal () 10 0x30bf3c30 in -[UIApplication _run] () 11 0x30bf2230 in UIApplicationMain () 12 0x00002650 in main (argc=1, argv=0x2ffff474) at /Users/hardikrathore/Desktop/LiveVideoRecording/main.m:14 And this is the code. lines, where I am getting the error. -(void)save:(id)number { NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init]; j =[number intValue]; while(screens[j] != NULL){ NSLog(@" image made : %d",j); UIImage * image = [UIImage imageWithCGImage:screens[j]]; image=[self imageByCropping:image toRect:CGRectMake(0, 0, 320, 240)]; NSData *imgdata = UIImageJPEGRepresentation(image,0.3); [image release]; CGImageRelease(screens[j]); screens[j] = NULL; UIImage * image1 = [UIImage imageWithCGImage:screens[j+1]]; image1=[self imageByCropping:image1 toRect:CGRectMake(0, 0, 320, 240)]; NSData *imgdata1 = UIImageJPEGRepresentation(image1,0.3); [image1 release]; CGImageRelease(screens[j+1]); screens[j+1] = NULL; NSString *urlString=@"http://www.test.itmate4.com/iPhoneToServerTwice.php"; // setting up the request object now NSMutableURLRequest *request = [[NSMutableURLRequest alloc]init]; [request setURL:[NSURL URLWithString:urlString]]; [request setHTTPMethod:@"POST"]; NSString *fileName=[VideoID stringByAppendingString:@"_"]; fileName=[fileName stringByAppendingString:[NSString stringWithFormat:@"%d",k]]; NSString *fileName2=[VideoID stringByAppendingString:@"_"]; fileName2=[fileName2 stringByAppendingString:[NSString stringWithFormat:@"%d",k+1]]; /* add some header info now we always need a boundary when we post a file also we need to set the content type You might want to generate a random boundary.. this is just the same as my output from wireshark on a valid html post */ NSString *boundary = [NSString stringWithString:@"---------------------------14737809831466499882746641449"]; NSString *contentType = [NSString stringWithFormat:@"multipart/form-data; boundary=%@",boundary]; [request addValue:contentType forHTTPHeaderField: @"Content-Type"]; /* now lets create the body of the post */ //NSString *count=[NSString stringWithFormat:@"%d",front];; NSMutableData *body = [NSMutableData data]; [body appendData:[[NSString stringWithFormat:@"\r\n--%@\r\n",boundary] dataUsingEncoding:NSUTF8StringEncoding]]; //[body appendData:[[NSString stringWithFormat:@"Content-Disposition: form-data; name=\"userfile\"; count=\"@\"";filename=\"%@.jpg\"\r\n",count,fileName] dataUsingEncoding:NSUTF8StringEncoding]]; [body appendData:[[NSString stringWithFormat:@"Content-Disposition: form-data; name=\"userfile\"; filename=\"%@.jpg\"\r\n",fileName] dataUsingEncoding:NSUTF8StringEncoding]]; [body appendData:[[NSString stringWithString:@"Content-Type: application/octet-stream\r\n\r\n"] dataUsingEncoding:NSUTF8StringEncoding]]; [body appendData:[NSData dataWithData:imgdata]]; [body appendData:[[NSString stringWithFormat:@"\r\n--%@--\r\n",boundary] dataUsingEncoding:NSUTF8StringEncoding]]; //second boundary NSString *string1 = [[NSString alloc] initWithFormat:@"\r\n--%@\r\n",boundary]; NSString *string2 =[[NSString alloc] initWithFormat:@"Content-Disposition: form-data; name=\"userfile2\"; filename=\"%@.jpg\"\r\n",fileName2]; NSString *string3 =[[NSString alloc] initWithFormat:@"\r\n--%@--\r\n",boundary]; [body appendData:[string1 dataUsingEncoding:NSUTF8StringEncoding]]; [body appendData:[string2 dataUsingEncoding:NSUTF8StringEncoding]]; //experiment //[body appendData:[[NSString stringWithFormat:@"Content-Disposition: form-data; name=\"userfile2\"; filename=\"%@.jpg\"\r\n",fileName2] dataUsingEncoding:NSUTF8StringEncoding]]; [body appendData:[[NSString stringWithString:@"Content-Type: application/octet-stream\r\n\r\n"] dataUsingEncoding:NSUTF8StringEncoding]]; [body appendData:[NSData dataWithData:imgdata1]]; //[body appendData:[[NSString stringWithFormat:@"\r\n--%@--\r\n",boundary] dataUsingEncoding:NSUTF8StringEncoding]]; [body appendData:[string3 dataUsingEncoding:NSUTF8StringEncoding]]; // setting the body of the post to the reqeust [request setHTTPBody:body]; // now lets make the connection to the web NSData *returnData = [NSURLConnection sendSynchronousRequest:request returningResponse:nil error:nil]; NSString *returnString = [[NSString alloc] initWithData:returnData encoding:NSUTF8StringEncoding]; if([returnString isEqualToString:@"SUCCESS"]) { NSLog(returnString); k=k+2; j=j+2; [self performSelectorInBackground:@selector(save:) withObject:(id)[NSNumber numberWithInt:j]]; } //k=k+2; [imgdata release]; [imgdata1 release]; [NSThread sleepForTimeInterval:.01]; } [pool drain]; <-------------Line 266 } As you can see in log report. I am getting the error, Line 266. Some autorelease problem Any help !!!? coz I am not getting why its happening.

    Read the article

  • iPhone: Crash in Custom Autorelease Pool

    - by user338322
    My app is crashing when I try to post images in an HTTP request. I am trying to upload images to a server. The crash appears related to my autorelease pool because the crash is trapped at the [pool release] message. Here is the crash report: #0 0x326712f8 in prepareForMethodLookup () #1 0x3266cf5c in lookUpMethod () #2 0x32668f28 in objc_msgSend_uncached () #3 0x33f70996 in NSPopAutoreleasePool () #4 0x33f82a6c in -[NSAutoreleasePool drain] () #5 0x00003d3e in -[CameraViewcontroller save:] (self=0x811400, _cmd=0x319c00d4, number=0x11e210) at /Users/hardikrathore/Desktop/LiveVideoRecording/Classes/CameraViewcontroller.m:266 #6 0x33f36f8a in __NSFireDelayedPerform () #7 0x32da44c2 in CFRunLoopRunSpecific () #8 0x32da3c1e in CFRunLoopRunInMode () #9 0x31bb9374 in GSEventRunModal () #10 0x30bf3c30 in -[UIApplication _run] () #11 0x30bf2230 in UIApplicationMain () #12 0x00002650 in main (argc=1, argv=0x2ffff474) at /Users/hardikrathore/Desktop/LiveVideoRecording/main.m:14 The crash report says that final line of the following code is the point of the crash. (Line No. 266) -(void)save:(id)number { NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init]; j =[number intValue]; while(screens[j] != NULL){ NSLog(@" image made : %d",j); UIImage * image = [UIImage imageWithCGImage:screens[j]]; image=[self imageByCropping:image toRect:CGRectMake(0, 0, 320, 240)]; NSData *imgdata = UIImageJPEGRepresentation(image,0.3); [image release]; CGImageRelease(screens[j]); screens[j] = NULL; UIImage * image1 = [UIImage imageWithCGImage:screens[j+1]]; image1=[self imageByCropping:image1 toRect:CGRectMake(0, 0, 320, 240)]; NSData *imgdata1 = UIImageJPEGRepresentation(image1,0.3); [image1 release]; CGImageRelease(screens[j+1]); screens[j+1] = NULL; NSString *urlString=@"http://www.test.itmate4.com/iPhoneToServerTwice.php"; // setting up the request object now NSMutableURLRequest *request = [[NSMutableURLRequest alloc]init]; [request setURL:[NSURL URLWithString:urlString]]; [request setHTTPMethod:@"POST"]; NSString *fileName=[VideoID stringByAppendingString:@"_"]; fileName=[fileName stringByAppendingString:[NSString stringWithFormat:@"%d",k]]; NSString *fileName2=[VideoID stringByAppendingString:@"_"]; fileName2=[fileName2 stringByAppendingString:[NSString stringWithFormat:@"%d",k+1]]; /* add some header info now we always need a boundary when we post a file also we need to set the content type You might want to generate a random boundary.. this is just the same as my output from wireshark on a valid html post */ NSString *boundary = [NSString stringWithString:@"---------------------------14737809831466499882746641449"]; NSString *contentType = [NSString stringWithFormat:@"multipart/form-data; boundary=%@",boundary]; [request addValue:contentType forHTTPHeaderField: @"Content-Type"]; /* now lets create the body of the post */ //NSString *count=[NSString stringWithFormat:@"%d",front];; NSMutableData *body = [NSMutableData data]; [body appendData:[[NSString stringWithFormat:@"\r\n--%@\r\n",boundary] dataUsingEncoding:NSUTF8StringEncoding]]; //[body appendData:[[NSString stringWithFormat:@"Content-Disposition: form-data; name=\"userfile\"; count=\"@\"";filename=\"%@.jpg\"\r\n",count,fileName] dataUsingEncoding:NSUTF8StringEncoding]]; [body appendData:[[NSString stringWithFormat:@"Content-Disposition: form-data; name=\"userfile\"; filename=\"%@.jpg\"\r\n",fileName] dataUsingEncoding:NSUTF8StringEncoding]]; [body appendData:[[NSString stringWithString:@"Content-Type: application/octet-stream\r\n\r\n"] dataUsingEncoding:NSUTF8StringEncoding]]; [body appendData:[NSData dataWithData:imgdata]]; [body appendData:[[NSString stringWithFormat:@"\r\n--%@--\r\n",boundary] dataUsingEncoding:NSUTF8StringEncoding]]; //second boundary NSString *string1 = [[NSString alloc] initWithFormat:@"\r\n--%@\r\n",boundary]; NSString *string2 =[[NSString alloc] initWithFormat:@"Content-Disposition: form-data; name=\"userfile2\"; filename=\"%@.jpg\"\r\n",fileName2]; NSString *string3 =[[NSString alloc] initWithFormat:@"\r\n--%@--\r\n",boundary]; [body appendData:[string1 dataUsingEncoding:NSUTF8StringEncoding]]; [body appendData:[string2 dataUsingEncoding:NSUTF8StringEncoding]]; //experiment //[body appendData:[[NSString stringWithFormat:@"Content-Disposition: form-data; name=\"userfile2\"; filename=\"%@.jpg\"\r\n",fileName2] dataUsingEncoding:NSUTF8StringEncoding]]; [body appendData:[[NSString stringWithString:@"Content-Type: application/octet-stream\r\n\r\n"] dataUsingEncoding:NSUTF8StringEncoding]]; [body appendData:[NSData dataWithData:imgdata1]]; //[body appendData:[[NSString stringWithFormat:@"\r\n--%@--\r\n",boundary] dataUsingEncoding:NSUTF8StringEncoding]]; [body appendData:[string3 dataUsingEncoding:NSUTF8StringEncoding]]; // setting the body of the post to the reqeust [request setHTTPBody:body]; // now lets make the connection to the web NSData *returnData = [NSURLConnection sendSynchronousRequest:request returningResponse:nil error:nil]; NSString *returnString = [[NSString alloc] initWithData:returnData encoding:NSUTF8StringEncoding]; if([returnString isEqualToString:@"SUCCESS"]) { NSLog(returnString); k=k+2; j=j+2; [self performSelectorInBackground:@selector(save:) withObject:(id)[NSNumber numberWithInt:j]]; } [imgdata release]; [imgdata1 release]; [NSThread sleepForTimeInterval:.01]; } [pool drain]; //<-------------Line 266 } I don't understand what is causing the crash.

    Read the article

  • Why is UITableView not reloading (even on the main thread)?

    - by radesix
    I have two programs that basically do the same thing. They read an XML feed and parse the elements. The design of both programs is to use an asynchronous NSURLConnection to get the data then to spawn a new thread to handle the parsing. As batches of 5 items are parsed it calls back to the main thread to reload the UITableView. My issue is it works fine in one program, but not the other. I know that the parsing is actually occuring on the background thread and I know that [tableView reloadData] is executing on the main thread; however, it doesn't reload the table until all parsing is complete. I'm stumped. As far as I can tell... both programs are structured exactly the same way. Here is some code from the app that isn't working correctly. - (void)startConnectionWithURL:(NSString *)feedURL feedList:(NSMutableArray *)list { self.feedList = list; // Use NSURLConnection to asynchronously download the data. This means the main thread will not be blocked - the // application will remain responsive to the user. // // IMPORTANT! The main thread of the application should never be blocked! Also, avoid synchronous network access on any thread. // NSURLRequest *feedURLRequest = [NSURLRequest requestWithURL:[NSURL URLWithString:feedURL]]; self.bloggerFeedConnection = [[[NSURLConnection alloc] initWithRequest:feedURLRequest delegate:self] autorelease]; // Test the validity of the connection object. The most likely reason for the connection object to be nil is a malformed // URL, which is a programmatic error easily detected during development. If the URL is more dynamic, then you should // implement a more flexible validation technique, and be able to both recover from errors and communicate problems // to the user in an unobtrusive manner. NSAssert(self.bloggerFeedConnection != nil, @"Failure to create URL connection."); // Start the status bar network activity indicator. We'll turn it off when the connection finishes or experiences an error. [UIApplication sharedApplication].networkActivityIndicatorVisible = YES; } - (void)connection:(NSURLConnection *)connection didReceiveResponse:(NSURLResponse *)response { self.bloggerData = [NSMutableData data]; } - (void)connection:(NSURLConnection *)connection didReceiveData:(NSData *)data { [bloggerData appendData:data]; } - (void)connectionDidFinishLoading:(NSURLConnection *)connection { self.bloggerFeedConnection = nil; [UIApplication sharedApplication].networkActivityIndicatorVisible = NO; // Spawn a thread to fetch the link data so that the UI is not blocked while the application parses the XML data. // // IMPORTANT! - Don't access UIKit objects on secondary threads. // [NSThread detachNewThreadSelector:@selector(parseFeedData:) toTarget:self withObject:bloggerData]; // farkData will be retained by the thread until parseFarkData: has finished executing, so we no longer need // a reference to it in the main thread. self.bloggerData = nil; } If you read this from the top down you can see when the NSURLConnection is finished I detach a new thread and call parseFeedData. - (void)parseFeedData:(NSData *)data { // You must create a autorelease pool for all secondary threads. NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init]; self.currentParseBatch = [NSMutableArray array]; self.currentParsedCharacterData = [NSMutableString string]; self.feedList = [NSMutableArray array]; // // It's also possible to have NSXMLParser download the data, by passing it a URL, but this is not desirable // because it gives less control over the network, particularly in responding to connection errors. // NSXMLParser *parser = [[NSXMLParser alloc] initWithData:data]; [parser setDelegate:self]; [parser parse]; // depending on the total number of links parsed, the last batch might not have been a "full" batch, and thus // not been part of the regular batch transfer. So, we check the count of the array and, if necessary, send it to the main thread. if ([self.currentParseBatch count] > 0) { [self performSelectorOnMainThread:@selector(addLinksToList:) withObject:self.currentParseBatch waitUntilDone:NO]; } self.currentParseBatch = nil; self.currentParsedCharacterData = nil; [parser release]; [pool release]; } In the did end element delegate I check to see that 5 items have been parsed before calling the main thread to perform the update. - (void)parser:(NSXMLParser *)parser didEndElement:(NSString *)elementName namespaceURI:(NSString *)namespaceURI qualifiedName:(NSString *)qName { if ([elementName isEqualToString:kItemElementName]) { [self.currentParseBatch addObject:self.currentItem]; parsedItemsCounter++; if (parsedItemsCounter % kSizeOfItemBatch == 0) { [self performSelectorOnMainThread:@selector(addLinksToList:) withObject:self.currentParseBatch waitUntilDone:NO]; self.currentParseBatch = [NSMutableArray array]; } } // Stop accumulating parsed character data. We won't start again until specific elements begin. accumulatingParsedCharacterData = NO; } - (void)addLinksToList:(NSMutableArray *)links { [self.feedList addObjectsFromArray:links]; // The table needs to be reloaded to reflect the new content of the list. if (self.viewDelegate != nil && [self.viewDelegate respondsToSelector:@selector(parser:didParseBatch:)]) { [self.viewDelegate parser:self didParseBatch:links]; } } Finally, the UIViewController delegate: - (void)parser:(XMLFeedParser *)parser didParseBatch:(NSMutableArray *)parsedBatch { NSLog(@"parser:didParseBatch:"); [self.selectedBlogger.feedList addObjectsFromArray:parsedBatch]; [self.tableView reloadData]; } If I write to the log when my view controller delegate fires to reload the table and when cellForRowAtIndexPath fires as it's rebuilding the table then the log looks something like this: parser:didParseBatch: parser:didParseBatch: tableView:cellForRowAtIndexPath tableView:cellForRowAtIndexPath tableView:cellForRowAtIndexPath tableView:cellForRowAtIndexPath tableView:cellForRowAtIndexPath parser:didParseBatch: parser:didParseBatch: parser:didParseBatch: tableView:cellForRowAtIndexPath tableView:cellForRowAtIndexPath tableView:cellForRowAtIndexPath tableView:cellForRowAtIndexPath tableView:cellForRowAtIndexPath parser:didParseBatch: tableView:cellForRowAtIndexPath tableView:cellForRowAtIndexPath tableView:cellForRowAtIndexPath tableView:cellForRowAtIndexPath tableView:cellForRowAtIndexPath parser:didParseBatch: parser:didParseBatch: parser:didParseBatch: parser:didParseBatch: tableView:cellForRowAtIndexPath tableView:cellForRowAtIndexPath tableView:cellForRowAtIndexPath tableView:cellForRowAtIndexPath tableView:cellForRowAtIndexPath Clearly, the tableView is not reloading when I tell it to every time. The log from the app that works correctly looks like this: parser:didParseBatch: tableView:cellForRowAtIndexPath tableView:cellForRowAtIndexPath tableView:cellForRowAtIndexPath tableView:cellForRowAtIndexPath tableView:cellForRowAtIndexPath parser:didParseBatch: tableView:cellForRowAtIndexPath tableView:cellForRowAtIndexPath tableView:cellForRowAtIndexPath tableView:cellForRowAtIndexPath tableView:cellForRowAtIndexPath parser:didParseBatch: tableView:cellForRowAtIndexPath tableView:cellForRowAtIndexPath tableView:cellForRowAtIndexPath tableView:cellForRowAtIndexPath tableView:cellForRowAtIndexPath parser:didParseBatch: tableView:cellForRowAtIndexPath tableView:cellForRowAtIndexPath tableView:cellForRowAtIndexPath tableView:cellForRowAtIndexPath tableView:cellForRowAtIndexPath parser:didParseBatch: tableView:cellForRowAtIndexPath tableView:cellForRowAtIndexPath tableView:cellForRowAtIndexPath tableView:cellForRowAtIndexPath tableView:cellForRowAtIndexPath

    Read the article

  • symbolicatecrash - space in bundle name preventing method names to be show in the crash report

    - by Brett Hamlin
    I'm trying to debug a crash but when I run symbolicatecrash against my crash log I get every method call in the stack trace except for my method calls. Here is the crash report: Incident Identifier: C3A58923-5D49-4767-A3C2-3AFFEF00DFEF CrashReporter Key: 165f7337feeb98394ab7477fc0b7280d14a16e43 Hardware Model: iPad1,1 Process: Log Jam [2862] Path: /var/mobile/Applications/625E17A7-F0FF-4109-9E62-99FE8D6C6889/Log Jam.app/Log Jam Identifier: Log Jam Version: ??? (???) Code Type: ARM (Native) Parent Process: launchd [1] Date/Time: 2010-12-13 23:31:20.762 -0500 OS Version: iPhone OS 4.2.1 (8C148) Report Version: 104 Exception Type: EXC_CRASH (SIGABRT) Exception Codes: 0x00000000, 0x00000000 Crashed Thread: 0 Thread 0 Crashed: 0 libSystem.B.dylib 0x30d7c2d4 __kill + 8 1 libSystem.B.dylib 0x30d7c2c4 kill + 4 2 libSystem.B.dylib 0x30d7c2b6 raise + 10 3 libSystem.B.dylib 0x30d90d72 abort + 50 4 libstdc++.6.dylib 0x34981a20 __gnu_cxx::__verbose_terminate_handler() + 376 5 libobjc.A.dylib 0x34a83594 _objc_terminate + 104 6 libstdc++.6.dylib 0x3497fdf2 __cxxabiv1::__terminate(void (*)()) + 46 7 libstdc++.6.dylib 0x3497fe46 std::terminate() + 10 8 libstdc++.6.dylib 0x3497ff16 __cxa_throw + 78 9 libobjc.A.dylib 0x34a824c4 objc_exception_throw + 64 10 CoreFoundation 0x3587a7c2 +[NSException raise:format:arguments:] + 62 11 CoreFoundation 0x3587a7fc +[NSException raise:format:] + 28 12 QuartzCore 0x31071222 CALayerSetPosition(CALayer*, CA::Vec2<double> const&, bool) + 134 13 QuartzCore 0x31071190 -[CALayer setPosition:] + 32 14 QuartzCore 0x310710dc -[CALayer setFrame:] + 384 15 UIKit 0x341aa0e2 -[UIView(Geometry) setFrame:] + 182 16 UIKit 0x341aad64 -[UILabel setFrame:] + 204 17 Log Jam 0x00052dec 0x1000 + 335340 18 Log Jam 0x0004934c 0x1000 + 295756 19 Log Jam 0x00048ffa 0x1000 + 294906 20 UIKit 0x341ef630 -[UINavigationController _startTransition:fromViewController:toViewController:] + 604 21 UIKit 0x341ef358 -[UINavigationController _startDeferredTransitionIfNeeded] + 176 22 UIKit 0x341e30be -[UINavigationController pushViewController:transition:forceImmediate:] + 634 23 UIKit 0x341e2e34 -[UINavigationController pushViewController:animated:] + 28 24 Log Jam 0x0002f792 0x1000 + 190354 25 UIKit 0x3420b834 -[UITableView _selectRowAtIndexPath:animated:scrollPosition:notifyDelegate:] + 656 26 UIKit 0x342cb60c -[UITableView _userSelectRowAtPendingSelectionIndexPath:] + 124 27 Foundation 0x31181df6 __NSFireDelayedPerform + 362 28 CoreFoundation 0x3583109c __CFRUNLOOP_IS_CALLING_OUT_TO_A_TIMER_CALLBACK_FUNCTION__ + 8 29 CoreFoundation 0x35830b54 __CFRunLoopDoTimer + 844 30 CoreFoundation 0x358021ae __CFRunLoopRun + 1082 31 CoreFoundation 0x35801c80 CFRunLoopRunSpecific + 224 32 CoreFoundation 0x35801b88 CFRunLoopRunInMode + 52 33 GraphicsServices 0x320c84a4 GSEventRunModal + 108 34 GraphicsServices 0x320c8550 GSEventRun + 56 35 UIKit 0x341dc322 -[UIApplication _run] + 406 36 UIKit 0x341d9e8c UIApplicationMain + 664 37 Log Jam 0x00002172 0x1000 + 4466 38 Log Jam 0x0000213c 0x1000 + 4412 Thread 1: 0 libSystem.B.dylib 0x30d30974 kevent + 24 1 libSystem.B.dylib 0x30dda704 _dispatch_mgr_invoke + 88 2 libSystem.B.dylib 0x30dda174 _dispatch_queue_invoke + 96 3 libSystem.B.dylib 0x30dd9b98 _dispatch_worker_thread2 + 120 4 libSystem.B.dylib 0x30d7e24a _pthread_wqthread + 258 5 libSystem.B.dylib 0x30d76970 start_wqthread + 0 Thread 2: 0 libSystem.B.dylib 0x30d7e9e0 __workq_kernreturn + 8 1 libSystem.B.dylib 0x30d7e364 _pthread_wqthread + 540 2 libSystem.B.dylib 0x30d76970 start_wqthread + 0 Thread 3: 0 libSystem.B.dylib 0x30d04268 mach_msg_trap + 20 1 libSystem.B.dylib 0x30d06354 mach_msg + 44 2 CoreFoundation 0x35802648 __CFRunLoopServiceMachPort + 88 3 CoreFoundation 0x35801ed2 __CFRunLoopRun + 350 4 CoreFoundation 0x35801c80 CFRunLoopRunSpecific + 224 5 CoreFoundation 0x35801b88 CFRunLoopRunInMode + 52 6 WebCore 0x34bf6124 RunWebThread(void*) + 332 7 libSystem.B.dylib 0x30d7d886 _pthread_start + 242 8 libSystem.B.dylib 0x30d72a88 thread_start + 0 Thread 4: 0 libSystem.B.dylib 0x30d04268 mach_msg_trap + 20 1 libSystem.B.dylib 0x30d06354 mach_msg + 44 2 AudioToolbox 0x33c0eb96 AURemoteIO::IOThread::Entry(void*) + 54 3 AudioToolbox 0x33b4a1d2 CAPThread::Entry(CAPThread*) + 138 4 libSystem.B.dylib 0x30d7d886 _pthread_start + 242 5 libSystem.B.dylib 0x30d72a88 thread_start + 0 Thread 5: 0 libSystem.B.dylib 0x30d04268 mach_msg_trap + 20 1 libSystem.B.dylib 0x30d06354 mach_msg + 44 2 CoreFoundation 0x35802648 __CFRunLoopServiceMachPort + 88 3 CoreFoundation 0x35801ed2 __CFRunLoopRun + 350 4 CoreFoundation 0x35801c80 CFRunLoopRunSpecific + 224 5 CoreFoundation 0x35801b88 CFRunLoopRunInMode + 52 6 Foundation 0x3118e5f6 +[NSURLConnection(NSURLConnectionReallyInternal) _resourceLoadLoop:] + 206 7 Foundation 0x3116c192 -[NSThread main] + 38 8 Foundation 0x31165242 __NSThread__main__ + 966 9 libSystem.B.dylib 0x30d7d886 _pthread_start + 242 10 libSystem.B.dylib 0x30d72a88 thread_start + 0 Thread 6: 0 libSystem.B.dylib 0x30d2868c select$DARWIN_EXTSN + 20 1 CoreFoundation 0x35839662 __CFSocketManager + 582 2 libSystem.B.dylib 0x30d7d886 _pthread_start + 242 3 libSystem.B.dylib 0x30d72a88 thread_start + 0 Thread 0 crashed with ARM Thread State: r0: 0x00000000 r1: 0x00000000 r2: 0x00000001 r3: 0x3e3d52e8 r4: 0x00000006 r5: 0x3497f989 r6: 0x03b74ccc r7: 0x2fdfe3ac r8: 0x00000000 r9: 0x00000065 r10: 0x00236e70 r11: 0x344b5cd8 ip: 0x00000025 sp: 0x2fdfe3ac lr: 0x30d7c2cb pc: 0x30d7c2d4 cpsr: 0x000f0010 Binary Images: 0x1000 - 0xabfff +Log Jam armv7 <467edd9ddbc1a52a6bb7009036bc5360> /var/mobile/Applications/625E17A7-F0FF-4109-9E62-99FE8D6C6889/Log Jam.app/Log Jam 0x1ed000 - 0x1eefff dns.so armv7 <fcefecb2d5e095ba88127eec3af57ec0> /usr/lib/info/dns.so 0x2fe00000 - 0x2fe27fff dyld armv7 <06e6959cebb4a72e66c833e26ae64d26> /usr/lib/dyld 0x3001f000 - 0x30026fff libbz2.1.0.dylib armv7 <2989ea7a5cad2cfe91bd632b041d0ff4> /usr/lib/libbz2.1.0.dylib 0x30054000 - 0x3016afff libicucore.A.dylib armv7 <e7fbb2ac586567e574dc33d7bb5c4dc9> /usr/lib/libicucore.A.dylib 0x301cd000 - 0x302b6fff AudioCodecs armv7 <be315c1e4982718460819fb240042952> /System/Library/Frameworks/AudioToolbox.framework/AudioCodecs 0x302b7000 - 0x30366fff WebKit armv7 <644a1c6120578f896bed7121307aa2af> /System/Library/PrivateFrameworks/WebKit.framework/WebKit 0x30367000 - 0x3037dfff EAP8021X armv7 <36659ec2b9def7b5798a05327e369247> /System/Library/PrivateFrameworks/EAP8021X.framework/EAP8021X 0x303fc000 - 0x3051cfff CoreGraphics armv7 <2d7b40a7baca915ce78b1dd9a0d6433b> /System/Library/Frameworks/CoreGraphics.framework/CoreGraphics 0x3056b000 - 0x3056bfff vecLib armv7 <e53d234e808c77d286161095f92c58cf> /System/Library/Frameworks/Accelerate.framework/Frameworks/vecLib.framework/vecLib 0x30641000 - 0x30700fff CFNetwork armv7 <02fe0e30e54fffdcbbbd02e8cb812c3a> /System/Library/Frameworks/CFNetwork.framework/CFNetwork 0x3075b000 - 0x3076efff libmis.dylib armv7 <855aefc263c6c20e6cf8723ea36125a2> /usr/lib/libmis.dylib 0x3076f000 - 0x307c4fff libvDSP.dylib armv7 <9365fc6cae1bff737257e74faf3b1f26> /System/Library/Frameworks/Accelerate.framework/Frameworks/vecLib.framework/libvDSP.dylib 0x307d8000 - 0x307defff StoreKit armv7 <f44ec361fe53962128632c6f3afd869b> /System/Library/Frameworks/StoreKit.framework/StoreKit 0x307e6000 - 0x307e8fff libgcc_s.1.dylib armv7 <e66758bcda6da5d7f9b54fa5c4de6da2> /usr/lib/libgcc_s.1.dylib 0x30811000 - 0x30813fff CrashReporterSupport armv7 <30a5f1edcdb9ffe868a620199a4cbe12> /System/Library/PrivateFrameworks/CrashReporterSupport.framework/CrashReporterSupport 0x30821000 - 0x30853fff AppSupport armv7 <47c8055ac99f187174ca373b702ffa68> /System/Library/PrivateFrameworks/AppSupport.framework/AppSupport 0x30854000 - 0x30854fff Accelerate armv7 <29dd5f17440bbb6e8e42e11b6fceda9a> /System/Library/Frameworks/Accelerate.framework/Accelerate 0x3091c000 - 0x30931fff libresolv.9.dylib armv7 <ea156820997ae9a2baf664d0f79f18d7> /usr/lib/libresolv.9.dylib 0x30b44000 - 0x30b46fff IOMobileFramebuffer armv7 <1040629f37795146c9dcac8ab1a868fc> /System/Library/PrivateFrameworks/IOMobileFramebuffer.framework/IOMobileFramebuffer 0x30c45000 - 0x30c74fff SystemConfiguration armv7 <3f982c11b5526fc39a92d585c60d8a90> /System/Library/Frameworks/SystemConfiguration.framework/SystemConfiguration 0x30c78000 - 0x30c8dfff OpenAL armv7 <8ea22c729b71c6e7e19566b91a03afd2> /System/Library/Frameworks/OpenAL.framework/OpenAL 0x30c8e000 - 0x30c98fff AccountSettings armv7 <19c79f81d5d55fe2e6b618fcdc28258e> /System/Library/PrivateFrameworks/AccountSettings.framework/AccountSettings 0x30d03000 - 0x30e14fff libSystem.B.dylib armv7 <138a43ab528bb428651e6aa7a2a7293c> /usr/lib/libSystem.B.dylib 0x30e16000 - 0x30e28fff PersistentConnection armv7 <cd2a699aa5036bdad0517603ba4db839> /System/Library/PrivateFrameworks/PersistentConnection.framework/PersistentConnection 0x30e37000 - 0x30f1ffff libGLProgrammability.dylib armv7 <1f478a71783cd7eb4ae9ef6f2dcea803> /System/Library/Frameworks/OpenGLES.framework/libGLProgrammability.dylib 0x30f20000 - 0x30f2bfff libz.1.dylib armv7 <fabaddbcbc8c02bab0261df9d78e0e25> /usr/lib/libz.1.dylib 0x30fc4000 - 0x31065fff Celestial armv7 <b411f4662383ec24dbfbcde8f4c23d67> /System/Library/PrivateFrameworks/Celestial.framework/Celestial 0x31066000 - 0x31114fff QuartzCore armv7 <83a8e5f0033369e437069c1e758fed83> /System/Library/Frameworks/QuartzCore.framework/QuartzCore 0x31161000 - 0x31280fff Foundation armv7 <81d36041f04318cb51db5aafed9ce504> /System/Library/Frameworks/Foundation.framework/Foundation 0x312af000 - 0x312b4fff libMobileGestalt.dylib armv7 <5f73c7138ee1cb7103a98aec99f9ed88> /usr/lib/libMobileGestalt.dylib 0x312c3000 - 0x31306fff ManagedConfiguration armv7 <27ac7f05482a8aa9977150f34f9be6eb> /System/Library/PrivateFrameworks/ManagedConfiguration.framework/ManagedConfiguration 0x31307000 - 0x31347fff CoreAudio armv7 <f32e03ee4c68f0db23f05afc9a3cc94c> /System/Library/Frameworks/CoreAudio.framework/CoreAudio 0x31429000 - 0x3142cfff ApplePushService armv7 <9d1eb7b11f0f146c941efbab2c055606> /System/Library/PrivateFrameworks/ApplePushService.framework/ApplePushService 0x318b5000 - 0x318d5fff PrintKit armv7 <02a9c6f4173a0673c4637a3b570345cd> /System/Library/PrivateFrameworks/PrintKit.framework/PrintKit 0x31bd9000 - 0x31c02fff MobileCoreServices armv7 <54484a513761868149405df7fc29b5c0> /System/Library/Frameworks/MobileCoreServices.framework/MobileCoreServices 0x31c5e000 - 0x31c66fff MobileBluetooth armv7 <6d6c62f52219d27be50f1d7c39a68dc6> /System/Library/PrivateFrameworks/MobileBluetooth.framework/MobileBluetooth 0x31c68000 - 0x31c6bfff CaptiveNetwork armv7 <a2af7147f5538d7669b14fa7b19b5a7c> /System/Library/PrivateFrameworks/CaptiveNetwork.framework/CaptiveNetwork 0x31c6d000 - 0x31d16fff libxml2.2.dylib armv7 <b3d82f80a777cb1434052ea2d232e3df> /usr/lib/libxml2.2.dylib 0x31d29000 - 0x31d2cfff IOSurface armv7 <deff02882166bf16d0765d68f0542cc8> /System/Library/PrivateFrameworks/IOSurface.framework/IOSurface 0x31d2d000 - 0x31d2ffff MobileInstallation armv7 <8e6b0d9f642be06729ffdaaee97053b0> /System/Library/PrivateFrameworks/MobileInstallation.framework/MobileInstallation 0x31d46000 - 0x31d4dfff AggregateDictionary armv7 <71372c95d4af7af787d0682a939e40ac> /System/Library/PrivateFrameworks/AggregateDictionary.framework/AggregateDictionary 0x31e09000 - 0x31e4bfff CoreTelephony armv7 <96d3af505b9f2887e62c7e99c157733e> /System/Library/Frameworks/CoreTelephony.framework/CoreTelephony 0x320c4000 - 0x320d0fff GraphicsServices armv7 <0099670dccd99466653956bf918d667a> /System/Library/PrivateFrameworks/GraphicsServices.framework/GraphicsServices 0x33ae9000 - 0x33aebfff libAccessibility.dylib armv7 <3f0b58ea13d30f0cdb73f6ffe6d4e75c> /usr/lib/libAccessibility.dylib 0x33b49000 - 0x33c82fff AudioToolbox armv7 <657b327f2ceee9f22f9474f2f9bddbe6> /System/Library/Frameworks/AudioToolbox.framework/AudioToolbox 0x33cf8000 - 0x33d29fff VideoToolbox armv7 <bb7ff9014b1dabec2acce95d41f05b59> /System/Library/PrivateFrameworks/VideoToolbox.framework/VideoToolbox 0x33d2c000 - 0x33d2ffff libGFXShared.dylib armv7 <3a385ed495379116abbe50bc8cd5a612> /System/Library/Frameworks/OpenGLES.framework/libGFXShared.dylib 0x33d30000 - 0x33d31fff CoreSurface armv7 <f7caaf43609cfe0e475dfe83790edb4d> /System/Library/PrivateFrameworks/CoreSurface.framework/CoreSurface 0x33d61000 - 0x33d7afff libRIP.A.dylib armv7 <ee16b5cee12a8947c8e511ed51ae7fef> /System/Library/Frameworks/CoreGraphics.framework/Resources/libRIP.A.dylib 0x340dc000 - 0x34112fff CoreText armv7 <b9b5c21b2d2a28abc47842c78c026ddf> /System/Library/Frameworks/CoreText.framework/CoreText 0x3415c000 - 0x3418ffff AddressBook armv7 <7c87e0175c8649d6832419da8a1cfac1> /System/Library/Frameworks/AddressBook.framework/AddressBook 0x341a5000 - 0x34526fff UIKit armv7 <de1cbd3219a74e4d41b30428f428e223> /System/Library/Frameworks/UIKit.framework/UIKit 0x34527000 - 0x345bafff ImageIO armv7 <5b5a294d4250eff866fdbf891b1e8b34> /System/Library/Frameworks/ImageIO.framework/ImageIO 0x345ca000 - 0x34607fff CoreMedia armv7 <4ea4d349e886206d1ecf5bae870f3f04> /System/Library/Frameworks/CoreMedia.framework/CoreMedia 0x34632000 - 0x34636fff AssetsLibraryServices armv7 <e861a330d14702f148ca5133dcbe954c> /System/Library/PrivateFrameworks/AssetsLibraryServices.framework/AssetsLibraryServices 0x34637000 - 0x34774fff MediaToolbox armv7 <a18bbcc41a38917fe0ae5e183d3f6b07> /System/Library/PrivateFrameworks/MediaToolbox.framework/MediaToolbox 0x34775000 - 0x34822fff JavaScriptCore armv7 <3f2df600942dc72aad312b3cc98ec479> /System/Library/PrivateFrameworks/JavaScriptCore.framework/JavaScriptCore 0x34852000 - 0x3485bfff CoreVideo armv7 <2092d5deb6b234e04678b7c1878ccd81> /System/Library/Frameworks/CoreVideo.framework/CoreVideo 0x3492e000 - 0x3493afff SpringBoardServices armv7 <137b75e19b2450c234dec88d538798ff> /System/Library/PrivateFrameworks/SpringBoardServices.framework/SpringBoardServices 0x3493d000 - 0x34987fff libstdc++.6.dylib armv7 <53a6e7239c3908fa8c2915b65ff3b056> /usr/lib/libstdc++.6.dylib 0x34a7d000 - 0x34b3efff libobjc.A.dylib armv7 <aaf5671a35f9ac20d5846703dafaf4c6> /usr/lib/libobjc.A.dylib 0x34b3f000 - 0x35127fff WebCore armv7 <d6bd9cf88ee82ab6b0e33e0ae1190772> /System/Library/PrivateFrameworks/WebCore.framework/WebCore 0x3520f000 - 0x352fcfff libiconv.2.dylib armv7 <c72b45f471df092dbd849081f7a3ef53> /usr/lib/libiconv.2.dylib 0x353e7000 - 0x353ecfff MobileKeyBag armv7 <cec3f3271fc267c32c169ed03e312d63> /System/Library/PrivateFrameworks/MobileKeyBag.framework/MobileKeyBag 0x3549d000 - 0x354d5fff libCGFreetype.A.dylib armv7 <374bd566263e8929c10d50d6a6a48a46> /System/Library/Frameworks/CoreGraphics.framework/Resources/libCGFreetype.A.dylib 0x35553000 - 0x35560fff OpenGLES armv7 <a12565ffb5bb42e3019f1957cd4951d0> /System/Library/Frameworks/OpenGLES.framework/OpenGLES 0x355b6000 - 0x355bcfff liblockdown.dylib armv7 <5bbd9b3f5cfece328f80c403a8805ce9> /usr/lib/liblockdown.dylib 0x357da000 - 0x358c0fff CoreFoundation armv7 <01441e01f5141a50ee723362e59ca400> /System/Library/Frameworks/CoreFoundation.framework/CoreFoundation 0x35992000 - 0x3599ffff libbsm.0.dylib armv7 <0f4e595e6eb2170aceb729f32b5de8c2> /usr/lib/libbsm.0.dylib 0x35b60000 - 0x35babfff libBLAS.dylib armv7 <251c5ac7380802a16e30d827c027c637> /System/Library/Frameworks/Accelerate.framework/Frameworks/vecLib.framework/libBLAS.dylib 0x35bac000 - 0x35e46fff libLAPACK.dylib armv7 <2e77d87e96af938aacf0a6008e6fb89d> /System/Library/Frameworks/Accelerate.framework/Frameworks/vecLib.framework/libLAPACK.dylib 0x35fca000 - 0x35fd2fff MobileWiFi armv7 <b29d4c5e300ef81060e38f72bb583c02> /System/Library/PrivateFrameworks/MobileWiFi.framework/MobileWiFi 0x3601b000 - 0x3603afff Bom armv7 <0f5fd6057bad5e1677869500d636821f> /System/Library/PrivateFrameworks/Bom.framework/Bom 0x3603b000 - 0x3603cfff DataMigration armv7 <babbc72d4d48325de147d5103d7bc00d> /System/Library/PrivateFrameworks/DataMigration.framework/DataMigration 0x3603d000 - 0x360acfff ProofReader armv7 <d2e62a8ab7e1460c7f6de8913c703e6d> /System/Library/PrivateFrameworks/ProofReader.framework/ProofReader 0x360ad000 - 0x36129fff AVFoundation armv7 <4c7356c795e01bd5c21b00a409a07476> /System/Library/Frameworks/AVFoundation.framework/AVFoundation 0x3612f000 - 0x36137fff libkxld.dylib armv7 <854e82fe66feef01e54c7c8a209851ac> /usr/lib/system/libkxld.dylib 0x36138000 - 0x3616ffff Security armv7 <cd28e102950634ae7167ddee9c686d36> /System/Library/Frameworks/Security.framework/Security 0x36170000 - 0x361bdfff libsqlite3.dylib armv7 <55038e5c1d4d0dbdd94295e8cad7a9a4> /usr/lib/libsqlite3.dylib 0x361be000 - 0x361f8fff IOKit armv7 <eb932cc42d60e55d9a4d0691bcc3d9ad> /System/Library/Frameworks/IOKit.framework/Versions/A/IOKit 0x3623f000 - 0x3627efff libGLImage.dylib armv7 <a7c117c92607a512823d307b8fdd0151> /System/Library/Frameworks/OpenGLES.framework/libGLImage.dylib As you can see, its not very helpful :-( Any help symbolicating this report would be much appreciated.

    Read the article

  • Application crashing on getting updated information from database using timer and storing it on loca

    - by Amit Battan
    In our multi - user application we are continuously interacting with database. We have a common class through which we are sending POST queries to database and obtaining xml files in return. We are using delegates of NSXMLParser to parse the obtained file. The problem with us is we are facing many crashes in it generally when application is idle and changed data in database is being fetched in background through timer which is invoked after every few seconds. We have also dealt with error handling through try and catch but it proves to be of no use in this case and mostly application crashes with following error : Exception Type: EXC_BAD_ACCESS (SIGBUS) Exception Codes: KERN_PROTECTION_FAILURE at 0x0000000000000020 Strange thing is that many times the fetching of updated data at background works very fine, same methods being successfully executed under similar conditions but suddenly it crashes on one of them. The codes we are using is as follows: // we are using timer in this way: chkOnlineUser=[NSTimer scheduledTimerWithTimeInterval:15 target:mmObject selector:@selector(threadOnlineUser) userInfo:NULL repeats:YES]; // this method being called in timer -(void)threadOnlineUser{//HeartBeat in Thread [NSThread detachNewThreadSelector:@selector(onlineUserRefresh) toTarget:self withObject:nil]; } // this performs actual updation -(void)onlineUserRefresh{ NSAutoreleasePool *pool =[[NSAutoreleasePool alloc]init]; @try{ if(chkTimer==1){ return; } chkTimer=1; if([allUserArray count]==0){ [user parseXMLFileUser:@"all" andFlag:3]; [allUserArray removeAllObjects]; [allUserArray addObjectsFromArray:[user users]]; } [objHeartBeat parseXMLFile:[loginID intValue] timeOut:10]; NSMutableDictionary *tDictOL=[[NSMutableDictionary alloc] init]; tDictOL=[objHeartBeat onLineList]; NSArray *tArray=[[NSArray alloc] init]; tArray=[[tDictOL objectForKey:@"onlineuser"] componentsSeparatedByString:@","]; [loginUserArray removeAllObjects]; for(int l=0;l less than [tArray count] ;l++){ int t;//=[[tArray objectAtIndex:l] intValue]; if([[allUserArray valueForKey:@"Id"] containsObject:[tArray objectAtIndex:l]]){ t = [[allUserArray valueForKey:@"Id"] indexOfObject:[tArray objectAtIndex:l]]; [loginUserArray addObject:[allUserArray objectAtIndex:t]]; } } [onlineTable reloadData]; [logInUserPopUp removeAllItems]; if([loginUserArray count]==1){ [labelLoginUser setStringValue:@"Only you are online"]; [logInUserPopUp setEnabled:YES]; }else{ [labelLoginUser setStringValue:[NSString stringWithFormat:@" %d users online",[loginUserArray count]]]; [logInUserPopUp setEnabled:YES]; } NSMenu *menu = [[NSMenu alloc] initWithTitle:@"menu"]; NSMenuItem *itemOne = [[NSMenuItem alloc] initWithTitle:@"" action:NULL keyEquivalent:@""]; [menu addItem:itemOne]; for(int l=0;l less than [loginUserArray count];l++){ NSString *tempStr= [NSString stringWithFormat:@"%@ %@",[[[loginUserArray objectAtIndex:l] objectForKey:@"user_fname"] stringByTrimmingCharactersInSet:[NSCharacterSet whitespaceAndNewlineCharacterSet]],[[[loginUserArray objectAtIndex:l] objectForKey:@"user_lname"] stringByTrimmingCharactersInSet:[NSCharacterSet whitespaceAndNewlineCharacterSet]]]; if(![tempStr isEqualToString:@""]){ NSMenuItem *itemOne = [[NSMenuItem alloc] initWithTitle:tempStr action:NULL keyEquivalent:@""]; [menu addItem:itemOne]; }else if(l==0){ NSMenuItem *itemOne = [[NSMenuItem alloc] initWithTitle:tempStr action:NULL keyEquivalent:@""]; [menu addItem:itemOne]; } } [logInUserPopUp setMenu:menu]; if([lastUpdateTime isEqualToString:@""]){ }else { [self fetchUpdatedInfo:lastUpdateTime]; [self fetchUpdatedGroup:lastUpdateTime];// function same as fetchUpdatedInfo [avObject fetchUpdatedInfo:lastUpdateTime];// function same as fetchUpdatedInfo [esTVObject fetchUpdatedInfo:lastUpdateTime];// function same as fetchUpdatedInfo } lastUpdateTime=[[tDictOL objectForKey:@"lastServerTime"] copy]; } @catch (NSException * e) { [queryByPost insertException:@"MainModule" inFun:@"onlineUserRefresh" excp:[e description] userId:[loginID intValue]]; NSRunAlertPanel(@"Error Panel", @"Main Module- onlineUserRefresh....%@", @"OK", nil, nil,e); } @finally { NSLog(@"Internal Update Before Bye"); chkTimer=0; NSLog(@"Internal Update Bye");// Some time application crashes after this log // Some time application crahses after "Internal Update Bye" log } } // The method which we are using to obtain updated data is of following form: -(void)fetchUpdatedInfo:(NSString *)UpdTime{ @try { if(initAfterLoginComplete==0){ return; } [user parseXMLFileUser:UpdTime andFlag:[loginID intValue]]; [tempUserUpdatedArray removeAllObjects]; [tempUserUpdatedArray addObjectsFromArray:[user users]]; if([tempUserUpdatedArray count]0){ if([contactsView isHidden]){ [topContactImg setImage:[NSImage imageNamed:@"btn_contacts_off_red.png"]]; }else { [topContactImg setImage:[NSImage imageNamed:@"btn_contacts_red.png"]]; } }else { return; } int chkprof=0; for(int l=0;l less than [tempUserUpdatedArray count];l++){ NSArray *tempArr1 = [allUserArray valueForKey:@"Id"]; int s; if([[[tempUserUpdatedArray objectAtIndex:l] objectForKey:@"Id"] intValue]==profile_Id){ chkprof=1; } if([tempArr1 containsObject:[[tempUserUpdatedArray objectAtIndex:l] objectForKey:@"Id"]]){ s = [tempArr1 indexOfObject:[[tempUserUpdatedArray objectAtIndex:l] objectForKey:@"Id"]]; [allUserArray replaceObjectAtIndex:s withObject:[tempUserUpdatedArray objectAtIndex:l]]; }else { [allUserArray addObject:[tempUserUpdatedArray objectAtIndex:l]]; } NSArray *tempArr2 = [tempUser valueForKey:@"Id"]; if([tempArr2 containsObject:[[tempUserUpdatedArray objectAtIndex:l] objectForKey:@"Id"]]){ s = [tempArr2 indexOfObject:[[tempUserUpdatedArray objectAtIndex:l] objectForKey:@"Id"]]; [tempUser replaceObjectAtIndex:s withObject:[tempUserUpdatedArray objectAtIndex:l]]; }else { [tempUser addObject:[tempUserUpdatedArray objectAtIndex:l]]; } } NSSortDescriptor *sortDescriptor = [[NSSortDescriptor alloc] initWithKey:@"user_fname" ascending:YES]; [tempUser sortUsingDescriptors:[NSMutableArray arrayWithObject:sortDescriptor]]; [userListTableView reloadData]; [groupsArray removeAllObjects]; for(int z=0;z less than [tempGroups count];z++){ NSMutableArray *tempMArr=[[NSMutableArray alloc] init]; for(int l=0;l less than [allUserArray count];l++){ if([[[allUserArray objectAtIndex:l] objectForKey:@"GroupId"] intValue]==[[[tempGroups objectAtIndex:z] objectForKey:@"group_id"] intValue]){ [tempMArr addObject:[allUserArray objectAtIndex:l]]; } } [groupsArray insertObject:tempMArr atIndex:z]; [tempMArr release]; tempMArr= nil; } for(int n=0;n less than [tempGroups count];n++){ [[groupsArray objectAtIndex:n] addObject:[tempGroups objectAtIndex:n]]; } [groupsListOV reloadData]; if(chkprof==1){ [self profileShow:profile_Id]; }else { } [self selectUserInTable:0]; }@catch (NSException * e) { NSRunAlertPanel(@"Error Panel", @"%@", @"OK", nil, nil,e); } } // The method which we are using to frame select query and parse obtained data is: -(void)parseXMLForUser:(int)UId stringVar:(NSString*)stringVar{ @try{ if(queryByPost) [queryByPost release]; queryByPost=[QueryByPost new]; // common class used to invoke method to send request via POST method //obtaining data for xml parsing NSString *query=[NSString stringWithFormat:@"Select * from userinfo update_time = '%@' AND NOT owner_id ='%d' ",stringVar,UId]; NSData *obtainedData=[queryByPost executeQuery:query WithAction:@"query"]; // method invoked to perform post query if(obtainedData==nil){ // data not obtained so return return; } // initializing dictionary to be obtained after parsing if(obtainedDictionary) [obtainedDictionary release]; obtainedDictionary=[NSMutableDictionary new]; // xml parsing if (updatedDataParser) // airportsListParser is an NSXMLParser instance variable [updatedDataParser release]; updatedDataParser = [[NSXMLParser alloc] initWithData:obtainedData]; [updatedDataParser setDelegate:self]; [updatedDataParser setShouldResolveExternalEntities:YES]; BOOL success = [updatedDataParser parse]; } @catch (NSException *e) { NSLog(@"wtihin parseXMLForUser- parseXMLForUser:stringVar: - %@",[e description]); } } //The method which will attempt to interact 4 times with server if interaction with it is found to be unsuccessful , is of following form: -(NSData*)executeQuery:(NSString*)query WithAction:(NSString*)doAction{ NSLog(@"within ExecuteQuery:WithAction: Query is: %@ and Action is: %@",query,doAction); NSString *returnResult; @try { NSString *returnResult; NSMutableURLRequest *postRequest; NSError *error; NSData *searchData; NSHTTPURLResponse *response; postRequest=[self directMySQLQuery:query WithAction:doAction]; // this method sends actual POST request NSLog(@"after directMYSQL in QueryByPost- performQuery... ErrorLogMsg"); searchData = [NSURLConnection sendSynchronousRequest:postRequest returningResponse:&response error:&error]; returnResult = [[NSString alloc] initWithData:searchData encoding:NSASCIIStringEncoding]; NSString *resultToBeCompared=[returnResult stringByTrimmingCharactersInSet:[NSCharacterSet whitespaceAndNewlineCharacterSet]]; NSLog(@"result obtained - %@/ resultToBeCompared - %@",returnResult,resultToBeCompared); if(![resultToBeCompared isEqualToString:@""]){ }else { sleep(10); postRequest=[self directMySQLQuery:query WithAction:doAction]; searchData = [NSURLConnection sendSynchronousRequest:postRequest returningResponse:&response error:&error]; if(![resultToBeCompared isEqualToString:@""]){ }else { sleep(10); postRequest=[self directMySQLQuery:query WithAction:doAction]; searchData = [NSURLConnection sendSynchronousRequest:postRequest returningResponse:&response error:&error]; if(![resultToBeCompared isEqualToString:@""]){ }else { sleep(10); postRequest=[self directMySQLQuery:query WithAction:doAction]; searchData = [NSURLConnection sendSynchronousRequest:postRequest returningResponse:&response error:&error]; if(![resultToBeCompared isEqualToString:@""]){ }else { sleep(10); postRequest=[self directMySQLQuery:query WithAction:doAction]; searchData = [NSURLConnection sendSynchronousRequest:postRequest returningResponse:&response error:&error]; if(![resultToBeCompared isEqualToString:@""]){ }else { return nil; } } } } } returnResult = [[NSString alloc] initWithData:searchData encoding:NSASCIIStringEncoding]; return searchData; } @catch (NSException * e) { NSLog(@"within QueryByPost , execurteQuery:WithAction - %@",[e description]); return nil; } } // The method which sends POST request to server , is of following form: -(NSMutableURLRequest *)directMySQLQuery:(NSString*)query WithAction:(NSString*)doAction{ @try{ NSLog(@"Query is: %@ and Action is: %@",query,doAction); // some pre initialization NSString *stringBoundary,*contentType; NSURL *cgiUrl ; NSMutableURLRequest *postRequest; NSMutableData *postBody; NSString *ans=@"434"; cgiUrl = [NSURL URLWithString:@"http://keysoftwareservices.com/API.php"]; postRequest = [NSMutableURLRequest requestWithURL:cgiUrl]; [postRequest setHTTPMethod:@"POST"]; stringBoundary = [NSString stringWithString:@"0000ABCQueryxxxxxx"]; contentType = [NSString stringWithFormat:@"multipart/form-data; boundary=%@", stringBoundary]; [postRequest addValue:contentType forHTTPHeaderField: @"Content-Type"]; //setting up the body: postBody = [NSMutableData data]; [postBody appendData:[[NSString stringWithFormat:@"\r\n\r\n--%@\r\n",stringBoundary] dataUsingEncoding:NSUTF8StringEncoding]]; [postBody appendData:[[NSString stringWithString:@"Content-Disposition: form-data; name=\"code\"\r\n\r\n"] dataUsingEncoding:NSUTF8StringEncoding]]; [postBody appendData:[[NSString stringWithString:ans] dataUsingEncoding:NSUTF8StringEncoding]]; [postBody appendData:[[NSString stringWithFormat:@"\r\n--%@\r\n",stringBoundary] dataUsingEncoding:NSUTF8StringEncoding]]; [postBody appendData:[[NSString stringWithString:@"Content-Disposition: form-data; name=\"action\"\r\n\r\n"] dataUsingEncoding:NSUTF8StringEncoding]]; [postBody appendData:[[NSString stringWithString:doAction] dataUsingEncoding:NSUTF8StringEncoding]]; [postBody appendData:[[NSString stringWithFormat:@"\r\n--%@\r\n",stringBoundary] dataUsingEncoding:NSUTF8StringEncoding]]; [postBody appendData:[[NSString stringWithString:@"Content-Disposition: form-data; name=\"devmode\"\r\n\r\n"] dataUsingEncoding:NSUTF8StringEncoding]]; [postBody appendData:[[NSString stringWithString:[[[NSBundle mainBundle] infoDictionary] objectForKey:@"devmode"]] dataUsingEncoding:NSUTF8StringEncoding]]; [postBody appendData:[[NSString stringWithFormat:@"\r\n--%@\r\n",stringBoundary] dataUsingEncoding:NSUTF8StringEncoding]]; [postBody appendData:[[NSString stringWithString:@"Content-Disposition: form-data; name=\"q\"\r\n\r\n"] dataUsingEncoding:NSUTF8StringEncoding]]; [postBody appendData:[[NSString stringWithString:query] dataUsingEncoding:NSUTF8StringEncoding]]; [postBody appendData:[[NSString stringWithFormat:@"\r\n--%@--\r\n",stringBoundary] dataUsingEncoding:NSUTF8StringEncoding]]; [postRequest setHTTPBody:postBody]; NSLog(@"Direct My SQL ok");// Some time application crashes afte this log //Some time application crashes after "Direct My SQL ok" log return [postRequest mutableCopy]; }@catch (NSException * e) { NSLog(@"NSException %@",e); NSRunAlertPanel(@"Error Panel", @"Within QueryByPost- directMySQLQuery...%@", @"OK", nil, nil,e); return nil; } }

    Read the article

  • Setting int more than once causes crash

    - by JulianB
    I'm doing a CABasicAnimation and getting the value from a nested NSMutableArray. Everything is great the first time it runs but crashes when called again either with custom functions or viewDidLoad. I've isolated it down to this line int int1 = [[[locationsArray objectAtIndex:0] objectAtIndex:0 ]integerValue] ; I assume it's to do with int not being a pointer but I'm lost as have to get the value without crashing the second time around Process: CEO Report 2011 [61880] Path: /Users/julian/Library/Application Support/iPhone Simulator/4.2/Applications/03CFB7BC-0722-4CA0-9E7D-39772AEEF444/CEO Report 2011.app/CEO Report 2011 Identifier: CEO Report 2011 Version: ??? (???) Code Type: X86 (Native) Parent Process: launchd [252] Date/Time: 2011-11-13 17:04:28.093 +0000 OS Version: Mac OS X 10.6.8 (10K549) Report Version: 6 Exception Type: EXC_BAD_ACCESS (SIGSEGV) Exception Codes: KERN_INVALID_ADDRESS at 0x000000005079706f Crashed Thread: 0 Dispatch queue: com.apple.main-thread Application Specific Information: objc_msgSend() selector name: objectAtIndex: iPhone Simulator 235, iPhone OS 4.2 (iPad/8C134) Thread 0 Crashed: Dispatch queue: com.apple.main-thread 0 libobjc.A.dylib 0x012f1a78 objc_msgSend + 44 1 CEO Report 2011 0x0001afbd -[TalentRVC doBoxes:] + 61 (TalentRVC.m:594) 2 CEO Report 2011 0x00017025 -[TalentRVC locationSelected:] + 1123 (TalentRVC.m:137) 3 CEO Report 2011 0x0001659f -[TalentRVC segmentedControlIndexChangedA] + 290 (TalentRVC.m:53) 4 UIKit 0x002fba6e -[UIApplication sendAction:to:from:forEvent:] + 119 5 UIKit 0x0038a1b5 -[UIControl sendAction:to:forEvent:] + 67 6 UIKit 0x0038c647 -[UIControl(Internal) _sendActionsForEvents:withEvent:] + 527 7 UIKit 0x0038a16c -[UIControl sendActionsForControlEvents:] + 49 8 UIKit 0x003c96b2 -[UISegmentedControl setSelectedSegmentIndex:] + 574 9 UIKit 0x003ce17e -[UISegmentedControl touchesBegan:withEvent:] + 971 10 UIKit 0x00320025 -[UIWindow _sendTouchesForEvent:] + 395 11 UIKit 0x0030137a -[UIApplication sendEvent:] + 447 12 UIKit 0x00306732 _UIApplicationHandleEvent + 7576 13 GraphicsServices 0x01a5ca36 PurpleEventCallback + 1550 14 CoreFoundation 0x01171064 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE1_PERFORM_FUNCTION__ + 52 15 CoreFoundation 0x010d16f7 __CFRunLoopDoSource1 + 215 16 CoreFoundation 0x010ce983 __CFRunLoopRun + 979 17 CoreFoundation 0x010ce240 CFRunLoopRunSpecific + 208 18 CoreFoundation 0x010ce161 CFRunLoopRunInMode + 97 19 GraphicsServices 0x01a5b268 GSEventRunModal + 217 20 GraphicsServices 0x01a5b32d GSEventRun + 115 21 UIKit 0x0030a42e UIApplicationMain + 1160 22 CEO Report 2011 0x00002864 main + 102 (main.m:14) 23 CEO Report 2011 0x000027f5 start + 53 Thread 1: Dispatch queue: com.apple.libdispatch-manager 0 libSystem.B.dylib 0x98a10382 kevent + 10 1 libSystem.B.dylib 0x98a10a9c _dispatch_mgr_invoke + 215 2 libSystem.B.dylib 0x98a0ff59 _dispatch_queue_invoke + 163 3 libSystem.B.dylib 0x98a0fcfe _dispatch_worker_thread2 + 240 4 libSystem.B.dylib 0x98a0f781 _pthread_wqthread + 390 5 libSystem.B.dylib 0x98a0f5c6 start_wqthread + 30 Thread 2: WebThread 0 libSystem.B.dylib 0x989e9afa mach_msg_trap + 10 1 libSystem.B.dylib 0x989ea267 mach_msg + 68 2 CoreFoundation 0x011714a6 __CFRunLoopServiceMachPort + 150 3 CoreFoundation 0x010ce874 __CFRunLoopRun + 708 4 CoreFoundation 0x010ce240 CFRunLoopRunSpecific + 208 5 CoreFoundation 0x010ce161 CFRunLoopRunInMode + 97 6 WebCore 0x023e1423 RunWebThread(void*) + 499 7 libSystem.B.dylib 0x98a17259 _pthread_start + 345 8 libSystem.B.dylib 0x98a170de thread_start + 34 Thread 3: 0 libSystem.B.dylib 0x989e9afa mach_msg_trap + 10 1 libSystem.B.dylib 0x989ea267 mach_msg + 68 2 CoreFoundation 0x011714a6 __CFRunLoopServiceMachPort + 150 3 CoreFoundation 0x010ce874 __CFRunLoopRun + 708 4 CoreFoundation 0x010ce240 CFRunLoopRunSpecific + 208 5 CoreFoundation 0x010ce161 CFRunLoopRunInMode + 97 6 Foundation 0x0009b162 +[NSURLConnection(NSURLConnectionReallyInternal) _resourceLoadLoop:] + 398 7 Foundation 0x00065d4c -[NSThread main] + 81 8 Foundation 0x00065cd8 __NSThread__main__ + 1387 9 libSystem.B.dylib 0x98a17259 _pthread_start + 345 10 libSystem.B.dylib 0x98a170de thread_start + 34 Thread 4: com.apple.CFSocket.private 0 libSystem.B.dylib 0x98a08ac6 select$DARWIN_EXTSN + 10 1 CoreFoundation 0x01102cbc __CFSocketManager + 812 2 libSystem.B.dylib 0x98a17259 _pthread_start + 345 3 libSystem.B.dylib 0x98a170de thread_start + 34 Thread 5: 0 libSystem.B.dylib 0x98a0f412 __workq_kernreturn + 10 1 libSystem.B.dylib 0x98a0f9a8 _pthread_wqthread + 941 2 libSystem.B.dylib 0x98a0f5c6 start_wqthread + 30 Thread 0 crashed with X86 Thread State (32-bit): eax: 0x5079706f ebx: 0x0001af8c ecx: 0x04c8a1ff edx: 0x00200855 edi: 0x010bfbd0 esi: 0x56e58955 ebp: 0xbfffd408 esp: 0xbfffd3d4 ss: 0x0000001f efl: 0x00010206 eip: 0x012f1a78 cs: 0x00000017 ds: 0x0000001f es: 0x0000001f fs: 0x00000000 gs: 0x00000037 cr2: 0x5079706f Binary Images: 0x1000 - 0x29ffb +CEO Report 2011 ??? (???) <C5838026-29D3-AF1E-8C66-F7F5C18CDDD2> /Users/julian/Library/Application Support/iPhone Simulator/4.2/Applications/03CFB7BC-0722-4CA0-9E7D-39772AEEF444/CEO Report 2011.app/CEO Report 2011 0x4a000 - 0x4cff7 +PBGDBIntrospectionSupport.A.dylib 1760.0.0 (compatibility 1.0.0) <C80BE225-06F2-4CB3-BF89-84A1B0FDCDA2> /Developer-3/Applications/Xcode.app/Contents/PlugIns/GDBMIDebugging.xcplugin/Contents/Resources/PBGDBIntrospectionSupport.A.dylib 0x51000 - 0x212fe7 +Foundation 751.49.0 (compatibility 300.0.0) <DB9A4461-C768-9B7B-E463-4568E3FAA179> /Developer-3/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator4.2.sdk/System/Library/Frameworks/Foundation.framework/Foundation 0x2ef000 - 0x7fbff3 +UIKit 1400.0.0 (compatibility 1.0.0) <EE783C53-A647-D7F8-62CF-FB3F7DD16C54> /Developer-3/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator4.2.sdk/System/Library/Frameworks/UIKit.framework/UIKit 0xa40000 - 0xc73ff7 com.apple.CoreGraphics 1.600.0 (???) <78926D2F-9A6C-8B48-BD99-72B3373872BD> /Developer-3/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator4.2.sdk/System/Library/Frameworks/CoreGraphics.framework/CoreGraphics 0xcdc000 - 0xe3affb +CoreData 320.15.0 (compatibility 1.0.0) <75D8B19C-E452-CB13-87FA-CBFD44D3A04F> /Developer-3/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator4.2.sdk/System/Library/Frameworks/CoreData.framework/CoreData 0xeb3000 - 0xefdffb +SystemConfiguration 379.0.0 (compatibility 1.0.0) <5A1E5868-7B70-7184-F4F6-B0FC574E49A0> /Developer-3/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator4.2.sdk/System/Library/Frameworks/SystemConfiguration.framework/SystemConfiguration 0xf1c000 - 0x100efef +QuartzCore 1.7.0 (compatibility 1.2.0) <FCA6F109-11B7-B38B-4EBF-D5C2CA9D5CE7> /Developer-3/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator4.2.sdk/System/Library/Frameworks/QuartzCore.framework/QuartzCore 0x1079000 - 0x108aff7 +libSystem.dylib 125.0.0 (compatibility 1.0.0) <76CE85FC-AAC8-DE1C-B533-ABCEF8783B8F> /Developer-3/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator4.2.sdk/usr/lib/libSystem.dylib 0x109d000 - 0x11ecfef +CoreFoundation 550.52.0 (compatibility 150.0.0) <CDA305C1-38E1-514F-0EFB-4B6A58E296D5> /Developer-3/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator4.2.sdk/System/Library/Frameworks/CoreFoundation.framework/CoreFoundation 0x12de000 - 0x13abfe3 +libobjc.A.dylib 227.0.0 (compatibility 1.0.0) <FEB8BB90-29E8-F87A-EA47-9395667DA191> /Developer-3/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator4.2.sdk/usr/lib/libobjc.A.dylib 0x13fd000 - 0x15a3fe7 +libicucore.A.dylib 45.0.0 (compatibility 1.0.0) <05674AB8-3A5A-0D89-79F8-EA0817A32D38> /Developer-3/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator4.2.sdk/usr/lib/libicucore.A.dylib 0x160f000 - 0x170efe7 +libxml2.2.dylib 10.3.0 (compatibility 10.0.0) <08B31BB7-E603-0C9A-1D7D-17637EFEDA54> /Developer-3/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator4.2.sdk/usr/lib/libxml2.2.dylib 0x1733000 - 0x1741ff7 +libz.1.dylib 1.2.3 (compatibility 1.0.0) <F91C1567-31B2-CEFD-2D61-1B76C9F89E6A> /Developer-3/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator4.2.sdk/usr/lib/libz.1.dylib 0x1746000 - 0x188cff7 +CFNetwork 485.12.7 (compatibility 1.0.0) <FCD41C21-04EF-CDBB-84AC-9017DC3BF552> /Developer-3/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator4.2.sdk/System/Library/Frameworks/CFNetwork.framework/CFNetwork 0x190a000 - 0x196efeb +Security ??? (???) <1D093A0E-0E15-231C-F11D-0645230EF7A1> /Developer-3/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator4.2.sdk/System/Library/Frameworks/Security.framework/Security 0x1996000 - 0x1999ff7 +IOKit 275.0.0 (compatibility 1.0.0) <E244134E-FFD4-D9C4-BF8E-E1235C0C17B7> /Developer-3/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator4.2.sdk/System/Library/Frameworks/IOKit.framework/IOKit 0x19a1000 - 0x19b7ff7 +libSystem.override.dylib ??? (???) <477EA8CC-61D1-D179-A7B6-2BB7C377600B> /Developer-3/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator4.2.sdk/usr/lib/system/libSystem.override.dylib 0x19c2000 - 0x1a43ffb +libsqlite3.dylib 9.6.0 (compatibility 9.0.0) <BCEA48F2-1BF3-BD41-F3D8-D905806BFA57> /Developer-3/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator4.2.sdk/usr/lib/libsqlite3.dylib 0x1a55000 - 0x1a65fe3 +GraphicsServices 14.0.0 (compatibility 1.0.0) <BA0B832B-2252-0434-BFD7-99415BEDF76B> /Developer-3/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator4.2.sdk/System/Library/PrivateFrameworks/GraphicsServices.framework/GraphicsServices 0x1a76000 - 0x1c13ff3 +JavaScriptCore 533.17.9 (compatibility 1.0.0) <8B97277F-F677-F9B0-F82F-5E1E608EFA84> /Developer-3/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator4.2.sdk/System/Library/PrivateFrameworks/JavaScriptCore.framework/JavaScriptCore 0x1c66000 - 0x1d47ffb +ImageIO ??? (???) <6FAE198A-EAC4-9FBF-A922-1DF8200FD269> /Developer-3/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator4.2.sdk/System/Library/Frameworks/ImageIO.framework/ImageIO 0x1d71000 - 0x1dbdff3 +AddressBook 30.0.0 (compatibility 1.0.0) <A011434A-1249-3B7D-97EF-08F0AA0EFBB3> /Developer-3/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator4.2.sdk/System/Library/Frameworks/AddressBook.framework/AddressBook 0x1de7000 - 0x1f7efe7 +AudioToolbox 296.0.0 (compatibility 1.0.0) <C35F6411-41EB-92EC-F0E1-E3328746061D> /Developer-3/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator4.2.sdk/System/Library/Frameworks/AudioToolbox.framework/AudioToolbox 0x1fd2000 - 0x1fe5fff +SpringBoardServices ??? (???) <AE58FA0A-B824-CF60-3F40-4CEBBFC2F236> /Developer-3/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator4.2.sdk/System/Library/PrivateFrameworks/SpringBoardServices.framework/SpringBoardServices 0x1ff1000 - 0x2034ffb +AppSupport 29.0.0 (compatibility 1.0.0) <1B38F0B4-36BB-5BEB-917A-A5CFBFCEDADA> /Developer-3/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator4.2.sdk/System/Library/PrivateFrameworks/AppSupport.framework/AppSupport 0x2059000 - 0x20c7fe3 +CoreText ??? (???) <EE0D05CA-772A-9D07-7931-06B948B209D5> /Developer-3/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator4.2.sdk/System/Library/Frameworks/CoreText.framework/CoreText 0x20f4000 - 0x2136feb +MobileCoreServices 20.0.0 (compatibility 1.0.0) <0F2407B2-C515-C6AC-B72B-0BA21568B152> /Developer-3/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator4.2.sdk/System/Library/Frameworks/MobileCoreServices.framework/MobileCoreServices 0x2150000 - 0x2231ff7 +WebKit 533.17.9 (compatibility 1.0.0) <C2BA78C7-45EC-54AA-E020-D7FD6ECE06F9> /Developer-3/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator4.2.sdk/System/Library/PrivateFrameworks/WebKit.framework/WebKit 0x22a9000 - 0x3090ffb +WebCore 533.17.9 (compatibility 1.0.0) <D9EEBA8C-F9D4-FAF4-E0BF-58CE7DAAFB96> /Developer-3/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator4.2.sdk/System/Library/PrivateFrameworks/WebCore.framework/WebCore 0x358c000 - 0x363ffe3 +ProofReader 101.0.0 (compatibility 1.0.0) <196C8CFD-C6BA-A5DE-5785-7F6042DC6425> /Developer-3/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator4.2.sdk/System/Library/PrivateFrameworks/ProofReader.framework/ProofReader 0x3656000 - 0x3659ff7 +libAccessibility.dylib ??? (???) <BFB0EA39-9E6F-026C-0C23-66A12AB3D336> /Developer-3/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator4.2.sdk/usr/lib/libAccessibility.dylib 0x3661000 - 0x368fff7 +PrintKit 66.0.0 (compatibility 1.0.0) <F171F166-8B5C-FBC7-497E-9DCDEB158348> /Developer-3/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator4.2.sdk/System/Library/PrivateFrameworks/PrintKit.framework/PrintKit 0x36a3000 - 0x3724fe3 +CoreTelephony 383.8.3 (compatibility 1.0.0) <7BEDF930-9CA4-E6A2-BBCE-C6E7A14DEE69> /Developer-3/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator4.2.sdk/System/Library/Frameworks/CoreTelephony.framework/CoreTelephony 0x3767000 - 0x3768fff +DataMigration ??? (???) <87E44081-5DCB-6597-6865-90780FEB8597> /Developer-3/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator4.2.sdk/System/Library/PrivateFrameworks/DataMigration.framework/DataMigration 0x376d000 - 0x3770ff7 +MobileInstallation ??? (???) <DFD90490-F485-6945-1ABE-F4D6C7A94574> /Developer-3/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator4.2.sdk/System/Library/PrivateFrameworks/MobileInstallation.framework/MobileInstallation 0x3776000 - 0x37aafff +Bom 157.0.0 (compatibility 2.0.0) <7FE61FCF-0E89-0744-F24C-2D1F6C1EAE89> /Developer-3/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator4.2.sdk/System/Library/PrivateFrameworks/Bom.framework/Bom 0x37b7000 - 0x37c4fe7 +libbz2.1.0.dylib 1.0.5 (compatibility 1.0.0) <BD82EE16-8FB3-A7F5-4CC0-EDE15AC18507> /Developer-3/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator4.2.sdk/usr/lib/libbz2.1.0.dylib 0x37c9000 - 0x37d4ff7 +AggregateDictionary ??? (???) <37904D52-6186-14BB-560B-D8B21316BB52> /Developer-3/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator4.2.sdk/System/Library/PrivateFrameworks/AggregateDictionary.framework/AggregateDictionary 0x37df000 - 0x3853ff7 +CoreAudio ??? (???) <0669925D-3993-07DC-9E76-369C1709553E> /Developer-3/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator4.2.sdk/System/Library/Frameworks/CoreAudio.framework/CoreAudio 0x3888000 - 0x3cf8ff3 +libBLAS.dylib ??? (???) <3EE46AD9-7807-F326-E0AF-BAEF5939654B> /Developer-3/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator4.2.sdk/System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib.framework/Versions/A/libBLAS.dylib 0x3d1e000 - 0x4160fe7 +libLAPACK.dylib ??? (???) <F66279A8-EE9C-5723-C3A0-E507ED462F8F> /Developer-3/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator4.2.sdk/System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib.framework/Versions/A/libLAPACK.dylib 0x418c000 - 0x4198ff7 +CoreVideo 1.6.1 (compatibility 1.2.0) <966447F0-FB24-EC43-006E-CD32F1924481> /Developer-3/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator4.2.sdk/System/Library/Frameworks/CoreVideo.framework/CoreVideo 0x41a5000 - 0x41b6ff7 +OpenGLES ??? (???) <EC9C05E6-BC78-B1B0-2044-7189D39A06FE> /Developer-3/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator4.2.sdk/System/Library/Frameworks/OpenGLES.framework/OpenGLES 0x41bf000 - 0x41c4ff3 +libGFXShared.dylib ??? (???) <0694A0A1-F539-2856-C2BA-61D323D56DEF> /Developer-3/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator4.2.sdk/System/Library/Frameworks/OpenGLES.framework/libGFXShared.dylib 0x41ca000 - 0x4205ff7 +libGLImage.dylib ??? (???) <9318562A-FDB5-0722-FC9C-BA0057BD3F53> /Developer-3/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator4.2.sdk/System/Library/Frameworks/OpenGLES.framework/libGLImage.dylib 0x420e000 - 0x4319ff7 +libGLProgrammability.dylib ??? (???) <F7AC6198-8A35-5DC9-2BDD-AD03BEC21EF5> /Developer-3/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator4.2.sdk/System/Library/Frameworks/OpenGLES.framework/libGLProgrammability.dylib 0x4339000 - 0x4340fff +libCoreVMClient.dylib ??? (???) <785DDEAB-CB21-E1A6-35C2-A7A3E02E48B2> /Developer-3/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator4.2.sdk/System/Library/Frameworks/OpenGLES.framework/libCoreVMClient.dylib 0x4348000 - 0x4b2ef4f +libLLVMContainer.dylib ??? (???) <067A9A4D-1B73-B338-BD26-54D28AFCC04F> /Developer-3/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator4.2.sdk/System/Library/Frameworks/OpenGLES.framework/libLLVMContainer.dylib 0x4c85000 - 0x4c8aff3 +AssetsLibraryServices ??? (???) <5BC721E0-FB4E-B81B-4FED-DF7189AD8BA0> /Developer-3/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator4.2.sdk/System/Library/PrivateFrameworks/AssetsLibraryServices.framework/AssetsLibraryServices 0x4c90000 - 0x4c90ff7 +libresolv.dylib 41.0.0 (compatibility 1.0.0) <78A807DB-B13E-9550-9C2E-8DA1DCBFEE8A> /Developer-3/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator4.2.sdk/usr/lib/libresolv.dylib 0x4f52000 - 0x4f9ffe7 +libCGFreetype.A.dylib 600.0.0 (compatibility 64.0.0) <2DFF120B-1542-ED85-07DC-EE7394592B76> /Developer-3/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator4.2.sdk/System/Library/Frameworks/CoreGraphics.framework/Resources/libCGFreetype.A.dylib 0x4fb7000 - 0x4fe0fe7 +libRIP.A.dylib 600.0.0 (compatibility 64.0.0) <0E986874-F95E-1CA2-C221-E99DBD2E6AB1> /Developer-3/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator4.2.sdk/System/Library/Frameworks/CoreGraphics.framework/Resources/libRIP.A.dylib 0xbeb0000 - 0xbeb9fff +WebUI ??? (???) <33AE9B5E-6083-2103-174B-2E6EC60A58A6> /Developer-3/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator4.2.sdk/System/Library/PrivateFrameworks/WebUI.framework/WebUI 0xbec3000 - 0xbec7ff3 +CertUI ??? (???) <5C86FEAC-C796-A9EA-076F-5A34B74B755E> /Developer-3/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator4.2.sdk/System/Library/PrivateFrameworks/CertUI.framework/CertUI 0xbece000 - 0xbed4ff3 +libMobileGestalt.dylib ??? (???) <1A9029E7-6BCA-46F5-0FAE-FB96EED30A05> /Developer-3/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator4.2.sdk/usr/lib/libMobileGestalt.dylib 0xbedc000 - 0xbeefffb +PersistentConnection ??? (???) <E7C7258E-A316-B701-08C2-2A58A90211AB> /Developer-3/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator4.2.sdk/System/Library/PrivateFrameworks/PersistentConnection.framework/PersistentConnection 0xc210000 - 0xc26bff7 +ManagedConfiguration ??? (???) <85935272-F391-D5FF-9976-EFC8560AC1CB> /Developer-3/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator4.2.sdk/System/Library/PrivateFrameworks/ManagedConfiguration.framework/ManagedConfiguration 0xc2a9000 - 0xc2b7ff3 +AccountSettings ??? (???) <E77F2419-8ADC-3CC5-23A9-74F2CECA68B3> /Developer-3/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator4.2.sdk/System/Library/PrivateFrameworks/AccountSettings.framework/AccountSettings 0xc2c1000 - 0xc2c5fff +ApplePushService ??? (???) <218FD678-275F-0EDC-C9FF-D03062736212> /Developer-3/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator4.2.sdk/System/Library/PrivateFrameworks/ApplePushService.framework/ApplePushService 0xc2cb000 - 0xc2dcffb +DataDetectorsUI 52.0.0 (compatibility 1.0.0) <A2C9C080-84D0-5B51-40BE-4B6A7C512D91> /Developer-3/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator4.2.sdk/System/Library/PrivateFrameworks/DataDetectorsUI.framework/DataDetectorsUI 0xc2e9000 - 0xc2fdfe7 +DataDetectorsCore 154.0.0 (compatibility 1.0.0) <113CA3D9-474B-1223-ACA7-EB4D473C1583> /Developer-3/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator4.2.sdk/System/Library/PrivateFrameworks/DataDetectorsCore.framework/DataDetectorsCore 0xcdbd000 - 0xce00ff3 +QuickLook ??? (???) <94F8984E-BCEA-ADED-7749-C29CE5E04C68> /Developer-3/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator4.2.sdk/System/Library/Frameworks/QuickLook.framework/QuickLook 0xce29000 - 0xcf75fff +RawCamera 1.0.1 (compatibility 1.0.0) <33F076B3-56FC-6978-3FD7-DF5B1A416D02> /Developer-3/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator4.2.sdk/System/Library/CoreServices/RawCamera.bundle/RawCamera 0x8fe00000 - 0x8fe4163b dyld 132.1 (???) <4CDE4F04-0DD6-224E-ACE5-3C06E169A801> /usr/lib/dyld 0x91590000 - 0x91593fe7 libmathCommon.A.dylib 315.0.0 (compatibility 1.0.0) <1622A54F-1A98-2CBE-B6A4-2122981A500E> /usr/lib/system/libmathCommon.A.dylib 0x91681000 - 0x91681ff7 com.apple.Accelerate 1.6 (Accelerate 1.6) <3891A689-4F38-FACD-38B2-4BF937DE30CF> /System/Library/Frameworks/Accelerate.framework/Versions/A/Accelerate 0x92ff7000 - 0x930ebff7 libiconv.2.dylib 7.0.0 (compatibility 7.0.0) <061ABF36-8BA9-79C1-6CE7-EC69A4998F51> /usr/lib/libiconv.2.dylib 0x9352d000 - 0x93541fe7 libbsm.0.dylib ??? (???) <821E415B-6C42-D359-78FF-E892792F8C52> /usr/lib/libbsm.0.dylib 0x9554f000 - 0x9562ffe7 com.apple.vImage 4.1 (4.1) <D029C515-08E1-93A6-3705-DD062A3A672C> /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vImage.framework/Versions/A/vImage 0x95630000 - 0x9569afe7 libstdc++.6.dylib 7.9.0 (compatibility 7.0.0) <411D87F4-B7E1-44EB-F201-F8B4F9227213> /usr/lib/libstdc++.6.dylib 0x97f72000 - 0x97f7eff7 libkxld.dylib ??? (???) <9A441C48-2D18-E716-5F38-CBEAE6A0BB3E> /usr/lib/system/libkxld.dylib 0x97f7f000 - 0x97f7fff7 com.apple.vecLib 3.6 (vecLib 3.6) <FF4DC8B6-0AB0-DEE8-ADA8-7B57645A1F36> /System/Library/Frameworks/vecLib.framework/Versions/A/vecLib 0x9869b000 - 0x986bbfe7 libresolv.9.dylib 41.0.0 (compatibility 1.0.0) <BF7FF2F6-5FD3-D78F-77BC-9E2CB2A5E309> /usr/lib/libresolv.9.dylib 0x98704000 - 0x98746ff7 libvDSP.dylib 268.0.1 (compatibility 1.0.0) <8A4721DE-25C4-C8AA-EA90-9DA7812E3EBA> /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib.framework/Versions/A/libvDSP.dylib 0x98747000 - 0x987b6ff7 libvMisc.dylib 268.0.1 (compatibility 1.0.0) <595A5539-9F54-63E6-7AAC-C04E1574B050> /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib.framework/Versions/A/libvMisc.dylib 0x989e9000 - 0x98b90ff7 libSystem.B.dylib 125.2.11 (compatibility 1.0.0) <2DCD13E3-1BD1-6F25-119A-3863A3848B90> /usr/lib/libSystem.B.dylib 0x9a4e5000 - 0x9a542ff7 com.apple.framework.IOKit 2.0 (???) <3DABAB9C-4949-F441-B077-0498F8E47A35> /System/Library/Frameworks/IOKit.framework/Versions/A/IOKit 0xffff0000 - 0xffff1fff libSystem.B.dylib ??? (???) <2DCD13E3-1BD1-6F25-119A-3863A3848B90> /usr/lib/libSystem.B.dylib EDIT: After turning on NSZombieEnabled looks like my NSMutableArray is being deallocated? .h @interface TalentRVC : UIViewController <locationGlobalMenuDelegate, industryGlobalMenuDelegate>{ NSMutableArray *locationsArray; } @property (nonatomic, retain) NSMutableArray *locationsArray; @end .m -(void)buildArrays { locationsArray = [NSMutableArray arrayWithCapacity: 8]; for (int i = 0; i!=8; i++){ NSMutableArray *array = [NSMutableArray arrayWithCapacity: 8]; [locationsArray addObject: array]; } //Africa [[locationsArray objectAtIndex:0] addObject: [NSNumber numberWithInt: 83]]; ... //Middle East [[locationsArray objectAtIndex:1] addObject: [NSNumber numberWithInt: 89]]; ... NSLog(@"Built locationsArray"); } So after running the first time locationsArray is dumped from memory? If so, how do I can it?

    Read the article

  • unrecognized selector sent to instance in xcode using objective c and sup as backend

    - by user1765037
    I am a beginner in native development.I made a project using xcode in objective C.It builded successfully.But when I run the project ,an error came like 'unrecognized selector sent to instance'.Why this is happening ?can anyone help me to solve this?I am attaching the error that I am getting with this.. And I am posting the code with this.... ConnectionController.m #import "ConnectionController.h" #import "SUPApplication.h" #import "Flight_DetailsFlightDB.h" #import "CallbackHandler.h" @interface ConnectionController() @property (nonatomic,retain)CallbackHandler *callbackhandler; @end @implementation ConnectionController @synthesize callbackhandler; static ConnectionController *appConnectionController; //Begin Application Setup +(void)beginApplicationSetup { if(!appConnectionController) { appConnectionController = [[[ConnectionController alloc]init]retain]; appConnectionController.callbackhandler = [[CallbackHandler getInstance]retain]; } if([SUPApplication connectionStatus] == SUPConnectionStatus_DISCONNECTED) [appConnectionController setupApplicationConnection]; else NSLog(@"Already Connected"); } -(BOOL)setupApplicationConnection { SUPApplication *app = [SUPApplication getInstance]; [app setApplicationIdentifier:@"HWC"]; [app setApplicationCallback:self.callbackhandler]; NSLog(@"inside setupApp"); SUPConnectionProperties *properties = [app connectionProperties]; NSLog(@"server"); [properties setServerName:@"sapecxxx.xxx.com"]; NSLog(@"inside setupAppser"); [properties setPortNumber:5001]; NSLog(@"inside setupApppot"); [properties setFarmId:@"0"]; NSLog(@"inside setupAppfarm"); [properties setUrlSuffix:@"/tm/?cid=%cid%"]; NSLog(@"inside setupAppurlsuff"); [properties setNetworkProtocol:@"http"]; SUPLoginCredentials *loginCred = [SUPLoginCredentials getInstance]; NSLog(@"inside setupAppmac"); [loginCred setUsername:@"mac"]; [loginCred setPassword:nil]; [properties setLoginCredentials:loginCred]; [properties setActivationCode:@"1234"]; if(![Flight_DetailsFlightDB databaseExists]) { [Flight_DetailsFlightDB createDatabase]; } SUPConnectionProfile *connprofile = [Flight_DetailsFlightDB getSynchronizationProfile]; [connprofile setNetworkProtocol:@"http"]; NSLog(@"inside setupAppPort2"); [connprofile setPortNumber:2480]; NSLog(@"inside setupAppser2"); [connprofile setServerName:@"sapecxxx.xxx.com"]; NSLog(@"inside setupAppdom2"); [connprofile setDomainName:@"Development"]; NSLog(@"inside setupAppuser"); [connprofile setUser:@"supAdmin"]; [connprofile setPassword:@"s3pAdmin"]; [connprofile setAsyncReplay:YES]; [connprofile setClientId:@"0"]; // [Flight_DetailsFlightDB beginOnlineLogin:@"supAdmin" password:@"s3pAdmin"]; [Flight_DetailsFlightDB registerCallbackHandler:self.callbackhandler]; [Flight_DetailsFlightDB setApplication:app]; if([SUPApplication connectionStatus] == SUPRegistrationStatus_REGISTERED) { [app startConnection:0]; } else { [app registerApplication:0]; } } @end ViewController.m #import "Demo_FlightsViewController.h" #import "ConnectionController.h" #import "Flight_DetailsFlightDB.h" #import "SUPObjectList.h" #import "Flight_DetailsSessionPersonalization.h" #import "Flight_DetailsFlight_MBO.h" #import "Flight_DetailsPersonalizationParameters.h" @interface Demo_FlightsViewController () @end @implementation Demo_FlightsViewController - (void)viewDidLoad { [super viewDidLoad]; // Do any additional setup after loading the view, typically from a nib. } -(IBAction)Connect:(id)sender { @try { [ConnectionController beginApplicationSetup]; } @catch (NSException *exception) { NSLog(@"ConnectionAborted"); } // synchronise } -(IBAction)Synchronise:(id)sender { @try { [Flight_DetailsFlightDB synchronize]; NSLog(@"SYNCHRONISED"); } @catch (NSException *exception) { NSLog(@"Synchronisation Failed"); } } -(IBAction)findall:(id)sender { SUPObjectList *list = [Flight_DetailsSessionPersonalization findAll]; NSLog(@"no of lines got synchronised is %d",list.size); } -(IBAction)confirm:(id)sender { Flight_DetailsPersonalizationParameters *pp = [Flight_DetailsFlightDB getPersonalizationParameters]; MBOLogInfo(@"personalisation parmeter for airline id= %@",pp.Airline_PK); [pp setAirline_PK:@"AA"]; [pp save]; while([Flight_DetailsFlightDB hasPendingOperations]) { [NSThread sleepForTimeInterval:1]; } NSLog(@"inside confirm............"); [Flight_DetailsFlightDB beginSynchronize]; Flight_DetailsFlight_MBO *flight = nil; SUPObjectList *cl = nil; cl =[Flight_DetailsFlight_MBO findAll]; if(cl && cl.length > 0) { int i; for(i=0;i<cl.length;i++) { flight = [cl item:i]; if(flight) { NSLog(@"details are %@",flight.CITYFROM); } } } } - (void)viewDidUnload { [super viewDidUnload]; // Release any retained subviews of the main view. } - (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation { return (interfaceOrientation != UIInterfaceOrientationPortraitUpsideDown); } @end SUPConnectionProfile.h #import "sybase_sup.h" #define FROM_IMPORT_THREAD TRUE #define FROM_APP_THREAD FALSE #define SUP_UL_MAX_CACHE_SIZE 10485760 @class SUPBooleanUtil; @class SUPNumberUtil; @class SUPStringList; @class SUPStringUtil; @class SUPPersistenceException; @class SUPLoginCertificate; @class SUPLoginCredentials; @class SUPConnectionProfile; /*! @class SUPConnectionProfile @abstract This class contains fields and methods needed to connect and authenticate to an SUP server. @discussion */ @interface SUPConnectionProfile : NSObject { SUPConnectionProfile* _syncProfile; SUPBoolean _threadLocal; SUPString _wrapperData; NSMutableDictionary* _delegate; SUPLoginCertificate* _certificate; SUPLoginCredentials* _credentials; int32_t _maxDbConnections; BOOL initTraceCalled; } /*! @method @abstract Return a new instance of SUPConnectionProfile. @discussion @result The SUPconnectionprofile object. */ + (SUPConnectionProfile*)getInstance; /*! @method @abstract Return a new instance of SUPConnectionProfile. @discussion This method is deprecated. use getInstance instead. @result The SUPconnectionprofile object. */ + (SUPConnectionProfile*)newInstance DEPRECATED_ATTRIBUTE NS_RETURNS_NON_RETAINED; - (SUPConnectionProfile*)init; /*! @property @abstract The sync profile. @discussion */ @property(readwrite, retain, nonatomic) SUPConnectionProfile* syncProfile; /*! @property @abstract The maximum number of active DB connections allowed @discussion Default value is 4, but can be changed by application developer. */ @property(readwrite, assign, nonatomic) int32_t maxDbConnections; /*! @method @abstract The SUPConnectionProfile manages an internal dictionary of key value pairs. This method returns the SUPString value for a given string. @discussion @param name The string. */ - (SUPString)getString:(SUPString)name; /*! @method @abstract The SUPConnectionProfile manages an internal dictionary of key value pairs. This method returns the SUPString value for a given string. If the value is not found, returns 'defaultValue'. @discussion @param name The string. @param defaultValue The default Value. */ - (SUPString)getStringWithDefault:(SUPString)name:(SUPString)defaultValue; /*! @method @abstract The SUPConnectionProfile manages an internal dictionary of key value pairs. This method returns the SUPBoolean value for a given string. @discussion @param name The string. */ - (SUPBoolean)getBoolean:(SUPString)name; /*! @method @abstract The SUPConnectionProfile manages an internal dictionary of key value pairs. This method returns the SUPBoolean value for a given string. If the value is not found, returns 'defaultValue'. @discussion @param name The string. @param defaultValue The default Value. */ - (SUPBoolean)getBooleanWithDefault:(SUPString)name:(SUPBoolean)defaultValue; /*! @method @abstract The SUPConnectionProfile manages an internal dictionary of key value pairs. This method returns the SUPInt value for a given string. @discussion @param name The string. */ - (SUPInt)getInt:(SUPString)name; /*! @method @abstract The SUPConnectionProfile manages an internal dictionary of key value pairs. This method returns the SUPInt value for a given string. If the value is not found, returns 'defaultValue'. @discussion @param name The string. @param defaultValue The default Value. */ - (SUPInt)getIntWithDefault:(SUPString)name:(SUPInt)defaultValue; /*! @method getUPA @abstract retrieve upa from profile @discussion if it is in profile's dictionary, it returns value for key "upa"; if it is not found in profile, it composes the upa value from base64 encoding of username:password; and also inserts it into profile's dictionary. @param none @result return string value of upa. */ - (SUPString)getUPA; /*! @method @abstract Sets the SUPString 'value' for the given 'name'. @discussion @param name The name. @param value The value. */ - (void)setString:(SUPString)name:(SUPString)value; /*! @method @abstract Sets the SUPBoolean 'value' for the given 'name'. @discussion @param name The name. @param value The value. */ - (void)setBoolean:(SUPString)name:(SUPBoolean)value; /*! @method @abstract Sets the SUPInt 'value' for the given 'name'. @discussion @param name The name. @param value The value. */ - (void)setInt:(SUPString)name:(SUPInt)value; /*! @method @abstract Sets the username. @discussion @param value The value. */ - (void)setUser:(SUPString)value; /*! @method @abstract Sets the password. @discussion @param value The value. */ - (void)setPassword:(SUPString)value; /*! @method @abstract Sets the ClientId. @discussion @param value The value. */ - (void)setClientId:(SUPString)value; /*! @method @abstract Returns the databasename. @discussion @param value The value. */ - (SUPString)databaseName; /*! @method @abstract Sets the databasename. @discussion @param value The value. */ - (void)setDatabaseName:(SUPString)value; @property(readwrite,copy, nonatomic) SUPString databaseName; /*! @method @abstract Gets the encryption key. @discussion @result The encryption key. */ - (SUPString)getEncryptionKey; /*! @method @abstract Sets the encryption key. @discussion @param value The value. */ - (void)setEncryptionKey:(SUPString)value; @property(readwrite,copy, nonatomic) SUPString encryptionKey; /*! @property @abstract The authentication credentials (username/password or certificate) for this profile. @discussion */ @property(retain,readwrite,nonatomic) SUPLoginCredentials *credentials; /*! @property @abstract The authentication certificate. @discussion If this is not null, certificate will be used for authentication. If this is null, credentials property (username/password) will be used. */ @property(readwrite,retain,nonatomic) SUPLoginCertificate *certificate; @property(readwrite, assign, nonatomic) BOOL initTraceCalled; /*! @method @abstract Gets the UltraLite collation creation parameter @discussion @result conllation string */ - (SUPString)getCollation; /*! @method @abstract Sets the UltraLite collation creation parameter @discussion @param value The value. */ - (void)setCollation:(SUPString)value; @property(readwrite,copy, nonatomic) SUPString collation; /*! @method @abstract Gets the maximum cache size in bytes; the default value for iOS is 10485760 (10 MB). @discussion @result max cache size */ - (int)getCacheSize; /*! @method @abstract Sets the maximum cache size in bytes. @discussion For Ultralite, passes the cache_max_size property into the connection parameters for DB connections; For SQLite, executes the "PRAGMA cache_size" statement when a connection is opened. @param cacheSize value */ - (void)setCacheSize:(int)cacheSize; @property(readwrite,assign, nonatomic) int cacheSize; /*! @method @abstract Returns the user. @discussion @result The username. */ - (SUPString)getUser; /*! @method @abstract Returns the password hash value. @discussion @result The password hash value. */ - (NSUInteger)getPasswordHash; /*! @method @abstract Returns the password. @discussion @result The password hash value. */ - (NSString*)getPassword; /*! @method @abstract Adds a new key value pair. @discussion @param key The key. @param value The value. */ - (void)add:(SUPString)key:(SUPString)value; /*! @method @abstract Removes the key. @discussion @param key The key to remove. */ - (void)remove:(SUPString)key; - (void)clear; /*! @method @abstract Returns a boolean indicating if the key is present. @discussion @param key The key. @result The result indicating if the key is present. */ - (SUPBoolean)containsKey:(SUPString)key; /*! @method @abstract Returns the item for the given key. @discussion @param key The key. @result The item. */ - (SUPString)item:(SUPString)key; /*! @method @abstract Returns the list of keys. @discussion @result The keylist. */ - (SUPStringList*)keys; /*! @method @abstract Returns the list of values. @discussion @result The value list. */ - (SUPStringList*)values; /*! @method @abstract Returns the internal map of key value pairs. @discussion @result The NSMutableDictionary with key value pairs. */ - (NSMutableDictionary*)internalMap; /*! @method @abstract Returns the domain name. @result The domain name. @discussion */ - (SUPString)getDomainName; /*! @method @abstract Sets the domain name. @param value The domain name. @discussion */ - (void)setDomainName:(SUPString)value; /*! @method @abstract Get async operation replay property. Default is true. @result YES : if ansync operation replay is enabled; NO: if async operation is disabled. @discussion */ - (BOOL) getAsyncReplay; /*! @method @abstract Set async operation replay property. Default is true. @result value: enable/disable async replay operation. @discussion */ - (void) setAsyncReplay:(BOOL) value; /*! @method @abstract enable or disable the trace in client object API. @param enable - YES: enable the trace; NO: disable the trace. @discussion */ - (void)enableTrace:(BOOL)enable; /*! @method @abstract enable or disable the trace with payload info in client object API. @param enable - YES: enable the trace; NO: disable the trace. @param withPayload = YES: show payload information; NO: not show payload information. @discussion */ - (void)enableTrace:(BOOL)enable withPayload:(BOOL)withPayload; /*! @method @abstract initialize trace levels from server configuration. @discussion */ - (void)initTrace; - (void)dealloc; /* ultralite/mobilink required parameters */ - (SUPString)getNetworkProtocol; - (void)setNetworkProtocol:(SUPString)protocol; - (SUPString)getNetworkStreamParams; - (void)setNetworkStreamParams:(SUPString)stream; - (SUPString)getServerName; - (void)setServerName:(SUPString)name; - (int)getPortNumber; - (void)setPortNumber:(int)port; - (int)getPageSize; - (void)setPageSize:(int)size; @end @interface SUPConnectionProfile(internal) - (void)applyPropertiesFromApplication; @end We are using SUP 2.1.3 library files.Please go through the code and help me...

    Read the article

< Previous Page | 1 2 3 4 5