Multitasking data-dowload error?

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

  1. MACloop macrumors 6502

    Joined:
    May 18, 2009
    Location:
    Germany
    #1
    Hello,
    I have an App and when I put this app into background mode (pushing the home button) I get the following warning/error in the console.
    Code:
    void -[MKTileCache synchronize](MKTileCache*, objc_selector*) called while in background!
    I have tied to find out where it happends and it seems like might has to do with an asynchron. img-download?

    So my questions in order to try to understand this:
    - does anyone know this msg? What does it mean? What should I "turn off" here, in order to avoid something beeing called while the app is in the background?
    - what should I do when the app goes into the background mode? I have read somewhere about having a map active for instance in a background app, might cause this map to call its delegate during this background mode, which at the moment is not available? I have seen some crashes indicating on map-view problems. These are only happeing on the device...

    For instance:
    Code:
    Exception Type:  EXC_BAD_ACCESS (SIGBUS)
    Exception Codes: KERN_PROTECTION_FAILURE at 0x00000008
    Crashed Thread:  0
    
    Thread 0 Crashed:
    0   libobjc.A.dylib                   0x000027d8 objc_msgSend + 16
    1   MapKit                            0x0001b398 -[MKMapView annotationContainer:viewForAnnotation:] + 36
    2   MapKit                            0x00036068 -[MKAnnotationContainerView _addViewForAnnotation:] + 108
    3   MapKit                            0x00032b68 -[MKAnnotationContainerView _addViewsForAnnotations:animated:] + 184
    4   MapKit                            0x0003011a -[MKAnnotationContainerView showAddedAnnotationsAnimated:] + 74
    5   MapKit                            0x0001ba10 -[MKMapView _showAddedAnnotationsAndRouteAnimated:] + 48
    6   MapKit                            0x0001ac44 -[MKMapViewInternal delayedShowAddedAnnotationsAnimated] + 116
    7   Foundation                        0x000224f2 __NSFireTimer + 130
    8   CoreFoundation                    0x000567f4 __CFRUNLOOP_IS_CALLING_OUT_TO_A_TIMER_CALLBACK_FUNCTION__ + 8
    9   CoreFoundation                    0x000562a6 __CFRunLoopDoTimer + 854
    10  CoreFoundation                    0x0002779e __CFRunLoopRun + 1082
    11  CoreFoundation                    0x00027270 CFRunLoopRunSpecific + 224
    12  CoreFoundation                    0x00027178 CFRunLoopRunInMode + 52
    13  GraphicsServices                  0x000045ec GSEventRunModal + 108
    14  GraphicsServices                  0x00004698 GSEventRun + 56
    15  UIKit                             0x0000411c -[UIApplication _run] + 396
    16  UIKit                             0x00002128 UIApplicationMain + 664
    17  myApp                         0x0000243c 0x1000 + 5180
    18  myApp                         0x000023bc 0x1000 + 5052 
    Does anyone get any ideas from the information above?
    Thanks in advance!
    MACloop
     
  2. woodman macrumors newbie

    Joined:
    Apr 27, 2005
    Location:
    Brooklyn
    #2
    I am getting this message and am trying to figure out the cause. I have not seen it before today. I will post if I find out what's going on.
     
  3. robbieduncan Moderator emeritus

    robbieduncan

    Joined:
    Jul 24, 2002
    Location:
    London
    #3
    Looks like you are have a map view that is trying to redraw (as a tile has downloaded) in the background. Your UI should not update at all when you are in the background.
     
  4. MACloop thread starter macrumors 6502

    Joined:
    May 18, 2009
    Location:
    Germany
    #4
    hello,
    ok, my intention is not to do any loading when the app is in background mode... I have some of maps in the app and they are loaded when the user choses the current view they are on. Do you have any suggetions what I should look for in the code or in what situations this might appear...?
    Thanks,
    MACloop
     
  5. ericberman macrumors newbie

    Joined:
    Oct 20, 2010
    #5
    I'm getting the exact same crash/stack

    And can't figure out what is causing it. Were you able to solve this?
     
  6. cgonzalezd macrumors newbie

    Joined:
    Oct 21, 2010
    #6
    Having the same problem, just to add a comment, when I send to background the app while in the view with the mapkit and get back to the app I don't get the error. Still looking for a solution. :S
     
  7. cgonzalezd macrumors newbie

    Joined:
    Oct 21, 2010
    #7

Share This Page