Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. Dismiss Notice

[Crash] presentRenderbuffer:GL_RENDERBUFFER and/or GLES2VBVO::EnsureVerticesInited

Discussion in 'General Graphics' started by NaxiaLascif, Jan 26, 2015.

  1. NaxiaLascif

    NaxiaLascif

    Joined:
    Jun 10, 2013
    Posts:
    18
    I am experiencing two random crashes, but they only seem to be occurring on the iPhone 4. All of our Android devices and any Apple device newer than an iPhone 4 does not crash. We recently started building for iOS, and have had working Android builds for over a year.

    The iPhone 4 is on iOS 7.1.2
    Unity is 4.5.5.f1
    Xcode is 5.1.1

    The phone was on iOS 7.0, and upgrading to 7.1 did not help. We also tried a build with Unity 4.5.5p5 and the issue still persists.

    One of the crashes is in DisplayManager.mm:
    Code (Boo):
    1.  
    2. - (void)present
    3. {
    4.      if(surface.context != nil)
    5.      {
    6.           PreparePresentRenderingSurface(&surface, [[DisplayManagerInstance] mainDisplay]->surface.context);
    7.  
    8.           EAGLContextSetCurrentAutoRestore autorestore(surface.context);
    9.           GLES_CHK(glBindRenderbuffer(GL_RENDERBUFFER, surface.systemColorRB));
    10.           [surface.contextpresentRenderbuffer:GL_RENDERBUFFER];
    11.  
    12.           if(needRecreateSurface)
    13.           {
    14.                RenderingSurfaceParams params =
    15.                {
    16.                     surface.msaaSamples, (int)requestedRenderingSize.width, (int)requestedRenderingSize.height,
    17.                     surface.use32bitColor, surface.use24bitDepth, surface.cvTextureCache != 0
    18.                };
    19.                [selfrecreateSurface:params];
    20.  
    21.                needRecreateSurface = NO;
    22.                requestedRenderingSize = CGSizeMake(surface.targetW, surface.targetH);
    23.          }
    24.      }
    25. }
    26.  
    Screenshot 2015-01-26 16.25.45.png
    http://i.stack.imgur.com/MXB95.png

    The other is in the OpenGL library at:
    Code (Boo):
    1.     GLES2VBO::EnsureVerticesInited(bool)
    Screenshot 2015-01-26 16.28.34.png
    http://i.stack.imgur.com/B7NiG.png
     
    Last edited: Jan 27, 2015
  2. Alexey

    Alexey

    Unity Technologies

    Joined:
    May 10, 2010
    Posts:
    1,600
    if you check your stack closely you will see the "gpus_ReturnGuiltyForHardwareReset" (or smth) - that means that something is really broken on driver/GPU level. I would advise to crate as small repro as possible and bug report.
    "Small repro" - even if you cant make it isolated (an in cases like that it is usually impossible to do) just try to get rid of extra stuff (like, for example, facebook integration etc) and leave just one scene that shows the issue (well, it is handwaving but i hope you get the point)
     
  3. NaxiaLascif

    NaxiaLascif

    Joined:
    Jun 10, 2013
    Posts:
    18
    That is very discouraging. But that still sounds like something specific to what we are doing, and not that the phone itself is borked at the driver/GPU level?

    By "bug report" you mean try to package up the whole project to send to you at Unity?

    As mentioned above, the game has been released on Android for about a year now, so the size of the game is not "start-up" size, and we have accrued a plethora of plugins over the year, somthing over 30 of them. Not really a trivial task to pull them back out :-(

    And the other strange thing is that this is specific to the iPhone 4's that we test it on.
     
    Last edited: Jan 27, 2015
  4. mpulkkinen

    mpulkkinen

    Joined:
    Apr 8, 2013
    Posts:
    15
    I have this excatly same issue, but with iPad 2 & 3 (but iOs 7.1 & 8.1 versions) ( mostly reproducible in iPad 2 ). Our game ahs 9 scenes and it only happens on one of those. First time this bug was found was aroud last December. Android & all other iOs devices run just fine.

    When I last made soem serious effort for trying to find out what's wrong, I literally tried everything to find out what's causing this, from different Unity & xCode versions to disabling almost all of the objects on scene, with no luck... Weirdly enough, issue wen't a way for awhile with one device after uninstalling the game completely and then re-installing it...
     
  5. mpulkkinen

    mpulkkinen

    Joined:
    Apr 8, 2013
    Posts:
    15
    It turns out I managed to get rid of the bug. Here's my "solution":
    Since I had one out of 10 scenes crashing, I deleted everything except level props & mission objects from the scene and then copied everything else from non-crashing scene ( ui, controls etc ). After that ( +lightmaps re-baking, some fiddling with camera etc ) the crash bug was no more. Sadly I have no idea what was the root cause, maybe the camera was somehow corructed or the ui ( nGui based ) or even the plane with 2d texture acting a a base map for the level.

    Previously I tried similar thing, except I made "New scene" and copied everything from crashing scene there and that did not do the trick.