CONFIGURATION
I am testing on Mac OS X 10.12.6 (16G29) with Unreal Version: 4.18.2-3794801+++UE4+Release-4.18. The editor seems to run with Metal when it runs. I have not tested on Windows.
REPRODUCTION STEPS
I choose New Project. I choose a Blueprint->Virtual Reality project. I pick Desktop/Console, Maximum Quality, No Starter Content. It opens to StartupMap. Under Content Browser I hit Add New, Materials and Textures, Material. It creates a material NewMaterial. I open NewMaterial. I hover anywhere and type “4” to create a 4-vector.
It crashes. Here is the stack trace (it always looks like this):
LoginId:30f48c6a6544accf6eec2cbfde7a341a
EpicAccountId:343ebe79f67a4f089a872db61d9a6728
SEGV_NOOP at 0x0
ShaderBindingStage::updateConstantTable(unsigned int, unsigned int) Address = 0x136adb48d (filename not found) [in AppleIntelBDWGraphicsMTLDriver]
ShaderBindingStage::updateBindingTableData() Address = 0x136adc080 (filename not found) [in AppleIntelBDWGraphicsMTLDriver]
ShaderBindingStage::writeTableIf() Address = 0x136adc586 (filename not found) [in AppleIntelBDWGraphicsMTLDriver]
IGAccelRenderCommandEncoder::programPipeline(sPrimitiveData const&) Address = 0x136acaac2 (filename not found) [in AppleIntelBDWGraphicsMTLDriver]
IGAccelRenderCommandEncoder::drawPrimitives(MTLPrimitiveType, unsigned int, unsigned int, unsigned int, unsigned int) Address = 0x136ac9a26 (filename not found) [in AppleIntelBDWGraphicsMTLDriver]
-[MTLIGAccelRenderCommandEncoder drawPrimitives:vertexStart:vertexCount:instanceCount:] Address = 0x136ab88a3 (filename not found) [in AppleIntelBDWGraphicsMTLDriver]
FMetalRenderPass::DrawPrimitive(unsigned int, unsigned int, unsigned int, unsigned int) Address = 0x126c3e955 (filename not found) [in UE4Editor-MetalRHI.dylib]
FMetalRHICommandContext::RHIEndDrawPrimitiveUP() Address = 0x126c21a59 (filename not found) [in UE4Editor-MetalRHI.dylib]
DrawPrimitiveUP(FRHICommandList&, unsigned int, unsigned int, void const*, unsigned int) Address = 0x112ba22cb (filename not found) [in UE4Editor-Renderer.dylib]
FMeshDrawingPolicy::DrawMesh(FRHICommandList&, FMeshBatch const&, int, bool) const Address = 0x112c67b95 (filename not found) [in UE4Editor-Renderer.dylib]
void FDrawBasePassDynamicMeshAction::Process<FUniformLightMapPolicy>(FRHICommandList&, FProcessBasePassMeshParameters const&, FUniformLightMapPolicy const&, FUniformLightMapPolicy::ElementDataType const&) Address = 0x112b3b1f3 (filename not found) [in UE4Editor-Renderer.dylib]
void ProcessBasePassMesh<FDrawBasePassDynamicMeshAction>(FRHICommandList&, FProcessBasePassMeshParameters const&, FDrawBasePassDynamicMeshAction&&) Address = 0x112aae550 (filename not found) [in UE4Editor-Renderer.dylib]
FBasePassOpaqueDrawingPolicyFactory::DrawDynamicMesh(FRHICommandList&, FViewInfo const&, FBasePassOpaqueDrawingPolicyFactory::ContextType, FMeshBatch const&, bool, FDrawingPolicyRenderState const&, FPrimitiveSceneProxy const*, FHitProxyId, bool) Address = 0x112aadd39 (filename not found) [in UE4Editor-Renderer.dylib]
FRendererModule::DrawTileMesh(FRHICommandListImmediate&, FDrawingPolicyRenderState&, FSceneView const&, FMeshBatch const&, bool, FHitProxyId const&) Address = 0x1131d04e0 (filename not found) [in UE4Editor-Renderer.dylib]
FTileRenderer::DrawTile(FRHICommandListImmediate&, FDrawingPolicyRenderState&, FSceneView const&, FMaterialRenderProxy const*, bool, float, float, float, float, float, float, float, float, bool, FHitProxyId, FColor) Address = 0x1061f982e (filename not found) [in UE4Editor-Engine.dylib]
FCanvasTileRendererItem::Render_RenderThread(FRHICommandListImmediate&, FDrawingPolicyRenderState&, FCanvas const*) Address = 0x1061fa6d4 (filename not found) [in UE4Editor-Engine.dylib]
FCanvas::Flush_RenderThread(FRHICommandListImmediate&, bool) Address = 0x106334e46 (filename not found) [in UE4Editor-Engine.dylib]
FPreviewElement::DrawRenderThread(FRHICommandListImmediate&, void const*) Address = 0x117cd879f (filename not found) [in UE4Editor-GraphEditor.dylib]
FSlateRHIRenderingPolicy::DrawElements(FRHICommandListImmediate&, FSlateBackBuffer&, TRefCountPtr<FRHITexture2D>&, TRefCountPtr<FRHITexture2D>&, TArray<FSlateRenderBatch, FDefaultAllocator> const&, TArray<FSlateClippingState, FDefaultAllocator>, FSlateRenderingOptions const&) Address = 0x125294d6d (filename not found) [in UE4Editor-SlateRHIRenderer.dylib]
FSlateRHIRenderer::DrawWindow_RenderThread(FRHICommandListImmediate&, FSlateRHIRenderer::FViewportInfo&, FSlateWindowElementList&, bool, bool, FVector2D) Address = 0x1252b0313 (filename not found) [in UE4Editor-SlateRHIRenderer.dylib]
TGraphTask<TEnqueueUniqueRenderCommandType<FSlateRHIRenderer::DrawWindows_Private(FSlateDrawBuffer&)::SlateDrawWindowsCommandName, FSlateRHIRenderer::DrawWindows_Private(FSlateDrawBuffer&)::$_5> >::ExecuteTask(TArray<FBaseGraphTask*, FDefaultAllocator>&, ENamedThreads::Type) Address = 0x125308587 (filename not found) [in UE4Editor-SlateRHIRenderer.dylib]
FNamedTaskThread::ProcessTasksNamedThread(int, bool) Address = 0x1033e1f1c (filename not found) [in UE4Editor-Core.dylib]
FNamedTaskThread::ProcessTasksUntilQuit(int) Address = 0x1033e0fc8 (filename not found) [in UE4Editor-Core.dylib]
FTaskGraphImplementation::ProcessThreadUntilRequestReturn(ENamedThreads::Type) Address = 0x1033dd0ae (filename not found) [in UE4Editor-Core.dylib]
RenderingThreadMain(FEvent*) Address = 0x108f022a1 (filename not found) [in UE4Editor-RenderCore.dylib]
FRenderingThread::Run() Address = 0x108f16d17 (filename not found) [in UE4Editor-RenderCore.dylib]
FRunnableThreadPThread::Run() Address = 0x10345627e (filename not found) [in UE4Editor-Core.dylib]
FRunnableThreadPThread::_ThreadProc(void*) Address = 0x103400fc7 (filename not found) [in UE4Editor-Core.dylib]
_pthread_body Address = 0x7fffdac9093b (filename not found) [in libsystem_pthread.dylib]
_pthread_body Address = 0x7fffdac90887 (filename not found) [in libsystem_pthread.dylib]
thread_start Address = 0x7fffdac9008d (filename not found) [in libsystem_pthread.dylib]
If I look up the log in ~/Library/Logs, I get:
[2017.12.23-15.58.16:748][374]LogContentBrowser: Native class hierarchy updated for 'MaterialEditor' in 0.0004 seconds. Added 1 classes and 0 folders.
[2017.12.23-15.58.16:753][374]LogMaterial: Missing cached shader map for material NewMaterial, compiling.
[2017.12.23-15.58.17:236][374]LogSlate: Took 0.000416 seconds to synchronously load lazily loaded font '../../../Engine/Content/Slate/Fonts/Roboto-Regular.ttf' (155K)
[2017.12.23-15.58.17:902][374]LogMaterial: Missing cached shader map for material NewMaterial, compiling.
[2017.12.23-15.58.17:980][374]LogSlate: Took 0.000759 seconds to synchronously load lazily loaded font '../../../Engine/Content/Editor/Slate/Fonts/Roboto-BoldCondensed.ttf' (158K)
[2017.12.23-15.58.25:335][430]LogMaterial: Missing cached shader map for material NewMaterial, compiling.
[2017.12.23-15.58.25:377][430]LogMaterial: Missing cached shader map for material FMatExpressionPreview MaterialExpressionConstant4Vector_0, compiling.
[2017.12.23-15.58.26:058][431]LogMac: === Critical error: ===
SIGSEGV: invalid attempt to access memory at address 0x0
ADDITIONAL NOTES
I also get the crash if I create a “VectorParameter” node instead of a vector constant node.
I do NOT get the crash if, when I create my New Project, I create a new Blank project instead of a new Virtual Reality project.
I am experiencing this both with newly created VR projects and with old projects based on the VR template I created back in 4.18.0. I did NOT see this problem using the 4.18.0 editor.
I am filing this as a bug report because it is a reproducible crash. However, it is blocking development because it means I cannot edit materials in my VR project, so any workarounds would be appreciated.