mousebird-consulting-inc / WhirlyGlobe

WhirlyGlobe Development
Other
830 stars 255 forks source link

Crash calling presentRenderbuffer: in Xcode 14/iOS 16 #1542

Open billburgess opened 2 years ago

billburgess commented 2 years ago

Using Cocoapod version 2.6.8. I wanted to test how our app would work on the new version of iOS. App compiles and runs initially (login screen) without issue. Once logged in it crashes when trying to load the map.

SceneRendererES2.mm -renderAsync: line 1003

if (!framebufferTex)
{
    [context presentRenderbuffer:GL_RENDERBUFFER]; // crashes on this line
    CheckGLError("SceneRendererES2: presentRenderbuffer");
}

Crash is vague. Nothing comes out in the console output. Just Thread 1: EXC_BAD_ACCESS (code=1, address=0x20). Stack is equally vague.

Screen Shot 2022-06-06 at 3 48 32 PM

For UIApplicationMain it shows this error: "Application violated contract by causing UIApplicationMain() to return. This incident will be reported."

If I comment out that line, the app continues on and doesn't crash, but the map screen is all black.

I know it is early (day 0) but wanted to bring this up if there is something we can do to continue support for v2 on new versions of iOS and Xcode. Thanks!

sjg-wdw commented 2 years ago

This must be WG-Maply version 2. We switched to Metal a few years ago.

We don't really go out of our way to support the old OpenGL version, but if you want to pursue it, I'd recommend getting the latest 2.x from the source tree and starting with that.

billburgess commented 2 years ago

Is there a version later than 2.6.8? I can definitely start there if there is. We just like taking the pod version for simplicity.

sjg-wdw commented 2 years ago

If I could figure out how to remove the central pod, I would. Always been trouble. We have a podspec in the repo itself. https://github.com/mousebird-consulting-inc/WhirlyGlobe

billburgess commented 2 years ago

Yeah, it can be a problem at times. I looked at the pod history and the last version in the repo was 2.6.1 then on to 3.0.0. Do you know which commit was the latest v2 version? I could try and point directly to that commit instead of trying to get it from the public spec repo.

sjg-wdw commented 2 years ago

2.6.1 should be it for v2. v3 is just main.

akovalov commented 2 years ago

@sjg-wdw regarding the central pod. Currently cocoapods.org shows WhirlyGlobe v2.4 as the latest, so looks like new podspecs weren't pushed to the central pod. I am not sure what you meant by how to remove the central pod, as I think it needs to be just updated to the latest. Not sure if you did the following already but this is how I'm updating my library in CocoaPods to the new versions, so might be helpful.

In the WhirlyGlobe project root (where WhirlyGlobe.podspec is located) run:

pod trunk push WhirlyGlobe.podspec

It might ask for an active trunk session on this computer if it wasn't created previously. So you can run

pod trunk register [your_email] `[your name]`

and try to push trunk again.

More details https://guides.cocoapods.org/terminal/commands.html#group_trunk

sjg-wdw commented 2 years ago

Thanks for the info.

We never actually put the podspec in their central repo, it was a user who did it. Nice gesture, but over the years it's just proved to be an extra, annoying step, with that process bombing out for one reason or another.

Since you get everything you need directly from our repo, we much prefer that. If we ever find a way to delete the pod from their central repo, we'll do it. I tried email once, but got no response.

akovalov commented 2 years ago

@sjg-wdw I see. Do you have an email or a github username of the user who pushed the repo? He is an owner of it, so he needs to delete it or he can add other user as an owner to the pod, so other user can delete it.