Hi! After the little adjustments needed to migrate my project to 5.4 I finally managed to have everything functioning perfectly in editor and packaging without issues. A problem though arises the moment I launch my packaged build. A map gets loaded and immediately after the game crashes. This is what I get from the crash report:
Packaging in DebugGame yields the same result, and I canāt get any more useful info. Even by using VS and āattaching to a processā to the running game I donāt get any reference to the game code. I also tried to disable āUse Pak Fileā in the packaging options as what crashes seems related to a function that reads the Paks : FPakAsyncReadFileHandle::ReadRequest() ā but I get the same exact crash.
Any help would be greatly appreciated, even in just how could I simply proceed to debug this!
Took a week, but found the issue. Turns out that thereās been some significant upgrade to Metahumans ā the Metahumans I have in my project are now considered ālegacyā and need to be re-exported from the Metahuman editor. Loading a map with the updated metahuman doesnāt indeed cause that crash anymore.
It seems like youāre looking for a transition guide to C++ version 5.4, but C++ versions arenāt typically numbered in that way. C++ versions are usually denoted by the year of their release (e.g., C++98, C++11, C++14, C++17, C++20, and the upcoming C++23). If youāre referring to a compiler (such as GCC 5.4) or a specific framework or library version, I can help with that as well.
Migration is driving me crazyā¦ While trying to solve another engine bug in 5.3, I just checked the migration to 5.4 again. Just like before, I resolved all issues related to the migration from 5.3 to 5.4, except for the one mentioned above. This time, the migration was successful without any changes from my end.
Resolved this. I was including asio, a header-only library which itself includes windows.h, without properly wrapping Unrealās windows platform type enable/disable code around it.
I had got confused between windows header inclusion and temp-reenabling-windows-platform-types. I think this lead to a situation where a windows.h inclusion without the wrapper or allow/hide includes got through to unreal C++ code, causing platform types to conflict in name with unreal types.
Windows header inclusion in unreal:
#include "Windows/WindowsHWrapper.h"
Wrapping a header which needs to use Windows platform types (which I had missed):
This issue is driving me crazy. Iāve run into this compilation error again. I spent a lot of time realizing that itās the same issue as before, and even more time trying to fix it once again. The funny thing is, Iāve spent months creating functionality, adding many complex classes, and everything worked fine. But today, I added a simple UObject class with a basic struct, and suddenly, this error is back.
It seems that the order of inclusions has changed, and once again, Iām hitting the GetObjectW problemā¦
I havenāt been able to find a proper solution to fix it. I donāt use any third-party libraries that might include windows.h, so I canāt blame that. But as I donāt currently have plans to migrate further, I decided to create a small, admittedly dumb, fix directly in the source code.
In ImplicitObject.h I created a duplicate of the GetObject method and renamed it GetObjectFu...gFix.
Then, I used this new method in all three places of UnwrapImplicit. And just like that, the problem disappeared. =\