'System.OutOfMemoryException' occurred in WinRTBridge.winmd

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.

Try enabling exception in Debug->Exceptions, and continue until you hit this exception, copy-paste the callstack here.

Hello Tomas1856… enabled it and when it hits the exception, it tries to load a file called SerializationWeaverReader.cs.

The call stack shows:

>	WinRTBridge.winmd!WinRTBridge.SerializationWeaverReader.ReadString() Line 81 + 0xd bytes	C#
 	Assembly-CSharp.DLL!Level.Unity_Deserialize() + 0xdd bytes	
 	[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. 1376788–69681–$OutOfMemoryAssembly.txt (3.35 KB)

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!

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