Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Missing Include of ESlErrorCode Class (from Core/StereolabsBaseTypes.h) in two header files preventing development packaging on UE 5.4 #47

Open
2 tasks done
ND-SUPERBIEN opened this issue Dec 20, 2024 · 2 comments

Comments

@ND-SUPERBIEN
Copy link

ND-SUPERBIEN commented Dec 20, 2024

Preliminary Checks

  • This issue is not a duplicate. Before opening a new issue, please search existing issues.
  • This issue is not a question, feature request, or anything other than a bug report directly related to this project.

Description

Hello StereoLabs Devs,

I am currently working with the ZED Plugin in Unreal Engine 5.4.

When trying to package my project with the Development configuration, I noticed some errors linked to some source files of the ZED Plugin preventing the packaging to succeed. To be sure that it wasn't something in my project, I reproduced the steps on a fresh clone from the main branch of this repo, and I still had the error.

Here is the complete build log : UBA-ZEDSamples-Win64-Development.txt

The errors I identified were the following ones:

[29/63] Compile [x64] StereolabsAIDetectionRunnable.cpp
C:\Users\[...]\zed-UE5-main\Plugins\Stereolabs\Source\Stereolabs\Private\Threading\StereolabsAIDetectionRunnable.h(20): error C2061: syntax error: identifier 'ESlErrorCode'
[36/63] Compile [x64] StereolabsMeasureRunnable.cpp
C:\Users\[...]\zed-UE5-main\Plugins\Stereolabs\Source\Stereolabs\Private\Threading\StereolabsMeasureRunnable.h(105): error C2061: syntax error: identifier 'ESlErrorCode'

After investigating the errors, I looked in two header files (Plugins/Stereolabs/Source/Stereolabs/Private/Threading/StereolabsMeasureRunnable.h) and (Plugins/Stereolabs/Source/Stereolabs/Private/Threading/StereolabsAIDetectionRunnable.h).

From my understanding, the class ESlErrorCode is used but apparently not included.

With some help from my IDE's suggestions, I found the declaration of this class in Plugins/Stereolabs/Source/Stereolabs/Public/Core/StereolabsBaseTypes.h, and including this header file in StereolabsMeasureRunnable.h and StereolabsAIDetectionRunnable.h solved the issue (the build when packaging the project succeeds)

I thought it was weird because these errors do not happen when simply building the Editor, only when packaging the project.
I am using the body tracking examples which are working perfectly fine when building the editor.

I did look into previous issues and found this one (#41), that then led me to this forum post where an issue in these files was already discussed. Unfortunately, user KenTYLeung ended up successfully build their project without indicating what fixes they had applied.

My final conclusion is that I don't exactly know where this bug is coming from, and adding the includes fixed it for me. However, I have very limited knowledge of the ZED Plugin code base, so I am not sure that this fix should be merged into main at some point, maybe something else is causing this.

Steps to Reproduce

  1. Clone the main branch of the repo
  2. Generate solution files, build the solution (Development Editor) (no errors at this point)
  3. When UE opens up, package the project for Windows with the Development Binary Configuration
  4. The errors I mentioned above happen
  5. The build fails

Expected Result

The build should succeed when packaging the project

Actual Result

The build fails (see my comment above for details)

ZED Camera model

ZED2i

Environment

OS: Windows 10 - Version 21H2
CPU: AMD Ryzen 9 5900X 12-Core Processor 3.70 GHz
GPU: NVIDIA GeForce RTX 3090
RAM: 64Gb
UE Version: Unreal Engine 5.4.4 (5.4.4-35576357+++UE5+Release-5.4)
IDE: JetBrains Rider

Anything else?

No response

@Bvallon-sl
Copy link
Collaborator

Well done! it's quite a tricky bug.

I'll test it today and push an update to the plugin if it fixes the issue on my side as well.
Thanks again for sharing.

@ND-SUPERBIEN
Copy link
Author

Happy to contribute!
Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

2 participants