Search in
Sort by:

Question Status:

Search help

  • Simple searches use one or more words. Separate the words with spaces (cat dog) to search cat,dog or both. Separate the words with plus signs (cat +dog) to search for items that may contain cat but must contain dog.
  • You can further refine your search on the search results page, where you can search by keywords, author, topic. These can be combined with each other. Examples
    • cat dog --matches anything with cat,dog or both
    • cat +dog --searches for cat +dog where dog is a mandatory term
    • cat -dog -- searches for cat excluding any result containing dog
    • [cats] —will restrict your search to results with topic named "cats"
    • [cats] [dogs] —will restrict your search to results with both topics, "cats", and "dogs"

Office Holiday

Epic Games' offices will be on holiday from June 22nd to July 7th. During this period support will be limited. Our offices will reopen on Monday, July 8th. 

[Bug] Demo Playback Problem

Hi! I've got a problem playing demos.

I've recorded a demo in the "Development" build configuration in a cooked/packaged version of my game. When I play this demo back with the console command, "demoplay test" it works fine. When I try to play it back using the UGameInstance::PlayReplay method, or using a faked console command via the APlayerController::ConsoleCommand method, it does not.

By works fine, I mean the map loads and stuff happens. As expected.

By not working fine, I mean the game freezes. Task manager shows it using 0% cpu and "not responding." I cannot tab into the game (it doesn't appear,) but it happily waits in the background if I minimize all other windows. All threads (debugged with VS) sit in FWinEvent::Wait, the main thread blocking on the WaitPhysScenes() call in the UWorld::EnsureCollisionTreeIsBuilt() method during level load.

The log I get when trying to play the demo is attached. The number of thread exits at the end varies from 2 to 3.

I've tried making the call from both the input event (co-opted from APlayerController::InputEvent or APlayerController::ProcessInput) and from a tick event. Both give the same results.

I really have no idea why this works when entering the console command directly, but not when faking the console command through code or calling the UGameInstance method directly.

I've attached the log file, thread list and call stack of the main thread.

Any ideas? Thanks.

Edit: It's in a 4.8.3 source build and running on w10 64bit.

Product Version: UE 4.8
more ▼

asked Oct 29 '15 at 02:04 PM in Bug Reports

avatar image

1.7k 80 28 81

avatar image Matthew J Nov 03 '15 at 09:32 PM

Hello TTaM,

I'm currently looking into this issue for you. Just for clarity's sake, can you post the code where you're calling the console command with these two methods that don't work?

avatar image TTaM Nov 04 '15 at 12:17 AM

Hi Matthew. Thanks for the reply. I'm using the following:

GEngine->GetFirstLocalPlayerController( GetWorld() )->ConsoleCommand( "demoplay " + DemoName, false );


UGameInstance* GameInstance = GetWorld()->GetGameInstance();

GameInstance->PlayReplay( DemoName );

DemoName in both these cases has the value "test"

avatar image Matthew J Nov 05 '15 at 10:46 PM

Hello TTaM,

I tried the first method you listed and that worked without a problem. To be exact, I created a ShooterGame project and added that line to the SetInfiniteAmmo function in the ShooterPlayerController just so I had an easy way to trigger it. When I attempted the second method however, I was given a message stating that the demo I was trying to play was not found (I'll be looking into this separately). Can you give this a try in ShooterGame to see if you get the same results as you're getting with your project? If you do continue to have these issues, it could be a problem with Windows 10 and I'll be able to test that out if so.

avatar image Matthew J Nov 10 '15 at 08:32 PM

We haven't heard from you in a while, TTaM. Are you still experiencing this issue? If so, please let me know if you'll be able to test it out in ShooterGame and what OS you're using. In the meantime, I'll be marking this issue as resolved for tracking purposes. If you wish to continue the discussion, please leave a comment and the issue will reopen.

avatar image TTaM Nov 10 '15 at 09:59 PM

Yes, sorry. I've been rather busy. I'll give it a try now.

avatar image TTaM Nov 10 '15 at 10:46 PM

I created a new First Person C++ project. Recorded a short demo. Tried to play the demo and it crashes because it's trying to load the PIE map name in the demo... which doesn't exist. And if I change the name of the map in the demo header to remove the PIE prefix, it can't load the map because it's not a PIE map. Funnily enough, it's using the right file name.


Separate issue: fix demo playback in PIE. :/

Building a shipped version of the FP project so I can test that.

avatar image TTaM Nov 10 '15 at 11:08 PM

After packaging it in development, it seems to record and play the demo just fine. "Just fine" being the demo not having the player in it, but at least I am able to move about with the spectator camera and it doesn't crash.

avatar image Matthew J Nov 11 '15 at 03:44 PM

Thank you for giving that a try TTaM. I tried using the console commands in PIE in 4.8.3, 4.9.2, and 4.10. It seems that 4.9.2 and 4.10 have a more severe problem in PIE where the crash occurs immediately as you use demorec. I've placed a bug in for that under the number UE-23215.

In the packaged version, is this through the console commands or through the code lines that we previously used?

avatar image TTaM Nov 11 '15 at 04:59 PM

This was all through console commands. I'll give the play replay method a go. Seems I forgot with all the PIE problems!

And... it froze. I added the following to the character blueprint that came with the project:


I recorded a demo (demorec test123 and then demostop.) I then hit the 'k' key and it froze, 0% cpu, etc.

(comments are locked)
10|2000 characters needed characters left
Viewable by all users

1 answer: sort voted first

I've placed another bug in the demoplay freezing problem. The same thing occurs in our internal build of 4.11 but in my case of testing it on 4.8.3, I get an assert and a crash report than just freezing. Unfortunately, other than using the actual console commands themselves, I can't think of any other type of workaround in the meantime. I'll update you here if the issue is fixed.

Have a nice day!

more ▼

answered Nov 13 '15 at 07:08 PM

avatar image TTaM Nov 13 '15 at 07:18 PM

Thanks a lot! Hope it's fixed soon. :)

avatar image danjo133 Dec 08 '16 at 04:19 PM

Any news on this? With play in stand alone game (demorec doesn't work in pie) I get some type of hang with half the window being white and the other gray, I can't move around in this state. I can however trigger the console. It doesn't seem like any console commands are working though and when I exit the program I get an engine crash. (Engine 4.14)

avatar image TTaM Dec 08 '16 at 04:20 PM

Change the map first and THEN play the demo.

(comments are locked)
10|2000 characters needed characters left
Viewable by all users
Your answer
toggle preview:

Up to 5 attachments (including images) can be used with a maximum of 5.2 MB each and 5.2 MB total.

Follow this question

Once you sign in you will be able to subscribe for any updates here

Answers to this question