I’m using freshly generated build using Unity 5.4.1patch1 and latest Visual Studio updates.
Been trying to port my game to Xbox hence the needed update.
Master Config With D3D
ERROR:
An exception of type 'System.TypeInitializationException' occurred in System.Private.CoreLib.dll but was not handled in user code
Additional information: TypeInitialization_Type_NoTypeAvailable
If there is a handler for this exception, the program may be safely continued.
Any ideas what this means or if anyone else has issue?
After thinking about it, do not think code is issue, this code not been changed in previous versions of my game build and all worked.
It could be a issue with latest Visual Studio build, has everything been upgraded on your side or known fixes coming next week.
I also have issue on Xbox Only = An unhandled exception of type ‘System.NullReferenceException’ occurred in WinRTBridge.dll that I’m trying figure out what is causing it as this related to your side the specific .dll. Again could be related to not having latest updates (happens on 5.5beta also.)
The System.TypeInitializationException can bypass this one.
The System.NullReferenceException’ occurred in WinRTBridge.dll causes crash.
I will try and get some more information, will check my coding first to see if I got everything set correctly before trying to officially file any bug reports…
Just wanted know if anyone experienced similar or any known issues… cheers
Stack Trace Text: (XXX = removed project file name for thread)
StackTrace " at System.Runtime.CompilerServices.ClassConstructorRunner.EnsureClassConstructorRun(Void* returnValue, StaticClassConstructionContext* pContext) in f:\dd\ndp\fxcore\CoreRT\src\System.Private.CoreLib\src\System\Runtime\CompilerServices\ClassConstructorRunner.cs:line 89\r\n at XXX.XXX() in C:\Users\XXX\Desktop\XXX\Assets\Scripts\XXX.js:line 70\r\n at XXX.$Invoke3(Int64 instance, Int64* args)\r\n at UnityEngine.Internal.$MethodUtility.InvokeMethod(Int64 instance, Int64* args, IntPtr method)" string
So I reinstalled Unity and using back-end .NET + Use Net Core Partially (due to plugins used in project) D3D as mentioned already.
The error still exists, so pretty sure maybe Unity issue as I see the output console also spammed alot with messages such as: C:\Program Files (x86)\MSBuild\Microsoft.NetNative\ARM\ilc\IlcInternals.targets(936,5): warning : ILTransform_0027: Invalid IL detected in method, although I think can ignore these.
XboxOne: $exception this latest:
StackTrace " at WinRTBridge.Utils.ThrowNewNullReferenceException(String message) in C:\buildslave\unity\build\PlatformDependent\WinRT\WinRTBridge\Utils.cs:line 156\r\n at System.Action`1.InvokeOpenStaticThunk(T obj)\r\n at WinRTBridge.MethodTools_ThrowNewExceptionDelegate__WinRTBridge__Impl.ReverseDelegateStub(Byte* unsafe_message) in c:\Users\XXX\Desktop\XXX\XXX\obj\x64\Master\ilc\intermediate\XXX.McgInterop\ImplTypes.g.cs:line 80916" string
Apologies but is there a specific screen or section I need copy you from Visual Studio?
Not sure what I need to be looking at as this was the line copied from $exception…
Ok so after checking all code and update plugins, this is where I stand.
We use XBOX ONE as example as both happen on this device:
Exception 1: On Game Startup:
Assembly-UnityScript.dll!xxx.FxxxPxxx() Line 70 C#
Code: function FxxxPxxx():IEnumerator
System.Private.CoreLib.dll!System.Runtime.CompilerServices.ClassConstructorRunner.EnsureClassConstructorRun(void* returnValue, System.Runtime.CompilerServices.StaticClassConstructionContext* pContext) Line 88 C#
Exception 2: On Game Scene Load - Error has changed slightly.
Message Evaluation of method System.Exception.get_Message() requires use of the static field System.Text.StringBuilderCache.t_cachedInstance, which is not available in this context.string
StackTrace " at WinRTBridge.Utils.ThrowNewNullReferenceException(String message) in C:\buildslave\unity\build\PlatformDependent\WinRT\WinRTBridge\Utils.cs:line 156\r\n at System.Action`1.InvokeOpenStaticThunk(T obj)\r\n at WinRTBridge.MethodTools_ThrowNewExceptionDelegate__WinRTBridge__Impl.ReverseDelegateStub(Byte* unsafe_message) in c:\Users\xxx\Desktop\New folder\xxx\obj\x64\Master\ilc\intermediate\XXXX.McgInterop\ImplTypes.g.cs:line 80996" string
This is what was on Stack Trace Window and not much more.
I have a feeling they maybe Unity issues, please can you check your side and see if you can see any code issues… Not sure what next steps to take. Only thing I can try is the next Unity patch release…
The first error seems to be related to .IEnumerators, as the first break was fixed by changing code not to use IEnumerator but then later in the game in another script issue came back. Is there any known bugs filed for this?
For the second error I have fixed it by adding check to make sure the camera is not null. But I need to monitor this later in the game.
Like I said before this is new issues due to 5.4 upgrade!
Can you help on the first error, my fear is I cannot release my game as worried users may encounter this error and be stuck with it when playing, on visual studio we can bypass it.
The error seems to be related to .IEnumerators, I assume this to be the case as the first break was fixed by changing code not to use IEnumerator - but then later in the game and through coding using it over 60 times, so cannot make a change to code.
On visual studio I can bypass it by clicking continue.
I provided you details start of thread? I cannot proceed at current level
From what you said so far, it seems that it is an internal exception that is thrown and caught inside the .NET Framework. If you can continue in Visual Studio by pressing continue, it means it is a first chance exception and that it is fully handled. It’s the same if you did this:
Visual Studio would equally break on the throw statement, so you could inspect what caused the exception to be thrown. But, since it is handled, there’s no harm in the exception itself.
You can run your game without Visual Studio and without a debugger attached, and see if everything works fine. That should be confirmation enough that it will not make your game crash.
Thank you for reply, gives me some confidence.
I still need to wait as I believe the random freeze error needs be fixed and still a few small issues with latest Unity and Windows 10, look forward to the bug fixes to come.
Keep up good work, thanks…