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

Linux standalone sharedassets are corrupted #3183

Closed wassx closed 5 years ago

wassx commented 5 years ago

Does this affect the legacy HoloToolkit (master) or the Mixed Reality Toolkit (mrtk_release)? Mixed Reality Toolkit

Describe the bug Building a minimal scene for linux standalone with build target Linux64. In the scene (and project) there is just a mixedrealityplayspace with a camera (tagged) and the mrtk. Everything compiles and looks fine. When starting the standalone app (in my case done in a docker container) the Player.log is filled with

Initialize engine version: 2018.2.16f1 (39a4ac3d51f6)
Forcing GfxDevice: Null
GfxDevice: creating device client; threaded=0
NullGfxDevice:
    Version:  NULL 1.0 [1.0]
    Renderer: Null Device
    Vendor:   Unity Technologies
FMOD initialized on nosound output
Begin MonoManager ReloadAssembly
- Completed reload, in  0.038 seconds
The file '/files/holox_Data/sharedassets0.assets' is corrupted! Remove it and launch unity again!
[Position out of bounds!]

(Filename:  Line: 221)

This error messages spams the log. Cleaning the build folder, library,... did not work. This error occurs every 95% of builds/launches.

Please see attached project.

Unity Editor Version 2018.2.16f1

Mixed Reality Toolkit Release Version mrtk_development https://github.com/Microsoft/MixedRealityToolkit-Unity/tree/49f5c4c22b66a7e2c212f15b982056dcb31ff4cd 22.11.2018

wassx commented 5 years ago

test.zip

StephenHodgson commented 5 years ago

Thanks for the report.

Could you try going back a few commits and see when this was introduced?

Have you also been able to reproduce this for other platforms like windows or osx?

wassx commented 5 years ago

I tried with a version shortly after vnext_beta, same issue. Can only reproduce with linux64. Will try to step back and find latest working version.

StephenHodgson commented 5 years ago

Much appreciated.

wassx commented 5 years ago

Oh man that was quite some digging. Dating back to 27.10.2018 PR https://github.com/Microsoft/MixedRealityToolkit-Unity/commit/7eca8c5e668f4abc2162e28bfdfed051fd2a6cb6 still works. The issue occurs with: https://github.com/Microsoft/MixedRealityToolkit-Unity/commit/5d2f3064448941de761fa5fd3c326e8cdd1cd98f Maybe the Microsoft.MixedReality.Toolkit.Core.Utilities.Editor.Setup.dll? Is there somewhere the source of this dll to link to?

StephenHodgson commented 5 years ago

Hmm that's odd. It's just an editor dll. Shouldn't get into the build at all.

wassx commented 5 years ago

I removed the dll (see attached patch for latest mrtk_dev at commit https://github.com/Microsoft/MixedRealityToolkit-Unity/commit/49f5c4c22b66a7e2c212f15b982056dcb31ff4cd) and now it builds and runs without these sharedassets exceptions. Removal_of_editor_setup_dll.zip

StephenHodgson commented 5 years ago

@wassx the source code can be found here

It's still in the folder with the dll, but it's been hidden by the editor with a period. Just delete the dll and rename the file without the prefixed period and it'll show back up.

Not sure that's the source of the problems tho, as it only changes the project settings and should never make its way into a final build.

StephenHodgson commented 5 years ago

@wassx were you also using a headless build process for linux?

wassx commented 5 years ago

@StephenHodgson Hi sorry for late reply, notifications didn't went through. Yes, always started a headless linux.

StephenHodgson commented 5 years ago

Okay, then this is def related to #3192

david-c-kline commented 5 years ago

This is likely fixed as we no longer use a precompiled editor setup dll