Unreal Version : 4.26.2
I just got a Macbook air with M1 chip for IOS packaging purposes.
I did my whole project development on a Windows PC and brought the project inside macbook for packaging to IOS.
The first time i started the project everything was fine and i could see my project in the editor.
But as soon as i changed the preview rendering to IOS the editor crashed and since then everytime i open the project it crashes before loading. I am providing the error stack below.
Fatal error: [File:/Users/build/Build/++UE4/Sync/Engine/Source/Runtime/Apple/MetalRHI/Private/MetalRenderPass.cpp] [Line: 327] Failed to restart render pass with descriptor: <MTLRenderPassDescriptorInternal: 0x60000179c000> Color Attachment 0 texture = <AGXM1FamilyTexture: 0x7fcb086cb900> label = SceneColorMobile textureType = MTLTextureType2DMultisample pixelFormat = MTLPixelFormatRGBA16Float width = 904 height = 424 depth = 1 arrayLength = 1 mipmapLevelCount = 1 sampleCount = 2 cpuCacheMode = MTLCPUCacheModeDefaultCache storageMode = MTLStorageModePrivate hazardTrackingMode = MTLHazardTrackingModeTracked resourceOptions = MTLResourceCPUCacheModeDefaultCache MTLResourceStorageModePrivate MTLResourceHazardTrackingModeTracked usage = MTLTextureUsageShaderRead MTLTextureUsageRenderTarget shareable = 0 framebufferOnly = 0 purgeableState = MTLPurgeableStateNonVolatile swizzle = [MTLTextureSwizzleRed, MTLTextureSwizzleGreen, MTLTextureSwizzleBlue, MTLTextureSwizzleAlpha] isCompressed = 1 parentTexture = <null> parentRelativeLevel = 0 parentRelativeSlice = 0 buffer = <null> bufferOffset = 0 bufferBytesPerRow = 0 iosurface = 0x0 iosurfacePlane = 0 allowGPUOptimizedContents = YES level = 0 slice = 0 depthPlane = 0 resolveTexture = <AGXM1FamilyTexture: 0x7fcb086cb500> label = <none> textureType = MTLTextureType2D pixelFormat = MTLPixelFormatRGBA16Float width = 904 height = 424 depth = 1 arrayLength = 1 mipmapLevelCount = 1 sampleCount = 1 cpuCacheMode = MTLCPUCacheModeDefaultCache storageMode = MTLStorageModePrivate hazardTrackingMode = MTLHazardTrackingModeTracked resourceOptions = MTLResourceCPUCacheModeDefaultCache MTLResourceStorageModePrivate MTLResourceHazardTrackingModeTracked usage = MTLTextureUsageShaderRead MTLTextureUsageRenderTarget shareable = 0 framebufferOnly = 0 purgeableState = MTLPurgeableStateNonVolatile swizzle = [MTLTextureSwizzleRed, MTLTextureSwizzleGreen, MTLTextureSwizzleBlue, MTLTextureSwizzleAlpha] isCompressed = 1 parentTexture = <null> parentRelativeLevel = 0 parentRelativeSlice = 0 buffer = <null> bufferOffset = 0 bufferBytesPerRow = 0 iosurface = 0x0 iosurfacePlane = 0 allowGPUOptimizedContents = YES resolveLevel = 0 resolveSlice = 0 resolveDepthPlane = 0 loadAction = MTLLoadActionClear storeAction = MTLStoreActionUnknown storeActionOptions = none clearColor = (0 0 0 0) yInvert = NO Color Attachment 1 texture = <null> level = 0 slice = 0 depthPlane = 0 resolveTexture = <null> resolveLevel = 0 resolveSlice = 0 resolveDepthPlane = 0 loadAction = MTLLoadActionClear storeAction = MTLStoreActionStore storeActionOptions = none clearColor = (0 0 0 0) yInvert = NO Color Attachment 2 texture = <null> level = 0 slice = 0 depthPlane = 0 resolveTexture = <null> resolveLevel = 0 resolveSlice = 0 resolveDepthPlane = 0 loadAction = MTLLoadActionDontCare storeAction = MTLStoreActionStore storeActionOptions = none clearColor = (0 0 0 1) yInvert = NO Color Attachment 3 texture = <null> level = 0 slice = 0 depthPlane = 0 resolveTexture = <null> resolveLevel = 0 resolveSlice = 0 resolveDepthPlane = 0 loadAction = MTLLoadActionDontCare storeAction = MTLStoreActionStore
FGenericPlatformMisc::RaiseException(unsigned int) Address = 0x109190757 (filename not found) [in UE4Editor-Core.dylib]
FMacErrorOutputDevice::Serialize(char16_t const*, ELogVerbosity::Type, FName const&) Address = 0x109324673 (filename not found) [in UE4Editor-Core.dylib]
FOutputDevice::LogfImpl(char16_t const*, ...) Address = 0x109432799 (filename not found) [in UE4Editor-Core.dylib]
auto FMetalRenderPass::RestartRenderPass(mtlpp::RenderPassDescriptor)::$_14::operator()<FLogCategoryLogMetal, char16_t [50], char16_t const*>(FLogCategoryLogMetal const&, char16_t const (&) [50], char16_t const* const&) const Address = 0x17278eb76 (filename not found) [in UE4Editor-MetalRHI.dylib]
FMetalRenderPass::RestartRenderPass(mtlpp::RenderPassDescriptor) Address = 0x17278d278 (filename not found) [in UE4Editor-MetalRHI.dylib]
FMetalRenderPass::ConditionalSwitchToRender() Address = 0x17278f29b (filename not found) [in UE4Editor-MetalRHI.dylib]
FMetalRenderPass::DrawIndexedPrimitive(FMetalBuffer const&, unsigned int, unsigned int, int, unsigned int, unsigned int, unsigned int, unsigned int, unsigned int) Address = 0x172795613 (filename not found) [in UE4Editor-MetalRHI.dylib]
FMetalRHICommandContext::RHIDrawIndexedPrimitive(FRHIIndexBuffer*, int, unsigned int, unsigned int, unsigned int, unsigned int, unsigned int) Address = 0x17270e171 (filename not found) [in UE4Editor-MetalRHI.dylib]
FMeshDrawCommand::SubmitDraw(FMeshDrawCommand const&, Experimental::TRobinHoodHashSet<FGraphicsMinimalPipelineStateInitializer, DefaultKeyFuncs<FGraphicsMinimalPipelineStateInitializer, false>, TSizedDefaultAllocator<32> > const&, FRHIVertexBuffer*, int, unsigned int, FRHICommandList&, FMeshDrawCommandStateCache&) Address = 0x137a5bb64 (filename not found) [in UE4Editor-Renderer.dylib]
SubmitMeshDrawCommandsRange(TArray<FVisibleMeshDrawCommand, TMemStackAllocator<0u> > const&, Experimental::TRobinHoodHashSet<FGraphicsMinimalPipelineStateInitializer, DefaultKeyFuncs<FGraphicsMinimalPipelineStateInitializer, false>, TSizedDefaultAllocator<32> > const&, FRHIVertexBuffer*, int, bool, int, int, unsigned int, FRHICommandList&) Address = 0x137a55c95 (filename not found) [in UE4Editor-Renderer.dylib]
FParallelMeshDrawCommandPass::DispatchDraw(FParallelCommandListSet*, FRHICommandList&) const Address = 0x137a547ab (filename not found) [in UE4Editor-Renderer.dylib]
FMobileSceneRenderer::RenderMobileBasePass(FRHICommandListImmediate&, TArrayView<FViewInfo const*, int>) Address = 0x137a93d8f (filename not found) [in UE4Editor-Renderer.dylib]
FMobileSceneRenderer::RenderForward(FRHICommandListImmediate&, TArrayView<FViewInfo const*, int>) Address = 0x137b372db (filename not found) [in UE4Editor-Renderer.dylib]
FMobileSceneRenderer::Render(FRHICommandListImmediate&) Address = 0x137b32362 (filename not found) [in UE4Editor-Renderer.dylib]
RenderViewFamily_RenderThread(FRHICommandListImmediate&, FSceneRenderer*) Address = 0x137edb39a (filename not found) [in UE4Editor-Renderer.dylib]
TEnqueueUniqueRenderCommandType<FRendererModule::BeginRenderingViewFamily(FCanvas*, FSceneViewFamily*)::FDrawSceneCommandName, FRendererModule::BeginRenderingViewFamily(FCanvas*, FSceneViewFamily*)::$_45>::DoTask(ENamedThreads::Type, TRefCountPtr<FGraphEvent> const&) Address = 0x137edab92 (filename not found) [in UE4Editor-Renderer.dylib]
TGraphTask<TEnqueueUniqueRenderCommandType<FRendererModule::BeginRenderingViewFamily(FCanvas*, FSceneViewFamily*)::FDrawSceneCommandName, FRendererModule::BeginRenderingViewFamily(FCanvas*, FSceneViewFamily*)::$_45> >::ExecuteTask(TArray<FBaseGraphTask*, TSizedDefaultAllocator<32> >&, ENamedThreads::Type) Address = 0x137eddada (filename not found) [in UE4Editor-Renderer.dylib]
FNamedTaskThread::ProcessTasksNamedThread(int, bool) Address = 0x10910b466 (filename not found) [in UE4Editor-Core.dylib]
FNamedTaskThread::ProcessTasksUntilQuit(int) Address = 0x109109a80 (filename not found) [in UE4Editor-Core.dylib]
RenderingThreadMain(FEvent*) Address = 0x11a697aa3 (filename not found) [in UE4Editor-RenderCore.dylib]
FRenderingThread::Run() Address = 0x11a6c2407 (filename not found) [in UE4Editor-RenderCore.dylib]
FRunnableThreadPThread::Run() Address = 0x1092303b8 (filename not found) [in UE4Editor-Core.dylib]
FRunnableThreadPThread::_ThreadProc(void*) Address = 0x1091bc9a4 (filename not found) [in UE4Editor-Core.dylib]
_pthread_start Address = 0x7fff2034e950 (filename not found) [in libsystem_pthread.dylib]
thread_start Address = 0x7fff2034a47b (filename not found) [in libsystem_pthread.dylib]
I have tried one solution without success of going to the ConsoleVariable.ini and uncommenting the r.Shaders.optimize=0 as was suggested here UE Editor 4.17 Mac consistent crash on launch - Platform & Builds - Unreal Engine Forums
IOS Devs ASSEMBLE !!!
Edit 1 : After running some tests i have boiled down the problem to the config folder being the problem of the crash. If i remove the config folder thing works normally.
But obviously this is a problem because without config my game instance fails to cast as config folder has the location info for game instance.
Are we not supposed to include config folder in mac projects?