[crash] Editor suddenly closes without showing the crash report client

We are on Master at commit fe60b0ac602954d480497424cc1cbf0752d9aae5
(Yes I am aware of the implications of working with the master branch :wink: )

Been experiencing sudden crashes of the editor, randomly and rare.
It simply disappears and no crash report client is shown.

The project did log some TArray being out of bounds. The Engine log was not written at all during this session.
Anyhow I think in any case the Crash Report Client should show up for collection info and logs and such - but it did not;

Edit: I tracked it down further to an TArray> that I was filtering by .DeleteAll(Lambda(filter condition)) and after that I run a .Sort() with a sort condition.

That is what’s causing the out of bounds exception! :smiley:

==> running .Sort() on an empty array makes the editor disappear without showing a crash report client.

Thanks for your assistance. :slight_smile:

link text

Hey -

Do you have the same crash occur in 4.10.2 or 4.11 Preview 3? I’ve tried creating a new array and calling .Sort() without adding anything to the array which did not cause a crash. Can you also explain how you’re using the DeleteAll or the Lambda that you mentioned? I cannot find either option in relation to TArray in code.


Hi ,

I do not have 4.10.2 nor 4.11-p3 installed at the moment as we do most work in master at the moment (we like early access :wink: ). Cross merges of our core changes take too much time so we try to avoid them where possible until we reach a stable version as well.

as for the usage of DeleteAll() and Sort() I hope this excerpt from our code is sufficient for you.

TArray<TTuple<float, ScanLineResult>> sizes;

				sizes.Add(TTuple<float, ScanLineResult>( P1size, SLR1 ));
				sizes.Add(TTuple<float, ScanLineResult>( P2size, SLR2 ));
				sizes.Add(TTuple<float, ScanLineResult>( P3size, SLR3 ));
				sizes.Add(TTuple<float, ScanLineResult>( P4size, SLR4 ));

				sizes.RemoveAll([=](TTuple<float, ScanLineResult> tuple)
					if (lhs.IsPerpendicularTo(rhs))
						return (tuple.Get<1>().A == TIP && tuple.Get<1>().B == TIP) ||
							    tuple.Get<0>() > distance2;
						return tuple.Get<1>().A != TIP ||
							   tuple.Get<1>().B != TIP ||
							   tuple.Get<0>() > distance2;

				if (sizes.Num() > 0)
					sizes.Sort([](TTuple<float, ScanLineResult> a, TTuple<float, ScanLineResult> b) {return a.Get<0>() <= b.Get<0>(); });

					float shortestDistance = sizes[0].Get<0>();
					ScanLineResult result = sizes[0].Get<1>();

					GCPP = FGeneralClosestPointPair(result.Location_A, result.Location_B);

What’s weird is that in sorting.h, line 72

template<class T, class PREDICATE_CLASS> 
void SortInternal( T* First, const int32 Num, const PREDICATE_CLASS& Predicate )

it actually is coded to short-circuit, if the number of items in the array is less than 2 o.O

Hey -

I do not see DeleteAll() in the code excerpt, are you referring to RemoveAll() instead? I’m also confused by what you mean when you say that merges of your core changes take too long and try to avoid them. This seems counter to the nature of the master branch which is always in flux due to constant changes being merged into the branch and it is likely to be unstable. As such, we are unable to provide a suitable level of support for this branch since newer changes may negate a previous fix. If you’re able to reproduce this crash in the release branch (4.10.2) we can investigate where this is occurring. Alternatively, if you are using master branch you can try to update to the latest version of master to see if the issue has already been addressed there.


Hi ,

We have not heard back from you in a few days, so we are marking this post as Resolved for tracking purposes. If you are still experiencing the issue you reported, please respond to this message with additional information and we will offer further assistance.

Thank you.