This is a follow up to this thread, which is closed.
Hi. I'm trying to track Aruco markers. I have it working and can get the headset to identify a marker, but I'm getting the following errors every tick:
@aheaney, just following up on this. I tried to make the change to the plugin that you suggested on the previous thread now my project will not recompile.
Even more strange: now when a open a NEW project and use a NEW 1.8 UE plugin, it won't recompile. I first get this message, which is normal:
Sorry for the slow reply. Just to confirm, I was able to reproduce the error that you mentioned in your first post. I believe that what's happening is when you start/stop the VR preview in the UE editor, the marker detector instance is not destroyed properly. You won't see these errors when press the play button for the first time after restarting the UE editor. Also, you won't see these errors when you build and run natively on your ML2 or build for Windows and run your application remotely outside of the UE editor.
As for being unable to compile the plugins, if you made code changes, then I would suspect a build break. If you compile in visual studio, you'll probably see compile errors in the build log. You could quickly confirm this by just deleting (or moving) the ML plugin source out of your UE project or editor build. Then copy-paste a fresh copy of the source from the UE Plugin package directory that's created when you download the package from ML hub.
Hm, okey also just to confirm, are you using the binary distribution of UE 5.4.4 you can download from the Epic game launcher? Previously, I had tested using my own engine build from the ML-specific UE 5.4 branch.
I just verified that I can open a project using public UE 5.4.4 binaries and build it with the v1.8 plugin source. I don't know that UE gives you logs when you build plugin source when opening a project using the launcher. If you open the project in visual studio and build, then you should be able to see any compile errors when you build. You may want to try building in VS without plugin source first just to make sure that you can build the project that way.
You can generate VS project files without having to open the project in the UE editor by right-clicking on the project file in windows explorer and then Generate VS project files. That should give you a .sln file that you can open in visual studio-
@aheaney, so this is strange. I tried to make a blank C++ project and got an error:
Running D:/UE/Engines/UE_5.4/Engine/Build/BatchFiles/Build.bat Development Win64 -Project="D:/UE/Projects/ML_C_Plus2/ML_C_Plus2.uproject" -TargetType=Editor -Progress -NoEngineChanges -NoHotReloadFromIDE
Using bundled DotNet SDK version: 6.0.302
Running UnrealBuildTool: dotnet "..\..\Engine\Binaries\DotNET\UnrealBuildTool\UnrealBuildTool.dll" Development Win64 -Project="D:/UE/Projects/ML_C_Plus2/ML_C_Plus2.uproject" -TargetType=Editor -Progress -NoEngineChanges -NoHotReloadFromIDE
Log file: C:\Users\ch729d\AppData\Local\UnrealBuildTool\Log.txt
Available x64 toolchains (1):
* C:\Program Files\Microsoft Visual Studio\2022\Professional\VC\Tools\MSVC\14.42.34433
(Family=14.42.34433, FamilyRank=5, Version=14.42.34435, Is64Bit=True, ReleaseChannel=Latest, Architecture=x64)
Visual Studio 2022 compiler version 14.42.34435 is not a preferred version. Please use the latest preferred version 14.38.33130
Available x64 toolchains (1):
* C:\Program Files\Microsoft Visual Studio\2022\Professional\VC\Tools\MSVC\14.42.34433
(Family=14.42.34433, FamilyRank=5, Version=14.42.34435, Is64Bit=True, ReleaseChannel=Latest, Architecture=x64)
Visual Studio 2022 compiler version 14.42.34435 is not a preferred version. Please use the latest preferred version 14.38.33130
Creating makefile for ML_C_Plus2Editor (no existing makefile)
Available x64 toolchains (1):
* C:\Program Files\Microsoft Visual Studio\2022\Professional\VC\Tools\MSVC\14.42.34433
(Family=14.42.34433, FamilyRank=5, Version=14.42.34435, Is64Bit=True, ReleaseChannel=Latest, Architecture=x64)
Visual Studio 2022 compiler version 14.42.34435 is not a preferred version. Please use the latest preferred version 14.38.33130
Available x64 toolchains (1):
* C:\Program Files\Microsoft Visual Studio\2022\Professional\VC\Tools\MSVC\14.42.34433
(Family=14.42.34433, FamilyRank=5, Version=14.42.34435, Is64Bit=True, ReleaseChannel=Latest, Architecture=x64)
Visual Studio 2022 compiler version 14.42.34435 is not a preferred version. Please use the latest preferred version 14.38.33130
@progress push 5%
Parsing headers for ML_C_Plus2Editor
Running Internal UnrealHeaderTool D:\UE\Projects\ML_C_Plus2\ML_C_Plus2.uproject D:\UE\Projects\ML_C_Plus2\Intermediate\Build\Win64\ML_C_Plus2Editor\Development\ML_C_Plus2Editor.uhtmanifest -WarningsAsErrors -installed
Total of 0 written
Reflection code generated for ML_C_Plus2Editor in 0.9873836 seconds
@progress pop
Building ML_C_Plus2Editor...
Using Visual Studio 2022 14.42.34435 toolchain (C:\Program Files\Microsoft Visual Studio\2022\Professional\VC\Tools\MSVC\14.42.34433) and Windows 10.0.19041.0 SDK (C:\Program Files (x86)\Windows Kits\10).
Warning: Visual Studio 2022 compiler is not a preferred version
Determining max actions to execute in parallel (16 physical cores, 24 logical cores)
Executing up to 16 processes, one per physical core
Using Parallel executor to run 6 action(s)
------ Building 6 action(s) started ------
[1/6] Resource Default.rc2
[2/6] Compile [x64] SharedPCH.UnrealEd.Project.ValApi.Cpp20.cpp
D:\UE\Engines\UE_5.4\Engine\Source\Runtime\Core\Public\Experimental\ConcurrentLinearAllocator.h(31): error C4668: '__has_feature' is not defined as a preprocessor macro, replacing with '0' for '#if/#elif'
D:\UE\Engines\UE_5.4\Engine\Source\Runtime\Core\Public\Experimental\ConcurrentLinearAllocator.h(31): error C4067: unexpected tokens following preprocessor directive - expected a newline
D:\UE\Engines\UE_5.4\Engine\Source\Runtime\Engine\Classes\Engine\SkeletalMesh.h(930): warning C4996: 'FBoneMirrorInfo': FBoneMirrorInfo is deprecated. Please use UMirrorDataTable for mirroring support. Please update your code to the new API before upgrading to the next release, otherwise your project will no longer compile.
Total time in Parallel executor: 21.37 seconds
Total execution time: 26.06 seconds
This doesn't even have the ML plugin. This is just a blank UE project. Can you spot why this is not working?
I uninstalled and reinstalled UE 4.4.4 and am still getting the error. I'm going to try to repair VS and see if that works. Barring that, I'm going to uninstall and reinstall VS.
Yea sounds like something may be off with your toolchain. It did get as far as starting to compile cpp source code. There's a break in ConcurrentLinearAllocator.h. The errors C4668 and C4067 in a blank project suggest a misconfiguration in your Visual Studio setup. Unreal Engine 5.4 requires specific versions of the MSVC toolchain for compatibility. There are warnings in that log that indicate that Visual Studio 2022 compiler version 14.42.34435 is not preferred, and recommends using version 14.38.33130. If you’re generating project files manually (right-click > Generate Visual Studio project files), it should pick up a valid toolset automatically if it’s installed. Then, Double-check your Project Settings in Visual Studio and make sure the Platform Toolset matches the version.
To confirm, when I try building a project on my machine I see Using Visual Studio 2022 14.38.33143 toolchain (C:\Program Files\Microsoft Visual Studio\2022\Professional\VC\Tools\MSVC\14.38.33130) and Windows 10.0.22621.0 SDK (C:\Program Files (x86)\Windows Kits\10)
in the build output.
The best supported configuration for UE plugin 1.8 is still technically building the engine from source using the MagicLeap specific fork of the UE 5.4 source code. That's the configuration that we would validate with the plugin sdk internally. Practically though, you don't really need a custom engine build if you're only using ML remote rendering. The latest public build of UE 5.4 is probably your best bet if you're not building UE from source. You'll encounter problems if you attempt to build and package an app to run natively on your ML2 using the UE 5.4 store build, but it should work fine for remote render.
From the log, it looks like you need to use a different version of MSVC, but you might also want to go through the visual studio section of our getting started guide just to make sure that you have all required workloads.
Hmm. I'm familiar with that warning for the compiler version. It seems to come from having an updated version of VS, which is always just ahead of UE. I've never had any issues with it, and that was how it was set before when everything was working.
I'll try changing it and report back.
Before I do, here's what happened when I repair VS:
Something went wrong with the install.
You can troubleshoot the package failures by:
1. Search for solutions using the search URL below for each package failure
2. Modify your selections for the affected workloads or components and then retry the installation
3. Remove the product from your machine and then install again
If the issue has already been reported on the Developer Community, you can find solutions or workarounds there. If the issue has not been reported, we encourage you to create a new issue so that other developers will be able to find solutions or workarounds. You can create a new issue from within the Visual Studio Installer in the upper-right hand corner using the "Provide feedback" button.
================================================================================
Package 'UnrealEngineV1,version=1.3.93.0' failed to repair.
Search URL
https://aka.ms/VSSetupErrorReports?q=PackageId=UnrealEngineV1;PackageAction=Repair;ReturnCode=1603
Details
MSI: C:\ProgramData\Microsoft\VisualStudio\Packages\UnrealEngineV1,version=1.3.93.0\packages\UnrealEngineV1\EpicGameLauncher.msi, Properties: REBOOT=ReallySuppress INSTALLDIR="C:\Program Files (x86)\Epic Games" REINSTALL=ALL REINSTALLMODE="cmuse" IGNOREDEPENDENCIES=ALL
Return code: 1603
Return code details: Fatal error during installation.
Message Details: Epic Games Launcher is currently running and the Setup Wizard can not continue. Please close the Epic Games Launcher and run the Setup Wizard again.
Log
C:\Users\ch729d\AppData\Local\Temp\dd_setup_20250109105952_692_UnrealEngineV1.log
Impacted workloads
Game development with C++ (Microsoft.VisualStudio.Workload.NativeGame,version=17.12.35410.122,productarch=x64)
Impacted components
Unreal Engine installer (Component.Unreal,version=17.12.35410.122)
Hm, you might try reaching out on Unreal's forums since you don't seem to be able to build an empty UE project with your environment configuration.
Btw, here's a screenshot of the msvc tools versions that I have installed. (using vs pro 2022 v17.12.3) You may need to ensure that you have a particular compiler version. You could also try removing v14.42 of the tools, ensure 14.38 is installed, regenerate project files and then try. You can run the vs installer and click Modify to change the components that you have installed.
I've been working with Epic Games the past few days and I finally found the issue earlier today. Here's what happened:
Originally, I was on VS 17.11 with MSVC set to "Latest". While UE would put up a warning that this wasn't the preferred MSVC, everything still worked and would compile. It was close enough, I guess.
When I was troubleshooting the error from the ML plugin, I opened VS to make the code change to the ML plugin and, without thinking much of it, updated VS.
I've come to find out that this update is what broke everything. Doing so updated VS to 17.12.3, which the "Latest" MSVC is apparently was too far ahead and brakes UE 5.4's (and 5.5) ability to compile. This is what I missed. I mistakenly assumed it was the changes I had made to the plugin that had broke everything.
To make matters worse, when I reinstalled VS and set the settings, I accidentally set MSVC to VS 2022 C++ ARM build tools (v14.38-17.8), instead of VS 2022 C++ x64/x86 build tools (v14.38-17.8). A subtle difference but apparently a critical one.
Anyways, in the end, it was an incorrect MSVC that was the culprit. I selected VS 2022 C++ x64/x86 build tools (v14.38-17.8) and everything compiled, including the ML plugin.
I still need to go back and try that change the the plugin, mentioned in the other thread, but ran out of time.
Anyways, I'm up and running again. Thanks for your help with this.
On thing I have noticed is that "Activate" seems to activate the marker tracking, but "Deactivate" doesn't stop it. The only way I've found to stop tracking is to Unbind Event from the Result Delegate.
Is this expected? Is it inefficient to stop tracking this way? What is best practice for stopping and restarting marker tracking?
Hey @pon because the topic has gotten so long, do you mind creating a new topic and summarizing the repro steps, and the existing steps you took to troubleshoot? Just to make the issue easier for someone to understand if they weren't following the topic closely.