microsoft / MixedRealityToolkit-Unity

This repository is for the legacy Mixed Reality Toolkit (MRTK) v2. For the latest version of the MRTK please visit https://github.com/MixedRealityToolkit/MixedRealityToolkit-Unity
https://aka.ms/mrtkdocs
MIT License
6k stars 2.12k forks source link

Build of the examples does not work on HoloLens2 #7381

Closed FSchmidNT closed 9 months ago

FSchmidNT commented 4 years ago

Describe the bug

When I try to build any scene from the Unity Example Package on the HoloLens2, it works without problems. But when I start the app on the HL2, the typical triangles appear, but after that nothing works anymore. If I build the app as an apppackage and install it via the Device Portal it shows the frame like when the app is sleeping. If I build directly from VS with the USB cable build the app closes completely.

With a colleague the same setting works perfectly. But he uses VS17. Can that be the problem?

To reproduce

Steps to reproduce the behavior:

I have followed the instructions from these websites:

Your setup (please complete the following information)

Target platform (please complete the following information)

Troy-Ferrell commented 4 years ago

@FSchmidNT thanks for filing this issue. Are you able to build/deploy an app without MRTK?

Also is there any useful information the unity player log from on device? With device portal connected > File Explorer > LocalAppData > Select your app package > TempState (I Believe? one of the folders has UnityPlayer.log or some such)

I also find that the player log will generally be flushed out to disk once the app either crashes or you shut down the app yourself (See "Apps" tab in Device portal as well)

FSchmidNT commented 4 years ago

@Troy-Ferrell yes, I could build other apps, for example the demo of Azure Spatial Anchors in the current version (https://github.com/Azure/azure-spatial-anchors-samples/releases) .

Here is the logfile:

Logging to C:/Data/Users/.../AppData/Local/Packages/MRTKTestDirect_pzq3xp76mxafg/TempState/UnityPlayer.log
Loading native plugins
  Loading AudioPluginMsHRTF.dll
Module information:
 Built with Compiler Ver '191627012'
 Built from '2019.3/staging' branch
 Version is '2019.3.0f1 (ffacea4b84e7)'
 Master build
 Application type 'D3D'
 OS 'Windows 10 (10.0.18362)'
[Subsystems] Discovering subsystems at path C:/Data/Users/DefaultAccount/AppData/Local/DevelopmentFiles/MRTKTestDirectVS.Master_ARM.fsd/Data/UnitySubsystems
GfxDevice: creating device client; threaded=1
Direct3D:
    Version:  Direct3D 11.0 [level 11.1]
    Renderer: Qualcomm(R) Adreno(TM) 630 GPU (ID=0x45373230)
    Vendor:   (null)
    VRAM:     1932 MB
Initialize engine version: 2019.3.0f1 (ffacea4b84e7)
D3D11 device created for Microsoft Media Foundation video decoding.
Created eye textures with a "texture array" layout.  The "single-pass instancing" stereo mode will be used.

Internal: JobTempAlloc has allocations that are more than 4 frames old - this is not allowed and likely a leak 
(Filename:  Line: 554)

Internal: JobTempAlloc has allocations that are more than 4 frames old - this is not allowed and likely a leak 
(Filename:  Line: 554)

Internal: JobTempAlloc has allocations that are more than 4 frames old - this is not allowed and likely a leak 
(Filename:  Line: 554)

Internal: JobTempAlloc has allocations that are more than 4 frames old - this is not allowed and likely a leak 
(Filename:  Line: 554)

Internal: JobTempAlloc has allocations that are more than 4 frames old - this is not allowed and likely a leak 
(Filename:  Line: 554)

Internal: JobTempAlloc has allocations that are more than 4 frames old - this is not allowed and likely a leak 
(Filename:  Line: 554)

Internal: JobTempAlloc has allocations that are more than 4 frames old - this is not allowed and likely a leak 
(Filename:  Line: 554)

Internal: JobTempAlloc has allocations that are more than 4 frames old - this is not allowed and likely a leak 
(Filename:  Line: 554)

Internal: JobTempAlloc has allocations that are more than 4 frames old - this is not allowed and likely a leak 
(Filename:  Line: 554)

Internal: JobTempAlloc has allocations that are more than 4 frames old - this is not allowed and likely a leak 
(Filename:  Line: 554)

Internal: JobTempAlloc has allocations that are more than 4 frames old - this is not allowed and likely a leak 
(Filename:  Line: 554)

Internal: JobTempAlloc has allocations that are more than 4 frames old - this is not allowed and likely a leak 
(Filename:  Line: 554)

UnloadTime: 3,159167 ms
Failed to calculate boundary bounds.
UnityEngine.DebugLogHandler:LogFormat(LogType, Object, String, Object[])
UnityEngine.Logger:Log(LogType, Object)
UnityEngine.Debug:LogWarning(Object)
Microsoft.MixedReality.Toolkit.Boundary.BaseBoundarySystem:Initialize()
Microsoft.MixedReality.Toolkit.Boundary.MixedRealityBoundarySystem:Initialize()
Microsoft.MixedReality.Toolkit.<>c:<InitializeAllServices>b__60_0(IMixedRealityService)
System.Action`1:Invoke(T)
Microsoft.MixedReality.Toolkit.MixedRealityToolkit:ExecuteOnAllServicesInOrder(Action`1)
Microsoft.MixedReality.Toolkit.MixedRealityToolkit:InitializeServiceLocator()
Microsoft.MixedReality.Toolkit.MixedRealityToolkit:RegisterInstance(MixedRealityToolkit, Boolean)
Microsoft.MixedReality.Toolkit.MixedRealityToolkit:Awake()

(Filename: C:\buildslave\unity\build\Runtime/Export/Debug/Debug.bindings.h Line: 35)

Internal: JobTempAlloc has allocations that are more than 4 frames old - this is not allowed and likely a leak 
(Filename:  Line: 554)

Internal: JobTempAlloc has allocations that are more than 4 frames old - this is not allowed and likely a leak 
(Filename:  Line: 554)

Internal: JobTempAlloc has allocations that are more than 4 frames old - this is not allowed and likely a leak 
(Filename:  Line: 554)

Internal: JobTempAlloc has allocations that are more than 4 frames old - this is not allowed and likely a leak 
(Filename:  Line: 554)

Internal: JobTempAlloc has allocations that are more than 4 frames old - this is not allowed and likely a leak 
(Filename:  Line: 554)

Internal: JobTempAlloc has allocations that are more than 4 frames old - this is not allowed and likely a leak 
(Filename:  Line: 554)
cheles commented 4 years ago

@Troy-Ferrell Might this be related to Unity old bug https://forum.unity.com/threads/jobs-lags-jobtempalloc-has-allocations-that-are-more-than-4-frames-old.513124/page-4 that resurfaced ?

Zee2 commented 3 years ago

@elbuhofantasma is this resolved/have you seen this?

stale[bot] commented 2 years ago

This issue has been marked as stale by an automated process because it has not had any recent activity. It will be automatically closed in 30 days if no further activity occurs. If this is still an issue please add a new comment with more recent details and repro steps.

IssueSyncBot commented 9 months ago

We appreciate your feedback and thank you for reporting this issue.

Microsoft Mixed Reality Toolkit version 2 (MRTK2) is currently in limited support. This means that Microsoft is only fixing high priority security issues. Unfortunately, this issue does not meet the necessary priority and will be closed. If you strongly feel that this issue deserves more attention, please open a new issue and explain why it is important.

Microsoft recommends that all new HoloLens 2 Unity applications use MRTK3 instead of MRTK2.

Please note that MRTK3 was released in August 2023. It features an all-new architecture for developing rich mixed reality experiences and has a minimum requirement of Unity 2021.3 LTS. For more information about MRTK3, please visit https://www.mixedrealitytoolkit.org.

Thank you for your continued support of the Mixed Reality Toolkit!