trying to give the user the option to choose between google maps (sdk) and apple maps (mapkit) in my app. the app is not using ARC. crash scenario (ios 6.0 / 6.1): 1. enter google maps (modal controller). 2. exit google maps (dismiss modal). 3. change in my app to apple maps (mapkit). 4. enter apple maps (modal controller).
the app crashes and i get: [EAGLContext setCurrentContext:]
the error won't occur if i don't release google maps in the dealloc, but it's probably will cause a memory leak. i retain the map in viewDidLoad and release the map in the dealloc.
can anyone help? thanks, Tomer
more detailed stack trace:
1 0x0a041324 in -[VGLGPU init] ()
2 0x0a041032 in __24+[VGLGPU sharedInstance]_block_invoke_0 ()
3 0x03b52014 in _dispatch_client_callout ()
4 0x03b4409f in dispatch_once_f ()
5 0x03b44061 in dispatch_once ()
6 0x0a040fef in +[VGLGPU sharedInstance] ()
7 0x09fab26b in -[VKMainLoop updateLinkState] ()
8 0x09fabb02 in -[VKMainLoop removeCanvas:] ()
9 0x09f9f2aa in -[VKScreenCanvas _updateDisplayStatus:] ()
10 0x09f9f3fb in -[VKScreenCanvas setNeedsDisplay] ()
11 0x027bc03d in -[UIView initWithFrame:] ()
12 0x09f75658 in -[VGLScreenCanvas initWithFrame:context:] ()
15 0x09f907e7 in -[VKMapCanvas initWithFrame:shouldRasterize:] ()
16 0x09f8982e in -[VKMapView initWithFrame:andGlobe:shouldRasterize:] ()
17 0x0267d1a1 in -[MKMapView _commonInitAndEnableLoading:fromIB:] ()
18 0x0267da9c in -[MKMapView initWithCoder:] ()
19 0x02aa8a02 in UINibDecoderDecodeObjectForValue ()
47 0x028671a7 in -[UIViewController presentModalViewController:animated:] ()
#0 0x0134057d in +[EAGLContext setCurrentContext:] ()
#1 0x0a041443 in -[VGLGPU setPaused:] ()
#20 0x09f8982e in -[VKMapView initWithFrame:andGlobe:shouldRasterize:] ()
#21 0x0267d1a1 in -[MKMapView _commonInitAndEnableLoading:fromIB:] ()
#22 0x0267da9c in -[MKMapView initWithCoder:] ()
#23 0x02aa8a02 in UINibDecoderDecodeObjectForValue ()
#51 0x028671a7 in -[UIViewController presentModalViewController:animated:] ()
– tomeron11 Feb 26 '13 at 09:28