doughtmw / ArUcoDetectionHoloLens-Unity

ArUco marker tracking on the HoloLens, implemented in Unity.
MIT License
105 stars 26 forks source link

Build tool updates and NullreferenceExceptions #31

Open patrickmemestar opened 3 years ago

patrickmemestar commented 3 years ago

hello and thank you for reading. in this issue i'll walk through my process and why i cant seem to run this project. I'm unable to reproduce my initial issue. so at the end i try to recount that as best i can. if anyone has Hints and or steps i can use please notify me!

I'm using:

I am not doing the optional building the project from source steps.

my exact steps:

i have done camera calibration before to do some native ArUco tracking. these are my HoloLens2 values: image

Running an example

from here there are no exact steps for running the scenes and i use the general setup guide from the MRTK tutorials https://docs.microsoft.com/en-us/windows/mixed-reality/develop/unity/tutorials/mr-learning-base-02

step 1: adding the project in unity Hub i simply navigate to the project folder and select C:\UNITYPROJECTS\ubiquitous_computing\ArUcoDetectionHoloLens-Unity\ArUcoDetectionHoloLensUnity

step 2: update and open image the used unity version is a bit outdated. here i switch it to a slightly newer 2019 LTS version normally. in this trail run i'm trying the 2020 LTS version image

this looks like a mistake as it results in various errors image

i'll retry using the 2019.4.20f1 LTS version image this time i'll attach the updrade.log file No errors this time! Packages-Update.log i realise now that this might explain later errors.

step 3: building the unity project

Issues and how i handle them

issue 1 the built UWP project .sln when opened in VS2019 is not loaded

C:\UNITYPROJECTS\ubiquitous_computing\ArUcoDetectionHoloLens-Unity\ArUcoDetectionHoloLensUnity\build\ArUcoDetectionHoloLensUnity\ArUcoDetectionHoloLensUnity.vcxproj : error  : The application for the project is not installed.

here i choose to reload with dependencies image which causes an error

C:\UNITYPROJECTS\ubiquitous_computing\ArUcoDetectionHoloLens-Unity\ArUcoDetectionHoloLensUnity\build\ArUcoDetectionHoloLensUnity\ArUcoDetectionHoloLensUnity.vcxproj : error  : Cannot load project with duplicated project items: C:\UNITYPROJECTS\ubiquitous_computing\ArUcoDetectionHoloLens-Unity\ArUcoDetectionHoloLensUnity\build\ArUcoDetectionHoloLensUnity\opencv_world3411.dll is included as 'None' and as 'None' item types. 

this isn't my original issue but it seems I've failed to reproduce it. Still an issue non the less.

Thank you to any who could help me with this issue!

[edit] description of earlier issues. from memory and older pictures! only usefull as context!!

I used to be able to reload the project. When i would try to build and deploy VS19 would warn me my build tools were outdated and MUST be updated. Doing so resulted in a warning when building (luckily isaved an image of this) image

i tried to see what happens when i ignore this warning. image

this resulted in an architecture mismatch image i think i navigated to the opencv submodule and copied the ARM dll and winmd but cannot be sure.

eventually i could deploy the example but it threw a NullReference exception. I am looking forward to any kind of input you could give me.

pureYioYi commented 2 years ago

Hello, @patrickmemestar, I meet the same error with you. There is an error in my case because the config is set with "Release" and "ARM", and I turn them to "Release" and "ARM64" to solve this error.