Problem with EAGL2View

Discussion of issues specific to mobile platforms such as iOS, Android, Symbian and Meego.
User avatar
Brocan
Orc
Posts: 441
Joined: Tue Aug 01, 2006 1:43 am
Location: Spain!!
x 8

Problem with EAGL2View

Post by Brocan »

Hi everyone!

Our app is running fine in iOS 5.1, but now after upgrading to iOS 6, we are having a crash in our app:

Code: Select all

- [EAGL2View setEnableSetNeedsDisplay:]: unrecognized selector sent to instance 0x1e08f6f0
The crash happens when the ogre view is hidden by another view with a [controller presentModalViewController: mediaUI animated: YES];, or when the app is minimized.

We are running on iOS 6 SDK, XCode 4.5.

Any ideas?
User avatar
masterfalcon
OGRE Retired Team Member
OGRE Retired Team Member
Posts: 4270
Joined: Sun Feb 25, 2007 4:56 am
Location: Bloomington, MN
x 126

Re: Problem with EAGL2View

Post by masterfalcon »

I don't know why it would work with iOS 5.1 at all. setEnableSetNeedsDisplay is a method of the GLKView class. EAGL2View is a subclass of UIView which does not have that method, which will result in the unrecognized selector crash.
User avatar
Brocan
Orc
Posts: 441
Joined: Tue Aug 01, 2006 1:43 am
Location: Spain!!
x 8

Re: Problem with EAGL2View

Post by Brocan »

masterfalcon wrote:I don't know why it would work with iOS 5.1 at all. setEnableSetNeedsDisplay is a method of the GLKView class. EAGL2View is a subclass of UIView which does not have that method, which will result in the unrecognized selector crash.
Uhms, you are right, in iOS 5.1 we use OpenGL ES 1, and with the update to iOS 6 we've update to ES 2. The question is why is crashing, because we don't call this funcion in any place :| . Maybe this function is called internally by ogre?

We are using the 1.8 branch present in bitbucket.
User avatar
masterfalcon
OGRE Retired Team Member
OGRE Retired Team Member
Posts: 4270
Joined: Sun Feb 25, 2007 4:56 am
Location: Bloomington, MN
x 126

Re: Problem with EAGL2View

Post by masterfalcon »

Nope, we aren't using GLKit at all. Have you tried debugging it at all? The stack trace will tell you where it's being called from.
User avatar
Brocan
Orc
Posts: 441
Joined: Tue Aug 01, 2006 1:43 am
Location: Spain!!
x 8

Re: Problem with EAGL2View

Post by Brocan »

Ok, i think its solved. Following your advices i've checked line by line the sources looking for GLK related code and I've found old legacy snippets from OpenGL ES 1 in the view controllers.

Thanks for the tips!