Search Unity

[WSA] Exceptions in WinRTBridge.winmd and UnityEngineProxy.ni.DLL

Discussion in 'Windows' started by Qbit86, Mar 29, 2016.

  1. Qbit86

    Qbit86

    Joined:
    Sep 2, 2013
    Posts:
    413
    Hi,

    Please help me resolve runtime failures on Windows Phone 8.1!
    Log output mentions some terrible messages: `InvalidCastException` in WinRTBridge.winmd, `SEHException` in UnityEngineProxy.ni.DLL, `System.IO.FileNotFoundException` in mscorlib.ni.dll. I'm not sure they are connected to each other, and don't know what to do.

    We have the game published in Windows Phone Store, built with Unity 4. Now we are migrating to WSA target platform in Unity 5.3.4f1 (on Windows 8.1 Pro). I use following settings:
    • Scripting backend: .NET (not Il2Cpp)
    • Compilation overrides: Use Net Core (not Partially)
    • SDK: Phone 8.1 (not Universal yet)

    After fixing a couple of compilation issues I've generated Windows Phone 8.1 project. In Visual Studio Community 2015 Update 1 I press [F5] (Start Debugging) to build, deploy and run on mobile device Lumia 920.

    When specifying “Master” configuration, I get error messages mentioned above, execution stops after running for a while.

    Code (csharp):
    1.  
    2.     '...' (CoreCLR: .): Loaded 'C:\windows\system32\SYSTEM.RUNTIME.INTEROPSERVICES.NI.DLL'. Symbols loaded.
    3.     Exception thrown: 'System.InvalidCastException' in WinRTBridge.winmd
    4.     Exception thrown: 'System.Runtime.InteropServices.SEHException' in UnityEngineProxy.ni.DLL
    5.     Exception thrown: 'System.InvalidCastException' in WinRTBridge.winmd
    6.     Exception thrown: 'System.Runtime.InteropServices.SEHException' in UnityEngineProxy.ni.DLL
    7.     '...' (CoreCLR: .): Loaded 'C:\windows\system32\SYSTEM.XML.LINQ.NI.DLL'. Symbols loaded.
    8.     '...' (CoreCLR: .): Loaded 'C:\windows\system32\SYSTEM.XML.NI.DLL'. Symbols loaded.
    9.     Exception thrown: 'System.IO.FileNotFoundException' in mscorlib.ni.dll
    10.     The program '[5268] ...' has exited with code -2146233082 (0x80131506).
    11.    
    Debugger breaks on call to `Resources.LoadAsync("MyPrefab")` with message “An unhandled exception of type 'System.ExecutionEngineException' occurred in BridgeInterface.winmd”.

    Running when “Release” configuratin is active provides more log entries:

    Code (csharp):
    1.  
    2.     Exception thrown: 'System.InvalidCastException' in WinRTBridge.winmd
    3.     Exception thrown: 'System.Runtime.InteropServices.SEHException' in UnityEngineProxy.ni.DLL
    4.     SEHException: External component has thrown an exception.
    5.     at UnityEngineProxy.InternalCalls.MonoBehaviour_CUSTOM_StartCoroutine_Auto(Object self, Object routine)
    6.     at UnityEngine.MonoBehaviour.StartCoroutine(IEnumerator routine)
    7.     at PromoActionsManager.Start()
    8.     at PromoActionsManager.$Invoke56(Int64 instance, Int64* args)
    9.     at UnityEngine.Internal.$MethodUtility.InvokeMethod(Int64 instance, Int64* args, IntPtr method)
    10.     (Filename: <Unknown> Line: 0)
    11.  
    12.     Exception thrown: 'System.InvalidCastException' in WinRTBridge.winmd
    13.     Exception thrown: 'System.Runtime.InteropServices.SEHException' in UnityEngineProxy.ni.DLL
    14.     SEHException: External component has thrown an exception.
    15.     at UnityEngineProxy.InternalCalls.MonoBehaviour_CUSTOM_StartCoroutine_Auto(Object self, Object routine)
    16.     at UnityEngine.MonoBehaviour.StartCoroutine(IEnumerator routine)
    17.     at ChestBonusController.<GetEventBonusInfoLoop>d__0.MoveNext()
    18.     at UnityEngine.Internal.$MethodUtility.$Invoke2167(Int64 instance, Int64* args)
    19.     at UnityEngine.Internal.$MethodUtility.InvokeMethod(Int64 instance, Int64* args, IntPtr method)
    20.     (Filename: <Unknown> Line: 0)
    21.    
    When setting “Debug” configuration, the game runs a little bit longer, and outputs different error messages:

    Code (csharp):
    1.  
    2.     Could not produce class with ID 148.
    3.     (Filename: C:/buildslave/unity/build/Runtime/Serialize/PersistentManager.cpp Line: 1264)
    4.  
    5.     Dereferencing NULL PPtr!
    6.     (Filename: c:\buildslave\unity\build\runtime\baseclasses\BaseObject.h Line: 1062)
    7.    
    It also complains about missing scripts, but I've double checked corresponding prefab, it's ok:

    Code (csharp):
    1.  
    2.     The referenced script on this Behaviour (Game Object 'Mark_Blue_Team') is missing!
    3.     (Filename: C:/buildslave/unity/build/Runtime/Mono/MonoBehaviour.cpp Line: 1655)
    4.  
    5.     The referenced script on this Behaviour (Game Object 'Mark_Red_Team') is missing!
    6.     (Filename: C:/buildslave/unity/build/Runtime/Mono/MonoBehaviour.cpp Line: 1655)
    7.    
    Please give me some clue on what is going on!

    Thanks.
     
  2. Aurimas-Cernius

    Aurimas-Cernius

    Unity Technologies

    Joined:
    Jul 31, 2013
    Posts:
    2,246
    Do check in Debug configuration, it gives the most information and that information is much more accurate.

    Don't you get any errors about serialization problems? That might be one of the causes for this.
    Also check for any UNITY_EDITOR macros in your scripts, perhaps there are editor fields?
     
  3. Qbit86

    Qbit86

    Joined:
    Sep 2, 2013
    Posts:
    413
    Thanks for reply!

    I tried when both “Development Build” in Unity and “Debug” configuration in Visual Studio were checked.

    Unity reports some reference rewriter errors concerning third party dlls: “method `...` doesn't exist in target framework. It is referenced from Photon3Unity3D.dll at...”
    But compilation succeeds.

    The code base is very large, it's hard to find public serialized fields that are excluded under specific platform defines. But there are no such issues on Andoid and iOS editions of our game, so it's probably not the case of `#if UNITY_EDITOR`. Even if it is the case of missing field due to some preprocessor magic — error messages should not be so cryptic in that scenario.
     
  4. Aurimas-Cernius

    Aurimas-Cernius

    Unity Technologies

    Joined:
    Jul 31, 2013
    Posts:
    2,246
    ReferenceRewriter errors are not good. They usually indicate the problems that will come out at runtime or during submission (WACK failure). That's where you should start fixing your project.

    The problem with serialization is that WSA uses different implementation than iOS or Android, hence some corner cases can cause problems. Though I agree, that error messages are often not helpful, especially for large projects :(
     
  5. Tautvydas-Zilys

    Tautvydas-Zilys

    Unity Technologies

    Joined:
    Jul 25, 2013
    Posts:
    6,419
    I agree with Aurimas. You need to fix ReferenceRewriter errors first. We don't stop the build from completing, as in some cases the project might still work correctly. They tell you which classes and methods aren't found during compilation, and if you do hit a path where they're required at runtime, you'll simply crash.

    The debug build seems to crash for a different reason:

    class ID 148 is "NetworkView". It's part of old networking APIs, which are no supported on Windows Store. Are you using any of classes from "UnityEngine.Network"? (note: UnityEngine.Networking is our new API, and is fully supported on Windows Store).
     
  6. Aurimas-Cernius

    Aurimas-Cernius

    Unity Technologies

    Joined:
    Jul 31, 2013
    Posts:
    2,246
    To clarify: one of your plugins must be using it, as scripts won't compile with old networking APIs, they are not available on WSA.
     
  7. Qbit86

    Qbit86

    Joined:
    Sep 2, 2013
    Posts:
    413
    Could you please extend this particular error message with actual class name in future release of Unity?

    We are using legacy `NetworkView` for local multiplayer (with no dedicated server), and Photon networking for worldwide multiplayer. Local multiplayer is supported on Android and iOS (and Editor); and is not available on Windows Phone 8. All our usages of `NetworkView` are wrapped with conditional compilation; for third party libraries there were Plugins/WP8/*.dll stubs — this is how it used to work on old WP8 target before migration to WSA.

    As far as I understood, new Unity networking does not support local multiplayer, does it?

    Ok, thanks for clarification! I will try.
     
    Last edited: Mar 29, 2016
  8. Tautvydas-Zilys

    Tautvydas-Zilys

    Unity Technologies

    Joined:
    Jul 25, 2013
    Posts:
    6,419
    I suppose we should do that. Until we implement it, you can look at this page to get the name from class id:

    http://docs.unity3d.com/Manual/ClassIDReference.html
     
    Qbit86 likes this.
  9. Tomas1856

    Tomas1856

    Unity Technologies

    Joined:
    Sep 21, 2012
    Posts:
    1,954
    It does, but server and client has to run on different devices.
     
  10. Qbit86

    Qbit86

    Joined:
    Sep 2, 2013
    Posts:
    413
    I fixed reference rewriter errors and got green WACK test result. But runtime errors are still there:
    Code (csharp):
    1. Could not produce class with ID 148.
    2. Dereferencing NULL PPtr!
    Could you please suggest what to attempt next?
     
  11. Aurimas-Cernius

    Aurimas-Cernius

    Unity Technologies

    Joined:
    Jul 31, 2013
    Posts:
    2,246
    Check you plugin settings and make sure you don't have NetworkView used anywhere in you scripts on WSA.
     
  12. Qbit86

    Qbit86

    Joined:
    Sep 2, 2013
    Posts:
    413
    All usages of `NetworkView` on WSA usually imply compile-time errors (so I fix them wrapping in conditional compilation). But I'm facing runtime errors at the moment.
     
  13. Aurimas-Cernius

    Aurimas-Cernius

    Unity Technologies

    Joined:
    Jul 31, 2013
    Posts:
    2,246
    Are you sure none of your plugins uses it?
     
  14. Qbit86

    Qbit86

    Joined:
    Sep 2, 2013
    Posts:
    413
    I'm not, but both reference rewriter and WACK do not complain about missing types anymore.
     
  15. Tautvydas-Zilys

    Tautvydas-Zilys

    Unity Technologies

    Joined:
    Jul 25, 2013
    Posts:
    6,419
    NetworkView can also be a component on a gameobject. Is there any chance you have that on any of your prefabs or in your scenes? Does it crash when you try to load a particular scene?

    Could we get a bug report on this? Even if you do have it in your scene somewhere, the error message is terrible and doesn't help you fix it in any way. I'd like to address it.
     
    Qbit86 likes this.
  16. Qbit86

    Qbit86

    Joined:
    Sep 2, 2013
    Posts:
    413
    Thanks; you are right. After removing `NetworkView`'s from prefabs Unity runtime stopped complaining about “Could not produce class with ID 148.” I used to perform such cleaning before, but in previous version of Unity this was build-time issue, not runtime; so it was easier to not to miss it. The Editor script for cleaning (in case if someone also encounters such a problem):
    Code (csharp):
    1. // Make sure prefabs are stored under version control so destructive changes can be discarded.
    2.  
    3. var guids = AssetDatabase.FindAssets("t:prefab", null);
    4. var paths = guids.Select<string, string>(AssetDatabase.GUIDToAssetPath);
    5. foreach (var path in paths)
    6. {
    7.     var go = AssetDatabase.LoadMainAssetAtPath(path) as GameObject;
    8.     if (go == null)
    9.         continue;
    10.  
    11.     var nvs = go.GetComponentsInChildren<NetworkView>(true);
    12.     if (nvs == null || nvs.Length == 0)
    13.         continue;
    14.  
    15.     Debug.Log(path);
    16.     foreach (var nv in nvs)
    17.         DestroyImmediate(nv, true);
    18. }
    19.  
    20. AssetDatabase.SaveAssets();
    However, there are still repeating NREs to be investigated:
    Code (csharp):
    1. NullReferenceException: Exception of type 'System.NullReferenceException' was thrown.
    2.    at WinRTBridge.Utils.ThrowNewNullReferenceException(String message)
    3.    at UnityEngineProxy.InternalCalls.GameObject_CUSTOM_GetComponent(Object self, Type type)
    4.    at UnityEngine.GameObject.GetComponent[T]()
    5.    at WeaponBonus.Start()
    6.    at WeaponBonus.$Invoke2(Int64 instance, Int64* args)
    7.    at UnityEngine.Internal.$MethodUtility.InvokeMethod(Int64 instance, Int64* args, IntPtr method)
    It mentions our method `WeaponBonus.Start()` but both start and end of stacktrace are inside Unity code. `NullReferenceException` is supposed to indicate callee-side error, not caller-side.
     
  17. Tautvydas-Zilys

    Tautvydas-Zilys

    Unity Technologies

    Joined:
    Jul 25, 2013
    Posts:
    6,419
    Can you enable break on exception in Visual Studio (Debug -> Windows -> Exception Settings, then check "Common Language Runtime Exceptions" checkbox), then turn on mixed mode debugging (Right click on VS project in solution explorer -> Properties -> Debug -> Debugger type -> Mixed), run your application and wait for the exception to happen? When it does, you should be able to see the full callstack including the native frames. Could you paste it?
     
  18. Tomas1856

    Tomas1856

    Unity Technologies

    Joined:
    Sep 21, 2012
    Posts:
    1,954
    Could you also specify, what type are you using when calling GetComponent from WeaponBonus.Start, maybe it's one of the unsupported Network types?
     
  19. Qbit86

    Qbit86

    Joined:
    Sep 2, 2013
    Posts:
    413
    Visual Studio says it does not allow to use mixed mode when running on device. (I can turn on this mode, but attempt to run debugging results in error message box.)

    That was an issue with our logic. Maybe `GameObject.FindGameObjectWithTag("...")` in case of absence returns not null reference, but rather “pseudo-null” object. That's why calling `GetComponent<T>()` on it resulted in `NullReferenceException` was risen not from our code but deeper in backtrace.

    Anyway I fixed this particular issue (and moved on to bunch of new porting issues).

    Thanks!
     
  20. Tautvydas-Zilys

    Tautvydas-Zilys

    Unity Technologies

    Joined:
    Jul 25, 2013
    Posts:
    6,419
    Sorry about that, I didn't realize you were debugging on device. VS was correct: mixed mode debugging doesn't work on ARM.
     
  21. Qbit86

    Qbit86

    Joined:
    Sep 2, 2013
    Posts:
    413
    I've got another exceptions while running in Master configuration:
    Code (csharp):
    1. '...' (CoreCLR: .): Loaded 'C:\windows\system32\en-US\mscorlib.debug.resources.dll'. Module was built without symbols.
    2. Exception thrown: 'System.ArgumentException' in mscorlib.ni.dll
    3. Exception thrown: 'System.ArgumentException' in mscorlib.ni.dll
    4. '...' (CoreCLR: .): Loaded 'C:\data\ProgramData\Microsoft\Windows\AppRepository\Packages\88be10a2-d68e-cb45-bb67-e691a9969c9a_10.3.2.898_arm__w5f6ttbkjhbgj\NI\UnityEngineProxy.ni.DLL'. Cannot find or open the PDB file.
    5. ...
    6. '...' (CoreCLR: .): Loaded 'C:\windows\system32\SYSTEM.RUNTIME.INTEROPSERVICES.NI.DLL'. Symbols loaded.
    7. Exception thrown: 'System.AccessViolationException' in WinRTBridge.winmd
    8. The program '[1172] ...' has exited with code 0 (0x0).
    However in Release or Debug configuration game runs relatively fine. (Until “system out of memory” after playing a while.) So it's hard to get more detailed logs since `ArgumentException` and `AccessViolationException` don't reproduce in Debug configuration, only in Master.
     
  22. Qbit86

    Qbit86

    Joined:
    Sep 2, 2013
    Posts:
    413
    I was wrong, Release configuration also encounters such exceptions.

    At the beginning:
    Code (csharp):
    1. Exception thrown: 'System.ArgumentException' in mscorlib.ni.dll
    2. PlayerConnection initialized network socket : 0.0.0.0 55427
    3.  
    4. Multi-casting "[IP] 192.168.1.110 [Port] 55427 [Flags] 2 [Guid] 1474510260 [EditorId] 4294967295 [Version] 1048832 [Id] MetroPlayerARM(Windows-Phone) [Debug] 0" to [225.0.0.222:54997]...
    5.  
    6. GfxDevice: creating device client; threaded=1
    7.  
    8. Exception thrown: 'System.ArgumentException' in mscorlib.ni.dll
    9. Disabling Low Latency presentation API.
    10.  
    Before the crash:
    Code (csharp):
    1. Exception thrown: 'System.AccessViolationException' in WinRTBridge.winmd
    2. The thread 0x80 has exited with code 0 (0x0).
    3. The program '[620] ...' has exited with code 0 (0x0).
     
  23. Tautvydas-Zilys

    Tautvydas-Zilys

    Unity Technologies

    Joined:
    Jul 25, 2013
    Posts:
    6,419
    Does VS not break on the exception?
     
  24. Qbit86

    Qbit86

    Joined:
    Sep 2, 2013
    Posts:
    413
    Printf-debugging shows that failure is on this line:
    Code (csharp):
    1. // `serialized` is equal to "{}" here.
    2. var dto = JsonUtility.FromJson<Memento>(serialized);
    where
    Code (csharp):
    1. [Serializable]
    2. internal struct Memento
    3. {
    4.     public List<string> fulfilledQuests;
    5.     public bool received;
    6. }
    VS breaks with “choose file” dialog box “Find Source: JsonUtilityBinding.gen.cs”.
    So, looks like Json-deserializing does not work :-`
     
  25. Tautvydas-Zilys

    Tautvydas-Zilys

    Unity Technologies

    Joined:
    Jul 25, 2013
    Posts:
    6,419
    Could you submit a bug report on that? You must have hit an edge case, JSON serialization should work normally.
     
  26. Qbit86

    Qbit86

    Joined:
    Sep 2, 2013
    Posts:
    413
  27. Qbit86

    Qbit86

    Joined:
    Sep 2, 2013
    Posts:
    413
    Now I'm constantly facing out-of-memory crash when loading some scenes (even light ones):
    Code (csharp):
    1. Could not allocate memory: System out of memory!
    2. Trying to allocate: 4194304B with 16 alignment. MemoryLabel: GfxDevice
    3. Allocation happend at: Line:62 in C:\buildslave\unity\build\Runtime/Containers/WrappingRingbuffer.h
    4. Memory overview
    5.  
    6. [ ALLOC_DEFAULT ] used: 224669840B | peak: 224673278B | reserved: 229105528B
    7. [ ALLOC_TEMP_JOB ] used: 1048806B | peak: 0B | reserved: 3145728B
    8. [ ALLOC_GAMEOBJECT ] used: 12558331B | peak: 15860228B | reserved: 13774732B
    9. [ ALLOC_GFX ] used: 5634163B | peak: 5999159B | reserved: 5685913B
    10. [ ALLOC_PROFILER ] used: 1890248B | peak: 2811188B | reserved: 3336166B
    11. [ ALLOC_TEMP_THREAD ] used: 292988B | peak: 0B | reserved: 1769472B
    But not that Lumia 920 is weak device.

    Could you please give some clues on this?
     
  28. Tautvydas-Zilys

    Tautvydas-Zilys

    Unity Technologies

    Joined:
    Jul 25, 2013
    Posts:
    6,419
    Did you try using the profiler to figure out what's using up your memory?
     
  29. Qbit86

    Qbit86

    Joined:
    Sep 2, 2013
    Posts:
    413
    In Visual Studio (Community 2015 Update 2) I see menu item “Start Diagnostic Tools Without Debugging...” I check “Memory Usage” only and press [Start], session begins. I see growing graph and before app crashes in usual point I try to [Make Snapshot]. But in created snapshot pressing links results in “An error occured while processing the snapshot: Failed to process managed heap”. What am I doing wrong?

    Documentation says: “From the Debug menu, select Start Windows Phone Application Analysis.” But there is no such menu item like in previous version of VS.
     
  30. Tautvydas-Zilys

    Tautvydas-Zilys

    Unity Technologies

    Joined:
    Jul 25, 2013
    Posts:
    6,419
    No idea, sorry. Looks like something is wrong with Visual Studio installation.

    However, when I suggested using the profiler, I didn't mean Visual Studio profiler - I meant the Unity one that you can find in the editor. Just open it up, connect to the phone, hit "Take sample" and it should tell you what's using up memory.
     
  31. Qbit86

    Qbit86

    Joined:
    Sep 2, 2013
    Posts:
    413
    I've attached Profiler to running device over network. In sample taken there is suspicious entry: “Assets / AudioManager 89.5 MB” How can I turn this off?

    Another entry is “Other / Objects 122.9 MB” with no details. Not sure if this is overkill, but some weaker Android and iOS devices work relatively fine (on same codebase) with no persistent memory crashes.
     
  32. Tautvydas-Zilys

    Tautvydas-Zilys

    Unity Technologies

    Joined:
    Jul 25, 2013
    Posts:
    6,419
    Can you show a screenshot of the profiler data?
     
  33. Qbit86

    Qbit86

    Joined:
    Sep 2, 2013
    Posts:
    413
    All

    Other

    Assets

    (For comparison I've tried to check “Disable Unity Audio” in “Edit > Project Settings > Audio”, but this resulted in runtime crash.)
     
  34. Tautvydas-Zilys

    Tautvydas-Zilys

    Unity Technologies

    Joined:
    Jul 25, 2013
    Posts:
    6,419
    How many objects do you have in the scene?
     
  35. janm_unity3d

    janm_unity3d

    Unity Technologies

    Joined:
    Jun 12, 2012
    Posts:
    28
    Hi Qbit, could you post a screenshot of what the Audio pane in the profiler looks like? Esp. the memory usage numbers at the bottom in "Stats".
     
  36. Qbit86

    Qbit86

    Joined:
    Sep 2, 2013
    Posts:
    413
    What does “Sample Sound Memory: 111.8 MB” mean?

    Audio
     
  37. Qbit86

    Qbit86

    Joined:
    Sep 2, 2013
    Posts:
    413
    Memory pane of profiler (with “Simple” view) says:
    GameObjects in Scene: 5118
    Total Objects in Scene: 18329

    I will ask my colleague to compare this figure with objects count on iOS. But this number is expected to be less then the same for Android or iOS — I'm trying to enter multiplayer arena, and there are no network players for Windows Phone at the moment (since new version of client is not published yet).
     
  38. janm_unity3d

    janm_unity3d

    Unity Technologies

    Joined:
    Jun 12, 2012
    Posts:
    28
    Hi again, well, this looks like you're spending all that memory on audio data, which is not a bad thing per se. However, you can probably reduce the memory needed by changing the compression options on the clips. If I have to guess, I'd say all your clips probably have the Load Type set to "Decompress On Load" which will expand the compressed audio into memory -- good for the CPU, but obviously expensive in terms of memory. Can you confirm this? Also, make sure that the Compression Format is set to something else than PCM. If you need further memory savings you may remove the "Preload audio data" checkbox, so loading will happen on demand (but with a small delay). Note that it is your responsibility to unload it again after playing using AudioClip.UnloadAudioData(), otherwise you will just run out of memory later on.
     
  39. Qbit86

    Qbit86

    Joined:
    Sep 2, 2013
    Posts:
    413
    We've run profiler on iOS, it shows:

    GameObjects in Scene: 5269
    Total Objects in Scene: 18882

    So this numbers on WP8 look normal comparing to “reference etalon”.

    But in case of iOS:
    Other / Objects: 61.5 MB (comparing to 131.2 MB on WP8)
    Assets / Audio Manager : 22.8 MB (comparing to 96.8 MB on WP8)
    Audio / Sample Sound Memory: 18.9 MB (comparing to 111.8 MB on WP8)
     
  40. Qbit86

    Qbit86

    Joined:
    Sep 2, 2013
    Posts:
    413
    In our case it's preferably to save more memory in trade for other resources, since out-of-memory crashes are frequent, and they are worse than lags or hiccups.

    Oh, I will try to figure out. (Designer who is responsible for sounds is AFK for a few days. The are a lot of sounds and audio clips here and there in the project...) As far as I see, Load Type is set to “Compressed in Memory” for some assets and “Streaming” for others; I don't see “Decompress on Load”.

    There are a lot of assets with PCM Compression Format — should I change it to “Vorbis” or maybe override for WSA platform and leave default for others?
     
  41. Qbit86

    Qbit86

    Joined:
    Sep 2, 2013
    Posts:
    413
    Reimported all audio clips with “Load Type”: “Compressed In Memory”, “Compression Format”: “Vorbis”. Now
    Other / Objects: 47.7 MB
    Assets / Audio Manager: 14.1 MB
    Audio / Sample Sound Memory: 15.0 MB

    Thanks for guidance!
     
    Tautvydas-Zilys likes this.
  42. janm_unity3d

    janm_unity3d

    Unity Technologies

    Joined:
    Jun 12, 2012
    Posts:
    28
    Having all sounds compressed with Vorbis may be a bit heavy on mobile platforms depending on the sound setup. You may consider using ADPCM as a compromise between speed and compression ratio, as it compresses 1:3.5x vs the 1:10x Vorbis compression (depending on the quality slider which doesn't apply to the fixed compression ratio of ADPCM). For short sounds that are played in large numbers (footsteps, guns etc) I would recommend actually decompressing them on load, but again, these are just rules of thumb, and like any other aspect of the game tweaking has to be done on a case-by-case basis for the specific sounds in question.
     
  43. Qbit86

    Qbit86

    Joined:
    Sep 2, 2013
    Posts:
    413
    When I build targeting WSA with SDK set to “Universal 8.1”, I get three projects in generated solution: “*.Shared”, “*.Windows (Windows 8.1)”, and “*.WindowsPhone (Windows Phone 8.1)”. Which one should I use to create single app package for publishing to the UWP Store?
     
  44. Qbit86

    Qbit86

    Joined:
    Sep 2, 2013
    Posts:
    413
    Looks like “8.1” still requires both; and “10” allows to publish single appx.
     
  45. Tautvydas-Zilys

    Tautvydas-Zilys

    Unity Technologies

    Joined:
    Jul 25, 2013
    Posts:
    6,419
    Correct. If you target Windows 8.1, you'll still need separate packages for phone and PC.
     
  46. Qbit86

    Qbit86

    Joined:
    Sep 2, 2013
    Posts:
    413
    Well, then what is the difference between building with SDK: “Phone 8.1” and SDK: “Universal 8.1”, if we only need (at the moment) to target Windows Phone 8.1 devices, not Windows 8.1 desktop? They both produce appx package (not xap), don't they?
     
  47. Aurimas-Cernius

    Aurimas-Cernius

    Unity Technologies

    Joined:
    Jul 31, 2013
    Posts:
    2,246
    If you only targe Windows Phone 8.1 devices, then use Phone 8.1 SDK and save some time for yourself.
    Universal 8.1 is useful only when you target both Phone and Desktop/Tablet 8.1 devices.
     
  48. mrm83

    mrm83

    Joined:
    Nov 29, 2014
    Posts:
    220
    I am debugging my windows 10 game and i keep getting this error in the debug log

    Exception thrown: 'System.NullReferenceException' in WinRTBridge.winmd

    it doesn't crash the app in release mode, but once i change it to master it crashes.

    i am using unity multiplayer and i dont have any networkviews. i cant figure out what is causing this.. how can i pinpoint exactly which line is throwing that exception?
     
  49. Aurimas-Cernius

    Aurimas-Cernius

    Unity Technologies

    Joined:
    Jul 31, 2013
    Posts:
    2,246
    Can you provide a stacktrace for the crash?
    Or perhaps it crashes in debug as well if you enable .NET Native toolchain?
     
  50. mtartist

    mtartist

    Joined:
    Jan 10, 2014
    Posts:
    17
    I'm also getting the same error followed by a crash. In my case it happens when I have a DoTween looped animation running followed by a scene switch.

    I've opened a report (Case 828619), together with a minimal project that reproduces the issue.
     
    Last edited: Sep 3, 2016