Download

Is engine crash while compiling c++ code a common thing ?

I recently decided to convert my entire blueprints i created for my game into c++ for the performance boost . It was all well and good but there were many scenarios which cause the engine to crash after compiling . For example , when i simply declare an ENUM in the header file and compile the project , Visual studio doesnt give any error or warnings and compiles . Afterwards , there is a “compiling game” progress bar which gets stuck exactly at 19% and after around 10 seconds or so the engine crashes leaving me to restart it again .

Below is the enum code which caused the crash everytime . It feels wierd since i dont know what went wrong . Taking it away and compiling gives no issues .


UENUM(BlueprintType)		//"BlueprintType" is essential to include
enum class EVictoryEnum : uint8
{
        VE_Dance 	UMETA(DisplayName="Dance"),
        VE_Rain 	UMETA(DisplayName="Rain"),
	VE_Song	UMETA(DisplayName="Song")
};

There were also other cases which caused engine crash but maybe those might be nullpointer problems on my part . Is engine crash really common when developing using c++ ?

For what it’s worth I have frequent crashes. When it does occur I tend to delete the contents in the Binaries folder, in Windows Explorer right click the UE4 project and Generate the Visual Studio Project Files, then open Visual Studio and clean the project, then rebuild. Truthfully none of it may be helping but at least I feel like I did something :smiley:

Yes, I have numerous crashes throughout the day. . .and is a little disappointing to say the least.

I guess il try that just in case . It really is a huge pain with the frequent cycle of crashing and restarting because of one line of code . Working with blueprints was fantastic though . Never had any complaints and the speed to which i can prototype huge features is marvelous . I had hoped its c++ counterpart lived up to its efficiency .

Sadly, when you work with C++ on unreal engine there will always be crashes… I get countless ones a day. I guess we have to live with it ;_;

What happens when you recompile from Visual Studio and close the editor in the mean time (e.g, by hitting the relaunch button?)

I work with C++ in the engine everyday and can’t recall ever crashing by recompiling.

Sadly I’ve been seeing this message almost every time I make a change to my project:

Crash.jpg

Since witnessing Constructors being called numerous times, up to five or six times for one class, I stopped placing anything in them as a matter of policy.

Could it be that you are hot reloading and relaunching the editor? If you do that make sure to just compile from VS again, if not you will load the hot reload dlls that are not valid anymore.

So building the project in vs while the editor is closed ?

I’m not sure what you mean . I get the part about hot reloading but does the editor automatically “relaunch” ? Does it normally relaunch itself immediately after hot reload ? I’m still a noob in UE4 as you can see :confused: . I do have to relaunch the editor again after the crash though .

Please no double posts or bumping before you reached 4 days without an answer (: You can always use the EDIT POST button at your last post to add information.

Hello Moss.

Normally I have both VS and the UE4 Editor open at the same time, and I typically compile from VS. Should I instead compile from the UE4? I’ll give it a try and see what happens.

When compiling from VS I typically right-mouse my VS Project and select Build. Is this the expected workflow? Sometime I also Clean, then Build at the VS Project level. Is this okay?

I also try to keep only one window open in UE4 in effort to minimize the crash.

Finally, I’m using Windows 10 with VS2013 Community Edition.

1 Like

Hello Jerry,

I assume you’re currently using 4.8.3? If this is correct, that would be the reason that you’re being told that the crash reporter is not able to find minidump files. 4.8 has no native support for Windows 10 and this is one of the many issues that have been reported. You should be able to get accurate crash reports in 4.9 as this seems to be fixed according to user reports, although 4.9 does not feature full Windows 10 support as of yet.

As for the hot reload issues, regardless of OS, we did have multiple issues with hot reload in 4.8 that have been fixed with 4.9. Could all of you that are having issues try 4.9 Preview 2 (Please make a copy of your projects for this, as you should never convert an original project to a new version, especially with a preview) to see if these hot reload crashes persist? If so, I’d be interested in trying to get a set a reproduction steps down so that I can report this in our database.

Matthew, I’m experiencing two problems but don’t know if they are related or not.

After installing the 4.9 Preview 2 release, and making a copy of my project I can no longer open my UE4 project by double clicking on it in Windows Explorer. I get the cannot build message, and to try and build the project manually. The build in Visual Studio 2013 does work. But I still cannot open the UE4 project from Windows Explorer.

I decided since the build worked in VS I would run the project via F5 (debug). Unfortunately I get the following error:

919f77d555d48d000f26e56fe3889aef1849cea0.jpeg

It appears to be a path error. From the screenshot it appears as though 4.9\Engine\Intermediate\Build\Unused is invalid. Are there any steps I can take to fix this?

Thank you,
Jerry

Hi Jerry,

This seems to be an unrelated issue but I would like to pursue it. Can you make an answerhub post about this issue in the Installation & Setup section and post the link to that answerhub post here? You can feel free to link this forum post in that post as well.

Okay, Matthew, as requested I posted the issue on AnswerHub in the Installation & Setup section:
https://answers.unrealengine.com/questions/279251/49-preview-2-windows-10-launch-problem.html

Once we can resolve the launch issue I’ll continue testing 4.9 Release 2 with my project and provide an update here.

Thanks again,
Jerry