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"

[Closed] CreateRenderState_Concurrent crash

If the editor starting map contains a component that equeues a clear render target (or a canvas draw) in the CreateRenderState_Concurrent, the engine crashes since FSceneRenderTargets::CurrentShadingPath is not initialized (it is equal to 2, so ShadingPath::Num, so the GetSceneColorForCurrentShadingPath's check fails).

Is there any documentation about actor/component calls, or engine flow, that covers at least OnRegister, CreateRenderState_Concurrent?


Product Version: Not Selected
more ▼

asked Jan 04 '17 at 10:49 PM in Rendering

avatar image

Answers.Archive STAFF
2k 212 318 698

avatar image Answers.Archive STAFF Jan 04 '17 at 10:49 PM

This happens while the editor is launching as editor in Development_editor configuration: the dialog displays "Loading.... 95%".

The callstack is the following:

UE4Editor-Renderer.dll!FSceneRenderTargets::GetSceneColorForCurrentShadingPath() Line 658 C++



UE4Editor-Renderer.dll!ProcessBasePassMesh(FRHICommandList &

UE4Editor-Renderer.dll!FTranslucencyDrawingPolicyFactory::DrawMesh(FRHICommandList & RHIC


UE4Editor-Renderer.dll!FRendererModule::DrawTileMesh(FRHICommandListImmediate & RHICmdLis

UE4Editor-Engine.dll!FTileRenderer::DrawTile(FRHICommandListImmediate & RHICmdList, const FSc


UE4Editor-Engine.dll!TGraphTask<`FCanvasTileRendererItem::Render_GameThread'::`2'::EURCMacro_DrawTileCommand>::ExecuteTask(TArray & NewTasks, ENamedThreads::Type CurrentThread) Line 868 C++

UE4Editor-Core.dll!FNamedTaskThread::ProcessTasksNamedThread(int QueueIndex, bool bAllowStall) Line 932 C++

UE4Editor-Core.dll!FNamedTaskThread::ProcessTasksUntilQuit(int QueueIndex) Line 679 C++

UE4Editor-RenderCore.dll!RenderingThreadMain(FEvent * TaskGraphBoundSyncEvent) Line 319 C++

UE4Editor-RenderCore.dll!FRenderingThread::Run() Line 457 C++

UE4Editor-Core.dll!FRunnableThreadWin::Run() Line 74 C++

UE4Editor-Core.dll!FRunnableThreadWin::GuardedRun() Line 23 C++

avatar image Answers.Archive STAFF Jan 04 '17 at 10:49 PM


Does this happen if you launch your project as a game, or only when launching in editor?

I think the problem really is that you're just not supposed to be making those sorts of calls in CreateRenderState_Concurrent. The name alone suggests that you should be creating state, not running commands.

You should probably just remove those calls and perform them elsewhere.

Thanks, Jon N.

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

The question has been closed Jan 04 '17 at 10:50 PM by AndrewHurley for the following reason:

The question is answered, right answer was accepted

1 answer: sort voted first


I'm not sure there are any documents outlining the information you're looking for. Further, the paths for getting from loading / creating a world to initializing components can be quite divergent depending on how / when you're doing this (e.g. just launching the game from command line may be slightly different than doing PIE).

Can you provide a little more context on when this happens? Is it when the editor first loads, when you PIE, if you launch into the game with command line args? Does this happen in packaged or game builds?

Here's a page describing Actor Lifecycle.

There are another key points to this in regards to your question (but not on that page):

UActorComponent::RegisterComponentWithWorld is called, it will call ExecuteRegisterEvents (and also will conditionally call RegisterComponentWithWorld on child components).

UActorComponent::ExecuteRegisterEvents is called, it will call OnRegister first, and then CreateRenderState_Concurrent.

However, when RegisterComponentWithWorld is called is a little less straight forward.

UActorComponent has a bAutoRegister member (which is true by default). When this is set, the component will automatically register as soon as the Actor is registered. However, when it's false, it's typically up to the owning Actor to manage registration. However, RegisterComponentWithWorld is public because Components can be created dynamically at runtime in a way that is not manager by the Actor.

All of that aside, what you're running into is likely is a callstack that looks something like this:

AActor::IncrementalRegisterComponents ULevel::IncrementalUpdateComponents ULevel::UpdateLevelComponents UWorld::UpdateWorldComponents UWorld::InitializeNewWorld UWorld::CreateWorld

It's also important to realize that UpdateWorldComponents will be called when InitializeActorsForPlay is called (and you can see where that fits in in the Actor Lifecycle docs).

Something you could try to avoid these issues is to disable bAutoRegister on the components with these calls, and defer them until later (see the Actor Lifecycle docs for potential injection points).

Thanks, Jon N.

more ▼

answered Jan 04 '17 at 10:49 PM

avatar image

Answers.Archive STAFF
2k 212 318 698

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

Follow this question

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

Answers to this question