I do not understand this crash report

Discussion in 'iOS Programming' started by MACloop, Jul 1, 2010.

  1. MACloop macrumors 6502

    Joined:
    May 18, 2009
    Location:
    Germany
    #1
    Hello,
    I have tried to develop an iPad app and everything is almost ok. One crash appears now and then and I do not understand what the error report is tryingt o tell me. I have noticed that this crash appears when I have a modalview open and rotate the iPad and also when I close the modal view. It never appears in the simualtor, only on the device. My thought about this is:
    - it could have something to do with the rotating?
    - the modalview is released even if the parentviewcontroller is "talking" to it?

    Does anyone know what these msg in the error report are meaning? I dont know where to start...
    Code:
    Thread 0 Crashed:
    0   QuartzCore                    	0x00015f00 CALayerCommitIfNeeded + 168
    1   QuartzCore                    	0x00015f06 CALayerCommitIfNeeded + 174
    2   QuartzCore                    	0x00018cb0 CA::Context::commit_root(void*, void*) + 28
    3   QuartzCore                    	0x00018c8c CA::foreach_callback(_CALayer*, _CALayer*, void*) + 4
    4   QuartzCore                    	0x00018c6c x_hash_table_foreach + 40
    5   QuartzCore                    	0x00018c32 CA::Transaction::foreach_root(void (*)(void*, void*), void*) + 18
    6   QuartzCore                    	0x00008d8c CA::Context::commit_transaction(CA::Transaction*) + 764
    7   QuartzCore                    	0x00008974 CA::Transaction::commit() + 180
    8   QuartzCore                    	0x0002e15e CA::Transaction::observer_callback(__CFRunLoopObserver*, unsigned long, void*) + 46
    9   CoreFoundation                	0x0006f29a __CFRunLoopDoObservers + 406
    10  CoreFoundation                	0x00022baa CFRunLoopRunSpecific + 1722
    11  CoreFoundation                	0x000224da CFRunLoopRunInMode + 42
    12  GraphicsServices              	0x000030d4 GSEventRunModal + 108
    13  GraphicsServices              	0x00003180 GSEventRun + 56
    14  UIKit                         	0x000034c2 -[UIApplication _run] + 374
    15  UIKit                         	0x000019ec UIApplicationMain + 636
    16  myiPadApp                   	0x00002dac main (main.m:14)
    17  myiPadApp                   	0x00002d60 start + 32
    

    Thanks in advance!
    MACloop
     
  2. kainjow Moderator emeritus

    kainjow

    Joined:
    Jun 15, 2000
    #2
    Are you doing custom animations? If so, triple check how you're setting them up and memory management. If you're not, look in your dealloc and other areas where your views cross reference each other.

    It appears to be happening right before an animation is about to be active, so it could be referencing a deallocated object. What does the top of your crash report look like?
     
  3. MACloop thread starter macrumors 6502

    Joined:
    May 18, 2009
    Location:
    Germany
    #3
    Thanks a lot for your answer! No I do not do any custom animation. The crash appeared when I was in a modalview and then rotated the iPad. It does not alwas happend when I rotate the device....

    The complete error report looks like this:
    Code:
    Date/Time:       2010-06-30 16:39:05.694 +0200
    OS Version:      iPhone OS 3.2 (7B367)
    Report Version:  104
    
    Exception Type:  EXC_BAD_ACCESS (SIGSEGV)
    Exception Codes: KERN_INVALID_ADDRESS at 0xe1a00000
    Crashed Thread:  0
    
    Thread 0 Crashed:
    0   libobjc.A.dylib               	0x00002612 objc_msgSend + 42
    1   QuartzCore                    	0x000314ca CA::release_objects(X::List<void const*>*) + 10
    2   QuartzCore                    	0x00007e4a CA::Transaction::unlock() + 18
    3   QuartzCore                    	0x00023112 -[CALayer dealloc] + 198
    4   QuartzCore                    	0x00023040 -[CALayer _dealloc] + 8
    5   QuartzCore                    	0x0000b2aa CALayerRelease + 66
    6   QuartzCore                    	0x0000963c CALayerFreeTransaction + 264
    7   QuartzCore                    	0x000089c4 CA::Transaction::commit() + 260
    8   QuartzCore                    	0x0002e15e CA::Transaction::observer_callback(__CFRunLoopObserver*, unsigned long, void*) + 46
    9   CoreFoundation                	0x0006f29a __CFRunLoopDoObservers + 406
    10  CoreFoundation                	0x00022baa CFRunLoopRunSpecific + 1722
    11  CoreFoundation                	0x000224da CFRunLoopRunInMode + 42
    12  GraphicsServices              	0x000030d4 GSEventRunModal + 108
    13  GraphicsServices              	0x00003180 GSEventRun + 56
    14  UIKit                         	0x000034c2 -[UIApplication _run] + 374
    15  UIKit                         	0x000019ec UIApplicationMain + 636
    16  myiPadApp                    	0x00002e14 main (main.m:14)
    17  myiPadApp                    	0x00002dc8 start + 32
    
    Thread 1:
    0   libSystem.B.dylib             	0x000016c4 semaphore_wait_signal_trap + 8
    1   libSystem.B.dylib             	0x0002ecc2 semaphore_wait_signal + 2
    2   libSystem.B.dylib             	0x000034b4 pthread_mutex_lock + 248
    3   WebCore                       	0x000027c6 _WebTryThreadLock(bool) + 98
    4   WebCore                       	0x00002742 WebRunLoopLock(__CFRunLoopObserver*, unsigned long, void*) + 14
    5   CoreFoundation                	0x0006f29a __CFRunLoopDoObservers + 406
    6   CoreFoundation                	0x00022b14 CFRunLoopRunSpecific + 1572
    7   CoreFoundation                	0x000224da CFRunLoopRunInMode + 42
    8   WebCore                       	0x0000268a RunWebThread(void*) + 286
    9   libSystem.B.dylib             	0x0007a786 _pthread_start + 242
    10  libSystem.B.dylib             	0x00070070 thread_start + 0
    
    Thread 2:
    0   libSystem.B.dylib             	0x00001668 mach_msg_trap + 20
    1   libSystem.B.dylib             	0x00003734 mach_msg + 44
    2   CoreFoundation                	0x0002296e CFRunLoopRunSpecific + 1150
    3   CoreFoundation                	0x000224da CFRunLoopRunInMode + 42
    4   Foundation                    	0x00017a4c +[NSURLConnection(NSURLConnectionReallyInternal) _resourceLoadLoop:] + 164
    5   Foundation                    	0x00010bca -[NSThread main] + 38
    6   Foundation                    	0x0007ccf8 __NSThread__main__ + 896
    7   libSystem.B.dylib             	0x0007a786 _pthread_start + 242
    8   libSystem.B.dylib             	0x00070070 thread_start + 0
    
    Thread 3:
    0   libSystem.B.dylib             	0x00001668 mach_msg_trap + 20
    1   libSystem.B.dylib             	0x00003734 mach_msg + 44
    2   CoreFoundation                	0x0002296e CFRunLoopRunSpecific + 1150
    3   CoreFoundation                	0x000224da CFRunLoopRunInMode + 42
    4   MapKit                        	0x0006bcd2 TileCachePrivate::runCacheThread() + 266
    5   MapKit                        	0x0006bd1a _runCacheThread(void*) + 2
    6   libSystem.B.dylib             	0x0007a786 _pthread_start + 242
    7   libSystem.B.dylib             	0x00070070 thread_start + 0
    
    Thread 4:
    0   libSystem.B.dylib             	0x000797ac __semwait_signal + 24
    1   libSystem.B.dylib             	0x0002e976 _pthread_cond_wait + 742
    2   libSystem.B.dylib             	0x0002e562 pthread_cond_wait + 26
    3   QuartzCore                    	0x00038d44 CA::DispatchGroup::thread(void*) + 76
    4   QuartzCore                    	0x00001cc6 thread_fun + 10
    5   libSystem.B.dylib             	0x0007a786 _pthread_start + 242
    6   libSystem.B.dylib             	0x00070070 thread_start + 0
    
    Thread 5:
    0   libSystem.B.dylib             	0x00025968 select$DARWIN_EXTSN + 20
    1   CoreFoundation                	0x00072d7c __CFSocketManager + 552
    2   libSystem.B.dylib             	0x0007a786 _pthread_start + 242
    3   libSystem.B.dylib             	0x00070070 thread_start + 0
    
    Thread 6:
    0   libSystem.B.dylib             	0x00001668 mach_msg_trap + 20
    1   libSystem.B.dylib             	0x00003734 mach_msg + 44
    2   CoreFoundation                	0x0002296e CFRunLoopRunSpecific + 1150
    3   CoreFoundation                	0x000224da CFRunLoopRunInMode + 42
    4   MapKit                        	0x00020ed6 +[NSThread(MKAdditions) _mapkit_runThread:] + 334
    5   Foundation                    	0x00010bca -[NSThread main] + 38
    6   Foundation                    	0x0007ccf8 __NSThread__main__ + 896
    7   libSystem.B.dylib             	0x0007a786 _pthread_start + 242
    8   libSystem.B.dylib             	0x00070070 thread_start + 0
    
    Thread 0 crashed with ARM Thread State:
        r0: 0x06bb3b90    r1: 0x3229343c      r2: 0x00004a47      r3: 0x00440008
        r4: 0xe1a00000    r5: 0x0c024c0b      r6: 0xff525c6a      r7: 0x2ffff4a8
        r8: 0x06bcc220    r9: 0x06bfc098     r10: 0x00812200     r11: 0x077bcd48
        ip: 0x38110444    sp: 0x2ffff490      lr: 0x32c04acb      pc: 0x33562612
      cpsr: 0xa0000030
    
    Binary Images:
        0x1000 -    0x21fff +myiPadApp  armv7  <f8701181cb32d0122b64c9a4fd1437c9> /var/mobile/Applications/F288EDC6-AD98-4C46-A797-89CE5F5C2788/myiPadApp .app/myiPadApp 
       0x5c000 -    0x5dfff  dns.so armv7  <16fad82d8b9ba83f1b97894eec8b9249> /usr/lib/info/dns.so
    0x2fe00000 - 0x2fe24fff  dyld armv7  <74c5ceb6354fd165a25d02fbd22aa746> /usr/lib/dyld
    0x30013000 - 0x30089fff  CFNetwork armv7  <c6ad6e56e0763566e9a9d176f9f8f53c> /System/Library/Frameworks/CFNetwork.framework/CFNetwork
    0x300b5000 - 0x300c1fff  DataDetectorsCore armv7  <7b605dd4d30f3869c3f5d4d6c16e7123> /System/Library/PrivateFrameworks/DataDetectorsCore.framework/DataDetectorsCore
    0x300de000 - 0x30231fff  CoreGraphics armv7  <786d71246f2518db705f07459678ef32> /System/Library/Frameworks/CoreGraphics.framework/CoreGraphics
    0x30232000 - 0x30247fff  OpenGLES armv7  <63808b3007ab98efaff340ccb39a3816> /System/Library/Frameworks/OpenGLES.framework/OpenGLES
    0x30248000 - 0x30267fff  Bom armv7  <d11606c64455453d53f6351b11270ddd> /System/Library/PrivateFrameworks/Bom.framework/Bom
    0x30268000 - 0x302b1fff  GMM armv7  <d0f80336dcfd50d9229d740b8d51b3d5> /System/Library/PrivateFrameworks/GMM.framework/GMM
    0x302f5000 - 0x30329fff  libvDSP.dylib armv7  <4bd1f6a68a3bef7f3af866df30831a3c> /System/Library/PrivateFrameworks/Accelerate.framework/Frameworks/vecLib.framework/libvDSP.dylib
    0x303a2000 - 0x3044bfff  libxml2.2.dylib armv7  <e987aa24546568209685760019d26dd4> /usr/lib/libxml2.2.dylib
    0x3044d000 - 0x30481fff  CoreMedia armv7  <7f264235d0aa168927fb4822725ec9d5> /System/Library/PrivateFrameworks/CoreMedia.framework/CoreMedia
    0x304e5000 - 0x30525fff  CoreAudio armv7  <8c87a185660f0c5bcd80c58d864748e2> /System/Library/Frameworks/CoreAudio.framework/CoreAudio
    0x305d0000 - 0x305d9fff  SpringBoardServices armv7  <7f6985f5c675342a2e28006bb9b36b1a> /System/Library/PrivateFrameworks/SpringBoardServices.framework/SpringBoardServices
    0x30619000 - 0x306a8fff  WebKit armv7  <9889fa78d55cb2d9da97f623e74eaae8> /System/Library/PrivateFrameworks/WebKit.framework/WebKit
    0x306a9000 - 0x306cdfff  Security armv7  <2213a5d097c55e903d783d5d59e15c97> /System/Library/Frameworks/Security.framework/Security
    0x30779000 - 0x30864fff  AudioToolbox armv7  <c9226d9fec092a5105bc9a099724218f> /System/Library/Frameworks/AudioToolbox.framework/AudioToolbox
    0x30951000 - 0x309eafff  QuartzCore armv7  <08c0f7a8c6cdaa2e47195188e49db1f0> /System/Library/Frameworks/QuartzCore.framework/QuartzCore
    0x309ed000 - 0x309f2fff  liblockdown.dylib armv7  <27be27b69fe7c93304d6a2e45f871412> /usr/lib/liblockdown.dylib
    0x309f3000 - 0x309f8fff  ProtocolBuffer armv7  <34a326a9f89a71f0b15091f9656c8337> /System/Library/PrivateFrameworks/ProtocolBuffer.framework/ProtocolBuffer
    0x309f9000 - 0x309f9fff  vecLib armv7  <3009f6144864ee4440f338601747f1a9> /System/Library/PrivateFrameworks/Accelerate.framework/Frameworks/vecLib.framework/vecLib
    0x309fa000 - 0x309fcfff  CrashReporterSupport armv7  <5e049cf65d6459f85d9e569873fb7632> /System/Library/PrivateFrameworks/CrashReporterSupport.framework/CrashReporterSupport
    0x309fd000 - 0x30a0afff  DataAccessExpress armv7  <a8f780df2f8abcb323911577a1cfb70d> /System/Library/PrivateFrameworks/DataAccessExpress.framework/DataAccessExpress
    0x30a0b000 - 0x30a21fff  RawCamera armv7  <3615c84a696141c97609e04359e01ff5> /System/Library/CoreServices/RawCamera.bundle/RawCamera
    0x30a75000 - 0x30aa4fff  libCGFreetype.A.dylib armv7  <6f16879b849815e1acaf109b2bfcd1ea> /System/Library/Frameworks/CoreGraphics.framework/Resources/libCGFreetype.A.dylib
    0x30ac6000 - 0x30acefff  DataDetectorsUI armv7  <f6df6463326a605bda23fa8d875cacff> /System/Library/PrivateFrameworks/DataDetectorsUI.framework/DataDetectorsUI
    0x30acf000 - 0x30af9fff  CoreLocation armv7  <8770908f2166d5bbb5cc06109faa6770> /System/Library/Frameworks/CoreLocation.framework/CoreLocation
    0x30c15000 - 0x30d1dfff  libSystem.B.dylib armv7  <5781db773c49e94c7923807b44eceae7> /usr/lib/libSystem.B.dylib
    0x30d1e000 - 0x30d54fff  IOKit armv7  <a10567bed9037fad14e0e0e89fcaa096> /System/Library/Frameworks/IOKit.framework/Versions/A/IOKit
    0x30d5f000 - 0x30d6afff  GraphicsServices armv7  <dd2b6df48f35ee991034f548c01b8667> /System/Library/PrivateFrameworks/GraphicsServices.framework/GraphicsServices
    0x30d6b000 - 0x30da6fff  CoreTelephony armv7  <7305babeadec9927b0a3bef69691aa78> /System/Library/PrivateFrameworks/CoreTelephony.framework/CoreTelephony
    0x30ec6000 - 0x30f9afff  MediaToolbox armv7  <7bf4ac982ede19735e27c4aab86b15b4> /System/Library/PrivateFrameworks/MediaToolbox.framework/MediaToolbox
    0x30f9d000 - 0x314c5fff  WebCore armv7  <5934b9eaf34e89e7305e6510d8549129> /System/Library/PrivateFrameworks/WebCore.framework/WebCore
    0x314d2000 - 0x32317fff  UIKit armv7  <bf95d18a30510fc7ea745b7837e070b2> /System/Library/Frameworks/UIKit.framework/UIKit
    0x324ce000 - 0x324fcfff  CoreText armv7  <acb5b15719158990244202859a586fee> /System/Library/Frameworks/CoreText.framework/CoreText
    0x32507000 - 0x32514fff  libbsm.0.dylib armv7  <04d8bf2f0b1530b16a8fe7d96407af42> /usr/lib/libbsm.0.dylib
    0x32515000 - 0x32598fff  AddressBookUI armv7  <4d4e6837742c83a38b30ab7ae1c47a02> /System/Library/Frameworks/AddressBookUI.framework/AddressBookUI
    0x32604000 - 0x3268efff  ImageIO armv7  <9bb84c4ef480387d10fabfdeb61ec6c0> /System/Library/PrivateFrameworks/ImageIO.framework/ImageIO
    0x326ad000 - 0x326affff  MobileInstallation armv7  <39a436faecf6b3b18b287e506b7db309> /System/Library/PrivateFrameworks/MobileInstallation.framework/MobileInstallation
    0x32742000 - 0x3274afff  libkxld.dylib armv7  <772e2c7b19179dbf9938abce0480e6e1> /usr/lib/system/libkxld.dylib
    0x32783000 - 0x327c7fff  libsqlite3.dylib armv7  <cc46818698734de9eaf60b94303a1519> /usr/lib/libsqlite3.dylib
    0x327d5000 - 0x327eafff  libresolv.9.dylib armv7  <6c105499a9d0610f1a3eedecb40b2680> /usr/lib/libresolv.9.dylib
    0x327ee000 - 0x327f5fff  libbz2.1.0.dylib armv7  <45abf121b99adec6ac192fbe8ef3fb77> /usr/lib/libbz2.1.0.dylib
    0x328fb000 - 0x328fffff  ITSync armv7  <d2de26ddeb70f92860c1cba2cb4c5cbb> /System/Library/PrivateFrameworks/ITSync.framework/ITSync
    0x32900000 - 0x3294afff  libstdc++.6.dylib armv7  <e30203adaf70dc26ddb794bccb29f0ef> /usr/lib/libstdc++.6.dylib
    0x3295e000 - 0x32974fff  AddressBook armv7  <24264c768b1898ece9cda41ba9292ea5> /System/Library/Frameworks/AddressBook.framework/AddressBook
    0x329c9000 - 0x32a54fff  Celestial armv7  <dcebc379880967562f64241d1cc74d5b> /System/Library/PrivateFrameworks/Celestial.framework/Celestial
    0x32aa3000 - 0x32aa3fff  Accelerate armv7  <cf3dd3fe3d895a5d063e0f234a777dc4> /System/Library/PrivateFrameworks/Accelerate.framework/Accelerate
    0x32aa4000 - 0x32aacfff  MobileBluetooth armv7  <f0da7ea0f58679535c894d0345b3da1f> /System/Library/PrivateFrameworks/MobileBluetooth.framework/MobileBluetooth
    0x32aad000 - 0x32ab0fff  IOSurface armv7  <75edb01721536b747764f72f656a3124> /System/Library/PrivateFrameworks/IOSurface.framework/IOSurface
    0x32aca000 - 0x32b02fff  MobileCoreServices armv7  <bdaa9c47968ac0b5a4fa4b1290f1543e> /System/Library/Frameworks/MobileCoreServices.framework/MobileCoreServices
    0x32b05000 - 0x32c00fff  Foundation armv7  <87ebc40f0982b01f149867d182d9f2e0> /System/Library/Frameworks/Foundation.framework/Foundation
    0x32c01000 - 0x32cacfff  CoreFoundation armv7  <08891d5d42d0792a2bdd6b36bc0c0a58> /System/Library/Frameworks/CoreFoundation.framework/CoreFoundation
    0x32cad000 - 0x32cadfff  liblangid.dylib armv7  <db026ba5f50039933e0d86c2876773ca> /usr/lib/liblangid.dylib
    0x32cf7000 - 0x32d1dfff  AppSupport armv7  <efea6d1cf5b8650ad328337dbede3510> /System/Library/PrivateFrameworks/AppSupport.framework/AppSupport
    0x32df0000 - 0x32df8fff  AccountSettings armv7  <37af54b9cb72cbc226037755b297f2d5> /System/Library/PrivateFrameworks/AccountSettings.framework/AccountSettings
    0x32df9000 - 0x32eb5fff  JavaScriptCore armv7  <b0e8a03f87382002835ebffcd59eead0> /System/Library/PrivateFrameworks/JavaScriptCore.framework/JavaScriptCore
    0x33096000 - 0x33097fff  CoreSurface armv7  <2381baf180157be64504d8a338aaac96> /System/Library/PrivateFrameworks/CoreSurface.framework/CoreSurface
    0x33098000 - 0x330a1fff  CoreVideo armv7  <5270c26b1234ccc309d1573c28f755b9> /System/Library/PrivateFrameworks/CoreVideo.framework/CoreVideo
    0x330d3000 - 0x330edfff  libRIP.A.dylib armv7  <f7384edceadeaa4ae79ccaf47bd492b9> /System/Library/Frameworks/CoreGraphics.framework/Resources/libRIP.A.dylib
    0x33287000 - 0x3339efff  libicucore.A.dylib armv7  <8e7ae4d5040e6f2134d44869f8476446> /usr/lib/libicucore.A.dylib
    0x334c1000 - 0x334e6fff  SystemConfiguration armv7  <99f3373cffde02bb1973253b0eb20c7a> /System/Library/Frameworks/SystemConfiguration.framework/SystemConfiguration
    0x33560000 - 0x335fdfff  libobjc.A.dylib armv7  <26441537897a3a56e7360d2aab8d4bce> /usr/lib/libobjc.A.dylib
    0x337ba000 - 0x337bcfff  IOMobileFramebuffer armv7  <afbb3e2d954e347047b2d71625f5683e> /System/Library/PrivateFrameworks/IOMobileFramebuffer.framework/IOMobileFramebuffer
    0x33b3c000 - 0x33ba9fff  ProofReader armv7  <8d4eb301026365e17bccceb35b073356> /System/Library/PrivateFrameworks/ProofReader.framework/ProofReader
    0x33baa000 - 0x33bd8fff  VideoToolbox armv7  <e766f916f24ef68ff8570168f5388b91> /System/Library/PrivateFrameworks/VideoToolbox.framework/VideoToolbox
    0x33f97000 - 0x33f9ffff  libgcc_s.1.dylib armv7  <28cabe0d3d9c2ccbb2feaf61df9edcf3> /usr/lib/libgcc_s.1.dylib
    0x340e8000 - 0x340f3fff  libz.1.dylib armv7  <aec71e61ad54d7583c9a24fe79d384fc> /usr/lib/libz.1.dylib
    0x340f9000 - 0x3419cfff  MapKit armv7  <29a9a29d78951e6c0124e6124a762cb0> /System/Library/Frameworks/MapKit.framework/MapKit
    
    I have looked through my code in order to detect some overretains etc but did not find anything. Perhaps, because I am looking in the wrong place?
    This is how I open up the modalview:

    Code:
    - (void) openDetail:(id)sender{
    	DetailMapViewController *modal = [[DetailMapViewController alloc] 
    			initWithNibName:@"DetailMapViewController" 
    			bundle:[NSBundle mainBundle]]; 
    	modal.modalTransitionStyle = UIModalTransitionStyleCrossDissolve;
    	modal.modalPresentationStyle = UIModalPresentationFormSheet;
    	[self presentModalViewController:modal animated:YES];
    	[modal release];
    }
    The DetailMapViewController.h
    Code:
    #import <UIKit/UIKit.h>
    #import "Annotations.h"
    
    @interface DetailMapViewController : UIViewController <MKMapViewDelegate> {
    	IBOutlet MKMapView *map;
    	Annotations *annotation;
    	CLLocation *userLoc;
    }
    @property(nonatomic,retain)IBOutlet MKMapView *map;
    @property(nonatomic,retain)Annotations *annotation;
    @property(nonatomic,retain)CLLocation *userLoc;
    - (IBAction) dismissView:(id)sender;
    @end
    The DetailMapViewController.m:
    Code:
    #import "DetailMapViewController.h"
    
    @implementation DetailMapViewController
    @synthesize map,annotation,userLoc;
    
    
    // Implement viewDidLoad to do additional setup after loading the view, typically from a nib.
    - (void)viewDidLoad {
        [super viewDidLoad];
    
    //some labels are defined here and a map
    	
    	UIButton *close_btn = [UIButton buttonWithType:UIButtonTypeCustom];
    	[close_btn setFrame:CGRectMake(500, 10, 30,30)];
    	[close_btn setImage:[UIImage imageNamed:@"btn_close.png"] forState:UIControlStateNormal];
    	[close_btn addTarget:self action:@selector(dismissView:) forControlEvents:UIControlEventTouchDown];
    	[self.view addSubview:close_btn];
    }
    
    
    - (MKAnnotationView *)mapView:(MKMapView *)mapView viewForAnnotation:(id <MKAnnotation>)a{
    	Annotations *ann = (Annotations*)a;
    	MKAnnotationView *annView=[[[MKAnnotationView alloc] initWithAnnotation:ann reuseIdentifier:@"currentloc"]autorelease];
    	annView.canShowCallout = YES;
    	UIImage *theimage = [UIImage imageNamed:@"pin.png"];
    	[annView setImage:theimage];
    	annView.centerOffset = CGPointMake(5,-20);
    	
    	if(ann == (Annotations *)map.userLocation) {
    		annView = nil;
    	}
    	return annView;
    }
    
    - (IBAction) dismissView:(id)sender {
    	[self.parentViewController dismissModalViewControllerAnimated:YES];
    }
    
    
    - (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation {
    	return (interfaceOrientation == UIInterfaceOrientationPortrait || interfaceOrientation == UIInterfaceOrientationPortraitUpsideDown || interfaceOrientation == UIInterfaceOrientationLandscapeLeft || interfaceOrientation == UIInterfaceOrientationLandscapeRight);
    }
    
    
    - (void)didReceiveMemoryWarning {
        // Releases the view if it doesn't have a superview.
        [super didReceiveMemoryWarning];
        // Release any cached data, images, etc that aren't in use.
    }
    
    
    - (void)viewDidUnload {
        [super viewDidUnload];
        // Release any retained subviews of the main view.
        // e.g. self.myOutlet = nil;
    }
    
    
    - (void)dealloc {
    	[annotation release];
    	[map release];
    	[userLoc release];
        [super dealloc];
    }
    
    Thanks in advance!
    MACloop
     
  4. MACloop thread starter macrumors 6502

    Joined:
    May 18, 2009
    Location:
    Germany
    #4
    Hello again,
    I do not know if this is is relevant for the former crash, but I have got another one and it is a bit more concreate. I thought that I have a leak (a huge one :-( ) making my popover to crash. In this popover i have a tabelview and that seem to be the problem. Perhaps is the former crash when the tabel scrolls...a scrolling is a kind of animation, right?

    Ok here is the new crash report:
    Code:
    Date/Time:       2010-07-02 09:31:48.671 +0200
    OS Version:      iPhone OS 3.2 (7B367)
    Report Version:  104
    
    Exception Type:  EXC_BAD_ACCESS (SIGBUS)
    Exception Codes: KERN_PROTECTION_FAILURE at 0x00000000
    Crashed Thread:  0
    
    Thread 0 Crashed:
    0   libobjc.A.dylib               	0x000025fa objc_msgSend + 18
    1   CoreFoundation                	0x0006f9b0 __CFTypeCollectionRetain + 28
    2   CoreFoundation                	0x00001c8c CFArrayCreate + 128
    3   CoreFoundation                	0x0001b480 -[__NSPlaceholderArray initWithObjects:count:] + 160
    4   QuartzCore                    	0x0000d522 -[CALayerArray copyWithZone:] + 42
    5   CoreFoundation                	0x000046e2 -[NSObject copy] + 10
    6   UIKit                         	0x0003a684 -[UIView dealloc] + 52
    7   UIKit                         	0x000df082 -[UITableViewCellContentView dealloc] + 42
    8   CoreFoundation                	0x00004714 -[NSObject release] + 24
    9   UIKit                         	0x00015754 -[UIView(Hierarchy) removeFromSuperview] + 392
    10  UIKit                         	0x0003a6e4 -[UIView dealloc] + 148
    11  UIKit                         	0x000d5e1c -[UITableViewCell dealloc] + 560
    12  myiPadApp                 	0x00008d52 -[myTableViewCell dealloc] (myTableViewCell.m:96)
    13  CoreFoundation                	0x00004714 -[NSObject release] + 24
    14  CoreFoundation                	0x00003ac4 CFRelease + 108
    15  CoreFoundation                	0x0006fb52 __CFTypeCollectionRelease + 26
    16  CoreFoundation                	0x0004d51c __CFArrayReleaseValues + 300
    17  CoreFoundation                	0x0004d89c __CFArrayDeallocate + 56
    18  CoreFoundation                	0x00003bba _CFRelease + 158
    19  CoreFoundation                	0x00003a94 CFRelease + 60
    20  CoreFoundation                	0x0006fb52 __CFTypeCollectionRelease + 26
    21  CoreFoundation                	0x0006423e __CFDictionaryDeallocate + 146
    22  CoreFoundation                	0x00003bba _CFRelease + 158
    23  CoreFoundation                	0x00003a94 CFRelease + 60
    24  Foundation                    	0x00004c2e -[NSCFDictionary release] + 2
    25  UIKit                         	0x000dec7e -[UITableView dealloc] + 106
    26  CoreFoundation                	0x00004714 -[NSObject release] + 24
    27  UIKit                         	0x0005b8da -[UIViewController setView:] + 242
    28  UIKit                         	0x000c8858 -[UIViewController unloadViewForced:] + 60
    29  UIKit                         	0x000c880e -[UIViewController unloadViewIfReloadable] + 10
    30  UIKit                         	0x00153af2 -[UIViewController purgeMemoryForReason:] + 34
    31  UIKit                         	0x00153b12 -[UIViewController didReceiveMemoryWarning] + 10
    32  myiPadApp                  	0x00015262 -[TablePopoverViewController didReceiveMemoryWarning] (TablePopoverViewController.m:217)
    33  UIKit                         	0x00153b28 -[UIViewController _didReceiveMemoryWarning:] + 8
    34  Foundation                    	0x0000a896 _nsnote_callback + 162
    35  CoreFoundation                	0x0001cc3e _CFXNotificationPostNotification + 302
    36  Foundation                    	0x00008438 -[NSNotificationCenter postNotificationName:object:userInfo:] + 64
    37  Foundation                    	0x0000a7e2 -[NSNotificationCenter postNotificationName:object:] + 18
    38  UIKit                         	0x0012bae2 -[UIApplication _performMemoryWarning] + 42
    39  UIKit                         	0x0012dd6c -[UIApplication _receivedMemoryNotification] + 120
    40  UIKit                         	0x0012ba5c _memoryStatusChanged + 36
    41  CoreFoundation                	0x0006881e __CFNotificationCenterDarwinCallBack + 18
    42  CoreFoundation                	0x00066f3a __CFMachPortPerform + 70
    43  CoreFoundation                	0x00022d96 CFRunLoopRunSpecific + 2214
    44  CoreFoundation                	0x000224da CFRunLoopRunInMode + 42
    45  GraphicsServices              	0x000030d4 GSEventRunModal + 108
    46  GraphicsServices              	0x00003180 GSEventRun + 56
    47  UIKit                         	0x000034c2 -[UIApplication _run] + 374
    48  UIKit                         	0x000019ec UIApplicationMain + 636
    49  myiPadApp                   	0x00002d8c main (main.m:14)
    50  myiPadApp                  	0x00002d40 start + 32
    
    Thread 1:
    0   libSystem.B.dylib             	0x00001668 mach_msg_trap + 20
    1   libSystem.B.dylib             	0x00003734 mach_msg + 44
    2   CoreFoundation                	0x0002296e CFRunLoopRunSpecific + 1150
    3   CoreFoundation                	0x000224da CFRunLoopRunInMode + 42
    4   WebCore                       	0x0000268a RunWebThread(void*) + 286
    5   libSystem.B.dylib             	0x0007a786 _pthread_start + 242
    6   libSystem.B.dylib             	0x00070070 thread_start + 0
    
    Thread 2:
    0   libSystem.B.dylib             	0x00001668 mach_msg_trap + 20
    1   libSystem.B.dylib             	0x00003734 mach_msg + 44
    2   CoreFoundation                	0x0002296e CFRunLoopRunSpecific + 1150
    3   CoreFoundation                	0x000224da CFRunLoopRunInMode + 42
    4   Foundation                    	0x00017a4c +[NSURLConnection(NSURLConnectionReallyInternal) _resourceLoadLoop:] + 164
    5   Foundation                    	0x00010bca -[NSThread main] + 38
    6   Foundation                    	0x0007ccf8 __NSThread__main__ + 896
    7   libSystem.B.dylib             	0x0007a786 _pthread_start + 242
    8   libSystem.B.dylib             	0x00070070 thread_start + 0
    
    Thread 3:
    0   libSystem.B.dylib             	0x00001668 mach_msg_trap + 20
    1   libSystem.B.dylib             	0x00003734 mach_msg + 44
    2   CoreFoundation                	0x0002296e CFRunLoopRunSpecific + 1150
    3   CoreFoundation                	0x000224da CFRunLoopRunInMode + 42
    4   MapKit                        	0x0006bcd2 TileCachePrivate::runCacheThread() + 266
    5   MapKit                        	0x0006bd1a _runCacheThread(void*) + 2
    6   libSystem.B.dylib             	0x0007a786 _pthread_start + 242
    7   libSystem.B.dylib             	0x00070070 thread_start + 0
    
    Thread 4:
    0   libSystem.B.dylib             	0x00025968 select$DARWIN_EXTSN + 20
    1   CoreFoundation                	0x00072d7c __CFSocketManager + 552
    2   libSystem.B.dylib             	0x0007a786 _pthread_start + 242
    3   libSystem.B.dylib             	0x00070070 thread_start + 0
    
    Thread 5:
    0   libSystem.B.dylib             	0x000797ac __semwait_signal + 24
    1   libSystem.B.dylib             	0x0002e976 _pthread_cond_wait + 742
    2   libSystem.B.dylib             	0x0002e562 pthread_cond_wait + 26
    3   QuartzCore                    	0x00038d44 CA::DispatchGroup::thread(void*) + 76
    4   QuartzCore                    	0x00001cc6 thread_fun + 10
    5   libSystem.B.dylib             	0x0007a786 _pthread_start + 242
    6   libSystem.B.dylib             	0x00070070 thread_start + 0
    
    Thread 6:
    0   libSystem.B.dylib             	0x00001668 mach_msg_trap + 20
    1   libSystem.B.dylib             	0x00003734 mach_msg + 44
    2   CoreFoundation                	0x0002296e CFRunLoopRunSpecific + 1150
    3   CoreFoundation                	0x000224da CFRunLoopRunInMode + 42
    4   MapKit                        	0x00020ed6 +[NSThread(MKAdditions) _mapkit_runThread:] + 334
    5   Foundation                    	0x00010bca -[NSThread main] + 38
    6   Foundation                    	0x0007ccf8 __NSThread__main__ + 896
    7   libSystem.B.dylib             	0x0007a786 _pthread_start + 242
    8   libSystem.B.dylib             	0x00070070 thread_start + 0
    
    Thread 0 crashed with ARM Thread State:
        r0: 0x06a01040    r1: 0x32295358      r2: 0x0000a00e      r3: 0x335625e9
        r4: 0x06a47d94    r5: 0x00000000      r6: 0x0608f0ac      r7: 0x2fffeff0
        r8: 0x383f4d98    r9: 0x0000026c     r10: 0x383f4d98     r11: 0x00000004
        ip: 0x383ea9cc    sp: 0x2fffefd8      lr: 0x32c02e15      pc: 0x335625fa
      cpsr: 0x20000030
    
    
    I am looking over my tableView code and also my tablecell code, because this seem to rise some memorywarning...?

    Thanks in advance for any hints!
    MACloop
     
  5. kainjow Moderator emeritus

    kainjow

    Joined:
    Jun 15, 2000
    #6
    Maybe post your myTableViewCell class, seems like the crash is coming from its dealloc. I'm surprised you're getting memory warnings. May want to look into your memory usage and run Leaks.

    Ha, I got my avatar years ago from an image search, but that's not my page. I don't know where the original came from. Maybe it's time to change it.. ;)
     
  6. PhoneyDeveloper macrumors 68030

    PhoneyDeveloper

    Joined:
    Sep 2, 2008
    #7
    OK, Greg. That's what they all say. ;-) Knowwhatamean?

    I've seen this cool image with a guy wearing canada eyeglasses. Like kool.

    I guess I need an avatar too...
     
  7. MACloop thread starter macrumors 6502

    Joined:
    May 18, 2009
    Location:
    Germany
    #8
    I have modified my tableViewCell class now and also the way I use this class from my tableViewDelegate. This is how I do it - what do you think about this solution? Till now it seems to work....

    myTableViewCell.h
    Code:
    #import <UIKit/UIKit.h>
    
    @interface myTableViewCell : UITableViewCell {
    	IBOutlet UILabel *primaryLabel;
    	IBOutlet UILabel *secondaryLabel;
    	IBOutlet UILabel *distanceLabel;
    	IBOutlet UIImageView *cellImg;
    }
    
    @property(nonatomic,retain)IBOutlet UILabel *primaryLabel;
    @property(nonatomic,retain)IBOutlet UILabel *secondaryLabel;
    @property(nonatomic,retain)IBOutlet UILabel *distanceLabel;
    @property(nonatomic,retain)IBOutlet UIImageView *cellImg;
    @end
    

    myTableViewCell.m
    Code:
    #import "myTableViewCell.h"
    
    @implementation myTableViewCell
    @synthesize primaryLabel,secondaryLabel,distanceLabel,cellImg;
    - (id)initWithFrame:(CGRect)frame reuseIdentifier:(NSString *)reuseIdentifier {
        if (self = [super initWithFrame:frame reuseIdentifier:reuseIdentifier]) {
        }
        return self;
    }
    
    - (void)setSelected:(BOOL)selected animated:(BOOL)animated {
        [super setSelected:selected animated:animated];
    }
    
    - (void)dealloc {
    	[cellImg release];
    	[primaryLabel release];
    	[secondaryLabel release];
    	[distanceLabel release];
        [super dealloc];
    }
    @end
    

    in the popOverClass aka the tableViewDelegate, displaying the table
    Code:
    - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {
    	NSLog(@"cellForRowAtIndexPath");
    	static NSString *CellIdentifier = @"CustomCell";
    	
        myTableViewCell *cell = (myTableViewCell *) [tableView dequeueReusableCellWithIdentifier:CellIdentifier];
        if (cell == nil) {
    		NSLog(@"cell == nil");
    		NSArray *topLevelObjects = [[NSBundle mainBundle] loadNibNamed:@"myTableViewCell" owner:self options:nil];
    		for (id currentObject in topLevelObjects){
    			NSLog(@"id currentObject in topLevelObjects");
    			if ([currentObject isKindOfClass:[UITableViewCell class]]){
    				NSLog(@"[currentObject isKindOfClass:[UITableViewCell class]]");
    				cell =  (myTableViewCell *) currentObject;
    				break;
    			}
    		}
    	}
    	UIView* backgroundView = [[UIView alloc] initWithFrame:CGRectZero];
    	
    	if(indexPath.row % 2 == 0){
    		backgroundView.backgroundColor = LIGHT_BACKGROUND;
    	}
    	else {
    		backgroundView.backgroundColor = [UIColor whiteColor];
    	}
    	cell.backgroundView = backgroundView;
    	[backgroundView release];
    
    	Annotations *annotationForCell =  [item_list objectAtIndex:[indexPath row]];
    	cell.cellImg.image = [UIImage imageNamed:[annotationForCell tableCellImg]];
    	cell.primaryLabel.text = [annotationForCell title];
    	cell.secondaryLabel.text = [annotationForCell subtitle];
    	cell.distanceLabel.text = [NSString stringWithFormat:@"%.2f km",([annotationForCell distance]/1000)];
    	
    	return cell;
    }
    Thanks in advance!
    MACloop
     

Share This Page