UE4SS-RE / RE-UE4SS

Injectable LUA scripting system, SDK generator, live property editor and other dumping utilities for UE4/5 games
http://docs.ue4ss.com/
MIT License
1.33k stars 176 forks source link

[BUG - Release] Game__Debug__Win64 does not successfully build #501

Open UE4SS opened 5 months ago

UE4SS commented 5 months ago

Describe the bug GenericPlatformMath.hpp @ L410: error C2760: syntax error: 'UE_DEBUG_SECTION' was unexpected here; expected '{'

To Reproduce Using my command line: xmake f --profilerFlavor=Tracy --cxxflags="-DSTATS=0" -m "Game__Debug__Win64" -y && xmake Untested with the default command line or VS, but I'd be surprised if the problem didn't exist with those.

Expected behavior The Game__Debug__Win64 target is expected to successfully build.

Desktop (please complete the following information):

UE4SS commented 5 months ago

I'm not sure how to properly fix this, but defining DO_ENSURE=0 bypasses the problem.

Buckminsterfullerene02 commented 5 months ago

Perhaps fix could be bundled into #494?

Edit: Build is successful on that branch already. I installed into DRG and it works 👍

UE4SS commented 5 months ago

Perhaps fix could be bundled into #494?

Edit: Build is successful on that branch already. I installed into DRG and it works 👍

Did you test #494 with the latest Unreal submodule ? I'm pretty sure this problem was caused by a recent PR: https://github.com/Re-UE4SS/UEPseudo/pull/87 and #494 is based on an older commit so I just want to confirm that you tested with the latest Unreal submodule.

Buckminsterfullerene02 commented 5 months ago

Perhaps fix could be bundled into #494? Edit: Build is successful on that branch already. I installed into DRG and it works 👍

Did you test #494 with the latest Unreal submodule ? I'm pretty sure this problem was caused by a recent PR: Re-UE4SS/UEPseudo#87 and #494 is based on an older commit so I just want to confirm that you tested with the latest Unreal submodule.

Okay I merged #494's UEPseudo branch in with main locally and the debug build does indeed fail. Did not notice that #494 is based off an older commit.

bitonality commented 5 months ago

Perhaps fix could be bundled into #494? Edit: Build is successful on that branch already. I installed into DRG and it works 👍

Did you test #494 with the latest Unreal submodule ? I'm pretty sure this problem was caused by a recent PR: Re-UE4SS/UEPseudo#87 and #494 is based on an older commit so I just want to confirm that you tested with the latest Unreal submodule.

Okay I merged #494's UEPseudo branch in with main locally and the debug build does indeed fail. Did not notice that #494 is based off an older commit.

I can try to update and see if the change is something easily bundle-able. Will know in a couple of hours

bitonality commented 5 months ago
#define UE_ENSURE_IMPL(Capture, Always, InExpression, ...) \
            (LIKELY(!!(InExpression)) || (DispatchCheckVerify<bool>([Capture] () FORCENOINLINE UE_DEBUG_SECTION \
            { \
                static bool bExecuted = false; \
                if ((!bExecuted || Always) && FPlatformMisc::IsEnsureAllowed()) \
                { \
                    bExecuted = true; \
                    FDebug::OptionallyLogFormattedEnsureMessageReturningFalse(true, #InExpression, __FILE__, __LINE__, ##__VA_ARGS__); \
                    if (!FPlatformMisc::IsDebuggerPresent()) \
                    { \
                        FPlatformMisc::PromptForRemoteDebugging(true); \
                        return false; \
                    } \
                    return true; \
                } \
                return false; \
            }) && ([] () { PLATFORM_BREAK(); } (), false)))

https://github.com/Re-UE4SS/UEPseudo/pull/87 introduced a breaking change whenever we compile in xxxDEBUGxxx mode due to a missing UE_DEBUG_SECTION def as well as unimplemented

FPlatformMisc:IsEnsureAllowed() FPlatformMisc:IsDebuggerPresent() FPlatformMisc::PromptForRemoteDebugging(bool)

I will not be making a fix in #494 since it's out of scope of that change.

bitonality commented 5 months ago

https://github.com/Re-UE4SS/UEPseudo/pull/91