Search Unity

  1. If you have experience with import & exporting custom (.unitypackage) packages, please help complete a survey (open until May 15, 2024).
    Dismiss Notice
  2. Unity 6 Preview is now available. To find out what's new, have a look at our Unity 6 Preview blog post.
    Dismiss Notice

'System.OutOfMemoryException' occurred in WinRTBridge.winmd

Discussion in 'Windows' started by grcwar, Oct 3, 2013.

  1. grcwar

    grcwar

    Joined:
    Feb 1, 2012
    Posts:
    15
    Hello guys, we are updating our game to Unity 4.2.1f4 and we are running in the following problem:

    Every time we load our gameplay levels, just like "Application.LoadLevel( Level_ID );".

    The game hangs and nothing else happens. Even the music continues to play. The following exception can be found on VS.:

    A first chance exception of type 'System.OutOfMemoryException' occurred in WinRTBridge.winmd

    Anyone saw this before? Our game works fine in every other platform (Android, iOS, WebPlayer), including the editor version on windows builds... Never got memory problems on Windows Store Apps before too.
     
  2. Tomas1856

    Tomas1856

    Unity Technologies

    Joined:
    Sep 21, 2012
    Posts:
    3,930
    Try enabling exception in Debug->Exceptions, and continue until you hit this exception, copy-paste the callstack here.
     
  3. grcwar

    grcwar

    Joined:
    Feb 1, 2012
    Posts:
    15
    Hello Tomas1856... enabled it and when it hits the exception, it tries to load a file called SerializationWeaverReader.cs.

    The call stack shows:

    Code (csharp):
    1. >   WinRTBridge.winmd!WinRTBridge.SerializationWeaverReader.ReadString() Line 81 + 0xd bytes    C#
    2.     Assembly-CSharp.DLL!Level.Unity_Deserialize() + 0xdd bytes 
    3.     [Lightweight Function] 
    The null pointer happens in this assembly code: 00000058 mov dword ptr [ebp-54h],eax

    I'm attaching the dissasembly version that it shows me here. View attachment $OutOfMemoryAssembly.txt

    Just to add some info, our menu scenes are loaded fine with LoadLevel(), just our game scenes (which are bigger I guess) are stuck with this.

    Hope it helps!
     
  4. Tomas1856

    Tomas1856

    Unity Technologies

    Joined:
    Sep 21, 2012
    Posts:
    3,930
    So basically, there's a bug while deserializing Level class, without a bug report, I can't say which field is the culprit.

    It would be nice to get a bug report with your project, or if possible simply create an empty scene, attach Level script, and see if it reproduces the issue, if yes, then making a scene with that script will be enough, if not, then we'll need full project.

    Cheers