Description

This is a common crash in the 4.18 release. It is the exact same callstack (and crashGroup) as in [Link Removed], although that Jira had specific repro steps and was confirmed fixed in 4.18.0.

There are two different error messages associated with this crash:

Access violation - code c0000005 (first/second chance not available)
Assertion failed: Stream.VertexBuffer->IsInitialized() [File:D:\Build\++UE4+Release-4.18+Compile\Sync\Engine\Source\Runtime\ShaderCore\Private\VertexFactory.cpp] [Line: 190] Vertex buffer was not initialized! Stream 3, Stride 64, Name Static-mesh instances

User Descriptions

  • The crash occurs when I compile a UActor derived class with a OnConstruction overrided method that uses some UInstancedStaticMeshComponent and adds some instances.
  • Reimported custom mesh for velocity oriented emitter

Source Context

175       void FVertexFactory::Set(FRHICommandList& RHICmdList) const
  176       {
  177       check(IsInitialized());
  178       for(int32 StreamIndex = 0;StreamIndex < Streams.Num();StreamIndex++)
  179       {
  180       const FVertexStream& Stream = Streams[StreamIndex];
  181       if (!Stream.bSetByVertexFactoryInSetMesh)
  182       {
  183       if (!Stream.VertexBuffer)
  184       {
  185       RHICmdList.SetStreamSource(StreamIndex, nullptr, 0);
  186       }
  187       else
  188       {
  189 ***** checkf(Stream.VertexBuffer->IsInitialized(), TEXT("Vertex buffer was not initialized! Stream %u, Stride %u, Name %s"), StreamIndex, Stream.Stride, *Stream.VertexBuffer->GetFriendlyName());
  190       RHICmdList.SetStreamSource(StreamIndex, Stream.VertexBuffer->VertexBufferRHI, Stream.Offset);
  191       }
  192       }
  193       }
  194       }
Steps to Reproduce

repro steps currently unknown

Callstack
UE4Editor_ShaderCore!FVertexFactory::Set() [vertexfactory.cpp:190]
UE4Editor_Renderer!FMeshDrawingPolicy::SetSharedState() [drawingpolicy.cpp:198]
UE4Editor_Renderer!FDepthDrawingPolicy::SetSharedState() [depthrendering.cpp:422]
UE4Editor_Renderer!FDepthDrawingPolicyFactory::DrawMesh() [depthrendering.cpp:744]
UE4Editor_Renderer!FDeferredShadingSceneRenderer::RenderPrePassViewDynamic() [depthrendering.cpp:849]
UE4Editor_Renderer!FDeferredShadingSceneRenderer::RenderPrePassView() [depthrendering.cpp:986]
UE4Editor_Renderer!FDeferredShadingSceneRenderer::RenderPrePass() [depthrendering.cpp:1300]
UE4Editor_Renderer!FDeferredShadingSceneRenderer::Render() [deferredshadingrenderer.cpp:772]
UE4Editor_Renderer!RenderViewFamily_RenderThread() [scenerendering.cpp:2081]
UE4Editor_Renderer!TGraphTask<`FRendererModule::BeginRenderingViewFamily'::`26'::EURCMacro_FDrawSceneCommand>::ExecuteTask() [taskgraphinterfaces.h:784]
UE4Editor_Core!FNamedTaskThread::ProcessTasksNamedThread() [taskgraph.cpp:651]
UE4Editor_Core!FNamedTaskThread::ProcessTasksUntilQuit() [taskgraph.cpp:560]
UE4Editor_RenderCore!RenderingThreadMain() [renderingthread.cpp:327]
UE4Editor_RenderCore!FRenderingThread::Run() [renderingthread.cpp:461]
UE4Editor_Core!FRunnableThreadWin::Run() [windowsrunnablethread.cpp:76]

Have Comments or More Details?

There's no existing public thread on this issue, so head over to Questions & Answers just mention UE-52520 in the post.

1
Login to Vote

Won't Fix
ComponentUE - Rendering
Affects Versions4.164.174.18
Target Fix4.21
CreatedNov 17, 2017
ResolvedOct 1, 2018
UpdatedOct 15, 2018