Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 13 Next capture
2021 2022 2023
1 capture
13 Jun 22 - 13 Jun 22
sparklines
Close Help
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
  • Asset Store
  • Get Unity

UNITY ACCOUNT

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account
  • Blog
  • Forums
  • Answers
  • Evangelists
  • User Groups
  • Beta Program
  • Advisory Panel

Navigation

  • Home
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
    • Blog
    • Forums
    • Answers
    • Evangelists
    • User Groups
    • Beta Program
    • Advisory Panel

Unity account

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account

Language

  • Chinese
  • Spanish
  • Japanese
  • Korean
  • Portuguese
  • Ask a question
  • Spaces
    • Default
    • Help Room
    • META
    • Moderators
    • Topics
    • Questions
    • Users
    • Badges
  • Home /
avatar image
1
Question by devGuillaume · Mar 30, 2012 at 10:10 AM · iosbugrendertexture

OpenGL ES error on iPhone 4S, iPad 2 & 3rd gen iPad when combining rendering to a texture and invalidating GL state

tl;dr : This issue is fixed in Unity 3.5.2.

Hello,

Trying to narrow down another issue (about Vuforia AR + Unity Water Pro), I've created a simple sample that contains only two game objects:

  • a simple game object with a renderer component but no mesh filter. A script component creates a camera and a render texture, and manually renders the camera inside the render texture on "OnWillRenderObject". (This game object represents the water part in the initial issue.)

  • a default main camera, with a script that calls GL.InvalidateState() on "Update". (This camera represents the Vuforia part in the initial issue.)

On iPad 2, 3rd gen iPad and iPhone 4S, less than 20 seconds after "`applicationDidBecomeActive()`", this OpenGL error is displayed each frame in Xcode's console:

OpenGLES error 0x0506 in /GlError/iOSbuild/Classes/iPhone_GlesSupport.cpp:224

In pseudo-code, this is the call to glDiscardFramebufferEXT(GL_FRAMEBUFFER_OES, 2, {GL_DEPTH_ATTACHMENT_OES, GL_STENCIL_ATTACHMENT_OES}) that returns INVALID_FRAMEBUFFER_OPERATION_EXT in the Unity code function void PreparePresentSurfaceGLES(EAGLSurfaceDesc* surface).

Sometimes (as in I can only reproduce this from time to time), when putting the application in the background and returning to the iOS menu by pressing the home button, the entire screen will flicker between black and what it's supposed to display (ie the menu). Once the iPad 2 or iPhone 4S has started flickering, forcing the application termination won't stop the flickering. It's only by pressing the wake/sleep button quickly that the flickering will stop.

I'm not rendering savvy so I hope that even though the sample is useless on its own, I stripped it down to something meaningful. I'm also hoping that fixing this OpenGL error will solve the initial issue.

On iPod Touch 4 and iPhone 4, the OpenGL error does not show up. Instead, the app receives a memory warning less than 2 minutes after it started, and is terminated by iOS shortly afterwards. I've never seen the flickering on these devices.

At the time of writing, the application has been running for more than 40 minutes on iPad 2 and iPhone 4S without being terminated by iOS.

I'm using Unity 3.5.0f5 and Xcode 4.3.1 under Mac OS X 10.7.3.

Thanks!

EDIT: tested the sample with 3rd gen iPad.

EDIT: tested the sample with Unity 3.5.1f2, the error still shows up.

GlError.zip (14.5 kB)
Comment
Add comment
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

4 Replies

· Add your reply
  • Sort: 
avatar image
1

Answer by devGuillaume · Apr 26, 2012 at 10:22 AM

My bug report 455369 was answered recently: "This issue is fixed and should be available for the next release." That would be the release after v3.5.1f2.

EDIT: As stated in the release notes for Unity 3.5.2, this issue is fixed:

iOS: Fixed GL.InvalidateState causing INVALID_FRAMEBUFFER_OPERATION_EXT.

Comment
Add comment · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image
1

Answer by AmazingRuss · Aug 07, 2013 at 06:51 PM

I am seeing this error in 4.1.2.

Comment
Add comment · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image
0

Answer by jasksonlai · Aug 06, 2013 at 08:28 AM

We also trying the sane idea so it can work with our ipad case review blog so it can be possible to view on mobile version, but seems to not work because of the unidentified bugs perhaps. Will the guide really fix it?

Comment
Add comment · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image
0

Answer by Streamfall · Sep 08, 2014 at 06:27 PM

I seem to be running into this error on Unity 4.5.3.

Any ideas?

Comment
Add comment · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

Your answer

Hint: You can notify a user about this post by typing @username

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this Question

Answers Answers and Comments

7 People are following this question.

avatar image avatar image avatar image avatar image avatar image avatar image avatar image

Related Questions

Why can't Unity use DLLImport twice for overloaded functions? 2 Answers

WWW http request loads way to long on IOS 0 Answers

RenderTexture runtime error on app load on iOS 1 Answer

After Unity Crash Camera RenderTexture 0 Alpha 0 Answers

The name 'Joystick' does not denote a valid type ('not found') 2 Answers


Enterprise
Social Q&A

Social
Subscribe on YouTube social-youtube Follow on LinkedIn social-linkedin Follow on Twitter social-twitter Follow on Facebook social-facebook Follow on Instagram social-instagram

Footer

  • Purchase
    • Products
    • Subscription
    • Asset Store
    • Unity Gear
    • Resellers
  • Education
    • Students
    • Educators
    • Certification
    • Learn
    • Center of Excellence
  • Download
    • Unity
    • Beta Program
  • Unity Labs
    • Labs
    • Publications
  • Resources
    • Learn platform
    • Community
    • Documentation
    • Unity QA
    • FAQ
    • Services Status
    • Connect
  • About Unity
    • About Us
    • Blog
    • Events
    • Careers
    • Contact
    • Press
    • Partners
    • Affiliates
    • Security
Copyright © 2020 Unity Technologies
  • Legal
  • Privacy Policy
  • Cookies
  • Do Not Sell My Personal Information
  • Cookies Settings
"Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Default
  • Help Room
  • META
  • Moderators
  • Explore
  • Topics
  • Questions
  • Users
  • Badges