Editor crashes due to uncompilable C++

Branch: Binary

Build Version: 4.02 - 2034640

Description

This question (https://answers.unrealengine.com/questions/23973/project-just-started-crashing.html) makes me think that what I’m seeing is intentional, so perhaps this is a feature request, but I was frustrated for a few moments so I figured it was worth reporting.

If I write some breaking C++ in, say, a constructor and recompile in the editor, it will crash before compilation finishes. If I attempt to open the editor via the .uproject file, it will fail silently. Reopening the editor prompts me to send a report to Apple.

Removing the offending code fixes the issue, and the offending code can be found by running the editor from XCode instead of launching from the .uproject file.

This may not be feasible (I don’t understand the engine code nor C++ enough to stay myself), but ideally the editor would open and report the error / fail to compile instead of crashing.

Steps to reproduce:

  1. Write some breaking C++; e.g.:

    ABall::ABall(const class FPostConstructInitializeProperties& PCIP) : Super(PCIP) {
    TArray<UStaticMeshComponent*> components;
    this->GetComponents(components);
    if (components[0] != NULL){ … }
    }

  2. Recompile from within the editor / launch the editor from the .uproject file

  3. It should crash / fail to open

System Specs: Macbook Pro 2.6Ghz i7, 16GB RAM, NVIDIA GeForce GT 750M 2048 MB, OS X 10.9.2

[2014.04.17-00.24.47:286][  0]UdpMessaging: Initializing bridge on interface 0.0.0.0:0 to multicast group 230.0.0.1:6666.
/Users/Shared/UnrealEngine/4.0/Engine/Source/Runtime/Core/Public/Containers/Array.h(518): Assertion failed: (Index >= 0) & (Index < ArrayNum)
Array index out of bounds: 0 from an array of size 0

.crash file: Uploading this file failed; apparently the .crash filetype is not allowed.

Hello,
Thank you for your report. We were not able to investigate this on the engine version you reported, but there have been many version changes to UE4 since this question was first posted. With a new version of the Engine comes new fixes and it is possible that this issue has changed or may no longer occur. Due to timetable of when this issue was first posted, we are marking this post as resolved for tracking purposes.
If you are still experiencing the issue you reported in the current engine version, then please respond to this message with additional information and we will investigate as soon as possible. If you are experiencing a similar, but different issue at this time, please submit a new report for it.
Thank you.

Apologies, I should have deleted this! I haven’t experienced this for a while now. Sorry!