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

Changes between "Development" and "Deployment" iOS? I'm getting odd bugs

Discussion in 'Editor & General Support' started by infinitypbr, Feb 19, 2015.

  1. infinitypbr

    infinitypbr

    Joined:
    Nov 28, 2012
    Posts:
    3,149
    example.jpg Hello!

    In the final stretch, submitting my "Release candidate" game to apple to get it tested by more people in Flight Control, and now I find that playing the game on my iPad and iPhone has odd bugs.

    Usually what can be seen is the text (using the new UI) is completely garbled -- like parts of letters are missing and other parts in the wrong place like a poorly constructed puzzle.

    The next result is that when I save the game, not everything saves (via PlayerPrefs), so the next time I load, Xcode will get an error. Without Xcode, the game will load, but a few things will be off, like the model the player has chosen to play (will be the default one, rather than the one they've chosen), implying that not all the data was saved in the previous save.

    Anyone else have issues like this? I'm going through some potential changes I've made that could have caused it, but the biggest one (And really, the only one) that I can think of is setting the game for Deployment rather than Development in Xcode.
     
  2. infinitypbr

    infinitypbr

    Joined:
    Nov 28, 2012
    Posts:
    3,149
    OK, I see in Xcode the following error whenever I get this bug:

    OpenGLES error 0x0502

    I do not have any idea what it means.
     
  3. infinitypbr

    infinitypbr

    Joined:
    Nov 28, 2012
    Posts:
    3,149
    UPDATE: I've confirmed this error in 4.6.1, 4.6.2 and 4.6.3

    It happens when I change the resolution of the game, using
    Code (csharp):
    1. Screen.SetResolution
     
  4. infinitypbr

    infinitypbr

    Joined:
    Nov 28, 2012
    Posts:
    3,149
    Potential work-around. It's not a fix, I wouldn't be surprised if this was a new UI bug.

    However, my game has an auto-quality thing that, if the frame rate drops too low for too long, will automatically resize the screen resolution during the game. This works just fine still. The issue above only happened when manually changing it in the UI -- it was changing it instantly, and during those changes it'd have the issues.

    So my work around is to keep the UI at 100% -- it doesn't need to be lower resolution (and looks better at full res, of course). So when the user pauses the game to bring up the menu, it switches to 100%, and when the menu is closed, it switches back to the desired resolution for the scene.

    Potential issue: memory errors happen if you switch a lot. like a LOT. But i've added UnloadUnusedAssets after each switch, so that may help.

    Potential issue: The resolution switch doesn't actually happen until the next frame, so the 1st frame of the game and the 1st frame of the menu is the wrong resolution, and then it switches. Perhaps if this becomes a problem I can have the switch happen in a single frame of black. It'd be noticeable, but perhaps not so bad.

    EDIT: I'm currently opening/closing the menu a lot to see if the unloadingunusedassets works to get rid of the memory crash. And every so often I get this error:

    Framebuffer is not complete: INCOMPLETE_MISSING_ATTACHMENT

    Replacements.MSCompatUnicodeTable:get_IsReady()


    [ line 297]

    (Filename: Line: 297)


    OpenGLES error 0x0502 in /Users/andrew/Tile Based Fantasy Battle copy/iOS 4.6.1/Classes/Unity/GlesHelper.mm:342

    Unity people, is this a bug too?
     
    Last edited: Feb 20, 2015
  5. infinitypbr

    infinitypbr

    Joined:
    Nov 28, 2012
    Posts:
    3,149
    OK.
    CLoser, but not yet there. Now every so often I get the "Framebuffer is not complete: INCOMPLETE_ATTACHMENT" error.

    This recent time, the screen went blank and Xcode spat out, every frame:
    OpenGLES error 0x0506 in /Users/andrew/Tile Based Fantasy Battle copy/iOS 4.6.3/Classes/Unity/GlesHelper.mm:342

    Until I paused the game by pressing where the pause button would be. So it's a graphics issue, right? It happens when I switch resolutions.

    I don't want to not switch resolutions -- the game is better with shadows and higher resolution ,and each device can support different settings, so I want to keep the ability for people to automatically switch and also to choose their combination of shadows (all shadows/one shadow/blob shadows) and resolution (50%-100%).
     
  6. infinitypbr

    infinitypbr

    Joined:
    Nov 28, 2012
    Posts:
    3,149
    Cancel all the good news. Still getting the odd UI text issues and the OpenGLES error, even after removing a bunch of the resolution change code. :(

    EDIT: This only seems to happen in builds with the new 64bit.
    EDIT2: See below, happens with 32bit as well, but seems to only happen on my iPad Air 1 (A7 GPU), not the iPhone 6 (A8 GPU) so perhaps it's the GPU.
     
    Last edited: Feb 21, 2015
  7. infinitypbr

    infinitypbr

    Joined:
    Nov 28, 2012
    Posts:
    3,149
    I've reverted to my last backup, since everything I was doing yesterday seemed to just make things worse.

    I need to double check in Xcode, but just playing the game it seems the problem happens with the iPad Air 1, but NOT with the iPhone 6.

    Unfortunately I don't have other devices to check on, to see if it's the A7 vs. A8.
     
  8. pahe

    pahe

    Joined:
    May 10, 2011
    Posts:
    541
    @sfbaystudios Hey, we have this problem also on our iPad 1. Have you ever found the problem behind it? We have other Unity apps which are running fine on that iPad. I've the suspicion that it may have to do something with a post process effect (we have the blur and bloom effect in the app).
     
  9. infinitypbr

    infinitypbr

    Joined:
    Nov 28, 2012
    Posts:
    3,149
    Nope, I asked @ GDC but no one knew either.

    Ultimately I had to abandon the auto-resize-resolution feature, which was a shame. What worked was allowing the user to choose a new resolution ,but then providing a button to reload the scene -- it would save the game, and then load an empty level that changes the resolution and then reloads the gam.e It takes about 10 s seconds or less, so it's not terrible, but it's not as cool as the auto version.

    One thing, I had to put a delay before and after the switch or I would get other issues.
     
  10. infinitypbr

    infinitypbr

    Joined:
    Nov 28, 2012
    Posts:
    3,149
    I also have bloom in it.