Select to view content in your preferred language

Frame_buffer_OGL::init_ FAILED when tapping map

4047
3
05-12-2016 05:40 AM
ChristopherMilack1
Regular Contributor

I've run into a particular scenario that results in a crash with the following console output. I'm on the latest 10.2.5 SDK using Objective-C and iOS 9.3.1.

Frame_buffer_OGL::init_ FAILED to create_ FramebufferName

libc++abi.dylib: terminating with uncaught exception of type Esri_runtimecore::Common::Internal_error_exception: Internal error exception

Here's the general reproduction case:

  1. Create a view controller (MapViewController) that includes an AGSMapView and set the mapView touch delegate to self (the crash still occurs without ever setting the touchDelegate). The map view also includes a sketch layer, AGSFeatureTableLayer and a few graphics layers. We create one graphic and add it to the map which is our 'selection' but does not use the selection mechanism/API provided with graphics layer.
  2. The user clicks a button to open a second view controller (without interacting with the map) to display details about that selected graphic.
  3. The new view controller (DetailViewController) is pushed on the navigation stack. This new view controller is a UITableViewController and it's headerView is a small AGSMapView that includes a basemap and a copy of the selected graphic. User interaction is disabled for this new map view and we show it only to provide context to the user.
  4. The user clicks a barButtonItem to pop the DetailViewController and return to the MapViewController.
  5. The user taps the map. Crash.

I've done quite a bit of testing and the key to this seems to be that it only occurs when the user presents the DetailViewController before ever interacting with the mapView

Some other notes:

  • I tried setting the touchDelegate to nil before DetailViewController is pushed to the navigation stack and it did not make a difference.
  • I tried it without ever setting the touchDelegate and it still crashed.
  • If I attempt to pan the map instead of clicking, it works fine and future click events register without a crash.

Anyone have any thoughts/ideas/workarounds? Is this a known issue?

Thanks!

Tags (1)
0 Kudos
3 Replies
DiveshGoyal
Esri Regular Contributor

Sounds like you're not sharing the graphic instance but creating separate instances for each mapivew. On this, instead of doing a copy() of the original graphic, can you alloc/init a new one for the second mapview just to see if there might be some issues with deep copying.

Also Are any of the layer instances shared between the two mapviews? Or do they both have their own instances of the layers?

If you can provide a stripped down project that repros the problem it'll help us investigate.

0 Kudos
ChristopherMilack1
Regular Contributor

Correct - I was creating copies of the graphics and adding those the second mapView. I tried what you described and it had no effect. I went one step further, and didn't add any graphics to the second mapView and still got the crash.

The maps don't share any layers at all and the second mapView is just a baseman and one graphics layer.

I'll try to get a stripped down example in a new project and see if I can reproduce. Thanks for the quick reply Divesh Goyal

0 Kudos
ChristopherMilack1
Regular Contributor

I never found a solution to this one but after additional troubleshooting I was able to narrow it down to some unique circumstances. For whatever reason, when locationDisplay was enabled and the users location was off screen, the crash occurred when returning to my map view. I stripped out all layers but the basemap and the problem seemed to fix it self.

So I worked around this by disabling GPS when navigation away from the view controller and reenabling when the user returned (probably not a bad practice anyway). That sort of did the trick but I still have an occasionally crash likely and I'm assuming that is because of some race condition. 

It's good enough for now but I might dig in some more in the future. Hope this helps anyone that runs into a similar issue.

0 Kudos