Unreal app freezes at start in the cloud: the Development-build ensure dump (and how to fix it)

An Unreal app packaged as a Development build can freeze for good in its first seconds, and the viewer never gets a picture. The cause is not the failed ensure check itself, which shows up in starts that work too. It is what Unreal does next: it pauses the whole app to write a crash report with a memory dump. Usually that takes half a second. Now and then the dump never finishes, and the app stays frozen. This page explains how to recognise it in your own build, and the three ways to fix it, one of which is a single launch option.

In 30 seconds

1. What the viewer sees: the stream page loads, but no video arrives. The app is running, frozen, and nothing restarts it, so the viewer waits and leaves.

2. How often: it varies by app. In Eagle 3D Streaming's logs, an affected app froze in about 1 start in 6. Most starts still work, so a passed stream test does not rule it out.

3. Who is affected: only Development (and other non-Shipping) builds whose code or content makes an ensure fail during start-up, because that is what starts the dump. Shipping builds are not affected.

4. The fix: package a Shipping build, or fix the failing ensure, or start the app with -handleensurepercent=0. How

5. Your responsibility: the cause is inside the app, so only the app's owner can remove it. The viewers who meet the frozen start are your viewers.

The ensure is not the problem. The dump is.

The failed ensure appears in the log of nearly every start of an affected app, including every start that streams normally. On its own it does nothing. It only makes Unreal write a crash report with a memory dump. A start freezes when that dump never finishes: the log stops right there, and UEMinidump.dmp stays at 0 bytes.

Symptoms: the app starts, but the viewer never gets video

What it looks like from outside
  • The viewer sees the loading page, then nothing. No video, no error. Most viewers wait a minute or two and close the tab; some wait much longer.
  • The app has not crashed. Its process is still running on the streaming machine, so there is no crash to restart from. It simply stops doing anything in its first seconds.
  • It is random. The same app, the same version and the same link work for the next viewer. A reload usually works, because it starts the app again.
  • It does not follow a machine, a region or a graphics card. It follows the build.
  • The stream test passes. A test starts the app once or a few times. When most starts work, those few starts usually all pass.

Why it happens: ensure, crash report, minidump

In plain words

An ensure is a check written into Unreal's C++ code, in the engine and in your project: "this should be true here". If it is false, the app does not stop. It logs Ensure condition failed and carries on. In a Development build, Unreal also reports the first failure of each ensure, the way it reports a crash: it writes a crash report folder under Saved\Crashes, including a minidump (UEMinidump.dmp), a snapshot of the app's memory and threads.

To take that snapshot, Unreal pauses every thread of the app, writes the dump, and lets the threads run again. On a normal start this takes about half a second and nobody notices. Occasionally the dump never completes. Then the threads are never released: the app is alive, holds its memory, and does nothing. The dump file is left at 0 bytes, and the app's log stops right after the ensure.

A failed ensure in a Development build: normal start versus frozen start The app starts and loads its first level. An ensure fails; that is harmless and happens in good starts too, but it makes Unreal write a crash report. Unreal pauses every thread and writes a minidump. Usually the dump finishes in about half a second, the threads run again, the app connects to the stream and the viewer gets video. Sometimes the dump never finishes: the threads stay paused, the dump file stays at 0 bytes, the app never connects, and the viewer gets no video. App starts loads first level An ensure fails harmless, also in good starts Unreal pauses every thread writes UEMinidump.dmp the risky step usual sometimes Dump done in ~0.5 s threads run again, app connects viewer gets video Dump never finishes 0-byte dump, app frozen no video, viewer leaves
The same build, the same ensure, in every start. The ensure is not what freezes the app: starts that stream fine print it too. The dump is the step that can hang. Most starts go the upper way; once a start goes the lower way, the app does not recover by itself.

Why Shipping builds are safe: in a Shipping build, ensures are compiled out of the code by default. There is nothing to fail, nothing to report and no dump to write. (The exception is a project that switches checks back on in Shipping with bUseChecksInShipping.)

Why it is random: the ensure fails on almost every start, including the ones that stream normally. Every start that got past the dump streamed. Only the dump fails to finish, now and then. What makes one dump stall and the next one complete is not known; it is not tied to one engine version, machine or graphics driver. Seen with Unreal 5.3 and 5.8 builds alike.

How to check whether your build is exposed

Development or Shipping, and the log line

1. Is it a Development build?

  • Your stream test report has a Build type line: Development or Shipping.
  • Or look at the packaged files: a Shipping build's program is <Project>\Binaries\Win64\<Project>-Win64-Shipping.exe. A Development build's is <Project>\Binaries\Win64\<Project>.exe, with no -Shipping in the name.

If it is Shipping, this page does not apply to you.

2. Does an ensure fail at start?

Run the packaged Development build on your own PC, let it reach the first level, and close it. Open its log, <Project>\Saved\Logs\<Project>.log, and search for Ensure condition failed. A failed ensure looks like this (the condition, file and line are different for every ensure):

LogOutputDevice: Error: === Handled ensure: === LogOutputDevice: Error: Ensure condition failed: MyComponent != nullptr [File:...\MyGameMode.cpp] [Line: 42]

The File and Line tell you where the check is. A file in your own project's Source folder is your code. A file under Engine\Source is an engine check that your project's code or content made fail. One example seen in real projects: an Enhanced Input Scale modifier on an action whose value type is a boolean fails an ensure in InputModifiers.cpp.

The same ensures also show up in the editor's Output Log when you play in the editor, which is the easiest place to fix them.

3. Look in Saved\Crashes

Every reported ensure leaves a folder <Project>\Saved\Crashes\UECC-Windows-…. Open it:

What is in the folderWhat it means
UEMinidump.dmp of a few hundred KB or more, plus a copy of the log The ensure was reported and the dump finished. The app went on. Your build is exposed: the same step can stall on another start.
UEMinidump.dmp of 0 bytes, no log copy The dump never finished: that start froze. This is the problem on this page.
No UECC-Windows-… folders at all No ensure was reported (or the build is Shipping). Not exposed to this problem.

A few starts on your own PC may not show the 0-byte case. The first row is enough to know you are exposed.

How to fix it

Three ways, best first
FixWhat you doWhy it worksSide effect
1. Package a Shipping build (best for viewers) In Unreal: Platforms > Windows > Binary Configuration > Shipping, then Package Project; upload the new build. Ensures are compiled out. Nothing is reported, no dump is written. Shipping writes no log by default. To keep one, see logs in a Shipping build. The build is also smaller and starts faster.
2. Fix the failing ensure (best for your project) Find it with the log line above, fix the code or content, package and upload again. The check no longer fails, so there is nothing to report. None. It also removes whatever real problem the ensure was warning about.
3. Add -handleensurepercent=0 (quickest) Add it to the app's launch parameters (below). No new upload. Unreal skips ensure handling completely: no report, no dump, so no freeze. Failed ensures no longer appear in the log or in Saved\Crashes. The underlying problem is still there, only hidden.

Adding -handleensurepercent=0 on Eagle 3D Streaming

  1. In the Control Panel, open the configuration your stream link uses and go to its Developer tab.
  2. In Parameters To Pass To App, add -handleensurepercent=0. If the field already holds parameters, add it at the end, separated by a space.
  3. Save. The next viewer's session starts the app with it. Nothing has to be uploaded again.

If your stream links carry their own parameters (?exeLaunchArgs=) and Append Parameters To URL is off, the link's parameters replace the field. Then add -handleensurepercent=0 to the link as well. Both places are explained on command-line parameters.

To try it on your own PC first, start the packaged build from a command line with the same option: MyProject.exe -handleensurepercent=0. The log then has no Handled ensure lines, and no new UECC-Windows-… folder appears.

On the Eagle 3D Streaming side: a change that starts Development builds with this option automatically is being rolled out. Adding it yourself does no harm before or after that, and it does nothing to a Shipping build.

Questions

Development builds, ensures and frozen starts

Is my app crashing?

No. A crash ends the process, and a crash on start can be retried. Here the process keeps running, frozen, so to everything outside it looks like an app that is still loading.

Why did my stream test pass if my app has this problem?

The test starts the app once, or a few times. Most starts of an affected app work, so a test usually passes, and the freeze shows up with real viewers over time.

Is the failed ensure what freezes the app?

No. The same ensure is printed in starts that stream normally. It only triggers Unreal's crash report. The app freezes when the dump for that report never finishes: the log stops there and UEMinidump.dmp stays at 0 bytes. Fixing the ensure helps because without it no dump is written at all.

Why does reloading the page work?

A reload starts the app again. The next start almost always gets through the same ensure in half a second.

Is it a problem with the streaming machine or the graphics driver?

No. It follows the build: the same Development build freezes now and then on any machine, and a Shipping build of the same project does not.

Is -handleensurepercent=0 safe to use?

It only changes what Unreal does after an ensure fails: nothing instead of a report. Real crashes are still crashes, and a Shipping build ignores it. The price is visibility: you no longer see failed ensures in that app's log, so fix them in your project when you can.

Should I stream a Development build at all?

For viewers, a Shipping build is the better choice: smaller, faster to start and without this risk. Keep Development builds for testing, where their logs and reports are useful.

Need help?

If viewers report a stream that never shows a picture and you are not sure this is the cause, write to support@eagle3dstreaming.com with the app name and the time it happened.

Related

Last updated