I’ve recently upgraded from UE4.27 to UE5, but I’m stumbling out of the gate as far as packaging a project goes. I’m able to create a default Third Person Blueprint project and package it for Windows, and when I open the packaged .exe file, it plays just fine. But when I do the exact same thing with a default Third Person C++ project, it packages, but then when I try to open the .exe file, all I get is a black screen. After a few seconds, I get an error message that the program has stopped running.
I’m completely stumped on this one. It’s a default project. I have changed literally nothing on it, and it won’t package. Has anyone else been having this problem with C++ projects in UE5? Any ideas what could be causing this? I’ve been working on a C++ UE4 project for a year now and would like to switch it over to UE5, but if I can’t get anything packaged and working there, that’s obviously a deal breaker!
I’ve just created a third person C++ project, I can confirm the same black screen and this error
Here are the details of my crash if anyone is interested, default settings.
Summary
Assertion failed: Index != INDEX_NONE [File:D:\build++UE5\Sync\Engine\Source\Runtime\Engine\Public\Animation\AttributeTypes.h] [Line: 117]
Missing operator for attribute, type IntegerAnimationAttribute was not registered previously
When I got the notification that UE5 was full release, like you I tried to install it, get it working, make a simple template project, and build [crashes UE5] and so workaround Package a Win project, which has an identical error for the same thing, on the same line as yours.
I think someone accidentally made a typo/hard coded reference to something that is meant to be a variable path, going to have to wait till they fix it and update UE5 core files, as it happens on 3rdP or TopD, probably anything at the moment
Yeah, it appears to be something template-specific. I tried packaging a First Person C++ project and it worked just fine. I then tried the Third Person Blueprint template again, but this time added some custom C++ classes. It packaged and played without issue. So it seems to only be certain C++ templates that are not working. Maybe something screwy in how they coded the example Character, I guess? In the meantime, I guess the workaround is to start with a Blueprint project and then add C++ classes to it.
I’m wondering, has anyone been able to successfully play a packaged UE5 Third Person or Top-Down C++ project?
I can’t exactly pinpoint why this is crashing the game, though it’s just sketchy overall. I don’t see why it’s a good idea to hard reference the character’s folder location, and I can envision how this could end up trying to read from an empty reference. So, I commented this section out and used my own custom Game Mode instead. After that, the default C++ Third Person template packaged and played flawlessly. So, until (and if) Epic fixes this, that appears to be one simple way of getting your game to work if you’re experiencing this problem.
**sorry about deleting the previous post; I’m still learning how to use the forum!
You can just use the edit button (the pencil), you don’t need to delete the post and rewrite it!
If you need a guide on how to use the Forum @discobot has two nice interactive tutorials that explain every functionality, just send “him” a message
Oh cool, thanks! I will definitely need to spend some time with @discobot !
I’m not entirely happy with that hacky fix, to be honest. Looking back at my older UE4 projects, they have the exact same line of code in their Game Mode .cpp files (though the file path is slightly different), yet they work just fine. So, while getting rid of it does get the game working, I don’t understand why it’s necessary to do that… which makes me think there’s some other issue lurking out there, maybe in how things are being constructed? Not sure. But this works for now, at least!
99% certain it’s a typo in the Source Code of UE5, I’ve been trying for a week or so with this typo now, I didn’t think to replace the GameMode.
I was going to replace the GameInstance, guess I should replace GameMode too instead of waiting for a response to the BugReport.
It looks like someone tried to do a string concatenation, but left it inside the " " [build++UE5] so it didn’t resolve, but it’s still weird it hard reference points to D:\ that is certainly not a valid call, so it’s either hard referenced there, or inside the Global definitions of Path/GetPath responses.
I don’t want to think someone made a Global definition of Path/GetPath, but it’s possible, guess we need to get onto the UE Discord and ask if anyone did some sleuthing into the Public GitHUB for UE5 to find the error on line 117