Crash on build in editor with UProceduralMeshComponent 4.8p2

I’m building from source latest version of 4.8. My level is using the new UProceduralMeshComponent and it crashes on trying to build the level at the following line UproceduralMeshComponent.cpp:58.

/** Initialization */
void Init(const FProcMeshVertexBuffer* VertexBuffer)
{
	check(!IsInRenderingThread());

Thanks for any help with this.

Stack trace at crash below.

>	UE4Editor-ProceduralMeshComponent.dll!FProcMeshVertexFactory::Init(const FProcMeshVertexBuffer * VertexBuffer) Line 58	C++
 	UE4Editor-ProceduralMeshComponent.dll!FProceduralMeshSceneProxy::FProceduralMeshSceneProxy(UProceduralMeshComponent * Component) Line 142	C++
 	UE4Editor-ProceduralMeshComponent.dll!UProceduralMeshComponent::CreateSceneProxy() Line 353	C++
 	UE4Editor-Renderer.dll!FScene::AddPrimitive(UPrimitiveComponent * Primitive) Line 482	C++
 	UE4Editor-Engine.dll!UActorComponent::ExecuteRegisterEvents() Line 1017	C++
 	UE4Editor-Engine.dll!UActorComponent::RegisterComponentWithWorld(UWorld * InWorld) Line 804	C++
 	UE4Editor-Engine.dll!AActor::IncrementalRegisterComponents(int NumComponentsToRegister) Line 3497	C++
 	UE4Editor-Engine.dll!ULevel::IncrementalUpdateComponents(int NumComponentsToUpdate, bool bRerunConstructionScripts) Line 718	C++
 	UE4Editor-Engine.dll!UWorld::UpdateWorldComponents(bool bRerunConstructionScripts, bool bCurrentLevelOnly) Line 1276	C++
 	UE4Editor-UnrealEd.dll!FUnrealEdMisc::CB_MapChange(unsigned int InFlags) Line 935	C++
 	UE4Editor-UnrealEd.dll!TBaseRawMethodDelegateInstance<0,FUnrealEdMisc,void __cdecl(unsigned int)>::ExecuteIfSafe(unsigned int <Params_0>) Line 582	C++
 	UE4Editor-UnrealEd.dll!TBaseMulticastDelegate<void,unsigned int>::Broadcast(unsigned int <Params_0>) Line 1031	C++
 	UE4Editor-UnrealEd.dll!UEditorEngine::RebuildMap(UWorld * InWorld, UEditorEngine::EMapRebuildType RebuildType) Line 1529	C++
 	UE4Editor-UnrealEd.dll!UEditorEngine::Map_Rebuild(UWorld * InWorld, const wchar_t * Str, FOutputDevice & Ar) Line 1393	C++
 	UE4Editor-UnrealEd.dll!UEditorEngine::HandleMapCommand(const wchar_t * Str, FOutputDevice & Ar, UWorld * InWorld) Line 5768	C++
 	UE4Editor-UnrealEd.dll!UEditorEngine::Exec(UWorld * InWorld, const wchar_t * Stream, FOutputDevice & Ar) Line 5262	C++
 	UE4Editor-UnrealEd.dll!UUnrealEdEngine::Exec(UWorld * InWorld, const wchar_t * Stream, FOutputDevice & Ar) Line 742	C++
 	UE4Editor-UnrealEd.dll!FEditorBuildUtils::EditorBuild(UWorld * InWorld, EBuildOptions::Type Id, const bool bAllowLightingDialog) Line 333	C++
 	UE4Editor-LevelEditor.dll!TBaseStaticDelegateInstance<void __cdecl(void)>::ExecuteIfSafe() Line 921	C++
 	UE4Editor-Slate.dll!FUICommandList::ExecuteAction(const TSharedRef<FUICommandInfo const ,0> InUICommandInfo) Line 75	C++
 	UE4Editor-Slate.dll!SToolBarButtonBlock::OnClicked() Line 296	C++
 	UE4Editor-Slate.dll!TMemberFunctionCaller<SToolBarButtonBlock,FReply (__cdecl SToolBarButtonBlock::*)(void) __ptr64>::operator()<>() Line 161	C++
 	UE4Editor-Slate.dll!TTupleImpl<TIntegerSequence<> >::ApplyAfter_ExplicitReturnType<FReply,TMemberFunctionCaller<SToolBarButtonBlock,FReply (__cdecl SToolBarButtonBlock::*)(void) __ptr64> >(TMemberFunctionCaller<SToolBarButtonBlock,FReply (__cdecl SToolBarButtonBlock::*)(void)> && Func) Line 113	C++
 	UE4Editor-Slate.dll!TBaseSPMethodDelegateInstance<0,SToolBarButtonBlock,0,FReply __cdecl(void)>::Execute() Line 282	C++
 	UE4Editor-Slate.dll!TBaseDelegate<FReply>::Execute() Line 440	C++
 	UE4Editor-Slate.dll!SButton::OnMouseButtonUp(const FGeometry & MyGeometry, const FPointerEvent & MouseEvent) Line 225	C++
 	UE4Editor-Slate.dll!FSlateApplication::ProcessMouseButtonUpEvent::__l18::<lambda>(const FArrangedWidget & TargetWidget, const FPointerEvent & Event) Line 4170	C++
 	UE4Editor-Slate.dll!FEventRouter::Route<FReply,FEventRouter::FToLeafmostPolicy,FPointerEvent,FReply <lambda>(const FArrangedWidget &, const FPointerEvent &) >(FSlateApplication * ThisApplication, FEventRouter::FToLeafmostPolicy RoutingPolicy, FPointerEvent EventCopy, const FSlateApplication::ProcessMouseButtonUpEvent::__l18::FReply <lambda>(const FArrangedWidget &, const FPointerEvent &) & Lambda) Line 212	C++
 	UE4Editor-Slate.dll!FSlateApplication::ProcessMouseButtonUpEvent(FPointerEvent & MouseEvent) Line 4173	C++
 	UE4Editor-Slate.dll!FSlateApplication::OnMouseUp(const EMouseButtons::Type Button) Line 4133	C++
 	UE4Editor-Core.dll!FWindowsApplication::ProcessDeferredMessage(const FDeferredWindowsMessage & DeferredMessage) Line 1406	C++
 	UE4Editor-Core.dll!FWindowsApplication::DeferMessage(TSharedPtr<FWindowsWindow,0> & NativeWindow, HWND__ * InHWnd, unsigned int InMessage, unsigned __int64 InWParam, __int64 InLParam, int MouseX, int MouseY, unsigned int RawInputFlags) Line 1711	C++
 	UE4Editor-Core.dll!FWindowsApplication::ProcessMessage(HWND__ * hwnd, unsigned int msg, unsigned __int64 wParam, __int64 lParam) Line 706	C++
 	UE4Editor-Core.dll!FWindowsApplication::AppWndProc(HWND__ * hwnd, unsigned int msg, unsigned __int64 wParam, __int64 lParam) Line 628	C++
 	[External Code]	
 	UE4Editor-Core.dll!FWindowsPlatformMisc::PumpMessages(bool bFromMainLoop) Line 792	C++
 	UE4Editor.exe!FEngineLoop::Tick() Line 2319	C++
 	UE4Editor.exe!GuardedMain(const wchar_t * CmdLine, HINSTANCE__ * hInInstance, HINSTANCE__ * hPrevInstance, int nCmdShow) Line 142	C++
 	UE4Editor.exe!WinMain(HINSTANCE__ * hInInstance, HINSTANCE__ * hPrevInstance, char * __formal, int nCmdShow) Line 285	C++
 	[External Code]

comment out the check(!IsInRenderingThread());
so it should look like:

// check(!IsInRenderingThread());

Then it won’t crash.

Thanks, that works! Hopefully that will be the official patch as well.

Now my lightmass build is breaking on some materials, will need to find the logs and submit those. It might be that I’m using transient materials on my UProceduralMeshComponent.

Created pull request: https://github.com/EpicGames/UnrealEngine/pull/1146 to hopefully get this in 4.8.

Thanks for the report, I think I know what is wrong but I’m talking to the render team for the best fix. Tracked as UE-15654, hoping to get fixed for 4.8.

Ok just checked in a fix for this, should make 4.8

Awesome! Thanks.