MegaLights feedback thread

I opened my project as a copy in Unreal engine 5.5, and it works for a while with mega light enabled, but then unreal 5.5 closes and I can’t open it again. What could it be?

Computer:

RTX 4090

I9 generation 12

48GB RAM

Message:

LoginId:9a6bbc12425d311aaffc8190d4d9bf76

EpicAccountId:2b3f513183a14cff82d9d68cd6941c47

Unhandled Exception: EXCEPTION_ACCESS_VIOLATION reading address 0x0000000000000008

UnrealEditor_Renderer

UnrealEditor_Renderer

UnrealEditor_Renderer

UnrealEditor_Renderer

UnrealEditor_Renderer

UnrealEditor_RenderCore

UnrealEditor_RenderCore

UnrealEditor_Core

UnrealEditor_Core

UnrealEditor_Core

UnrealEditor_RenderCore

UnrealEditor_RenderCore

UnrealEditor_Core

UnrealEditor_Core

kernel32

ntdll

Final log:

ErrorCode=[errors.com.epicgames.common.insufficient_scopes], NumericErrorCode=[1056], ErrorMessage=[Insufficient access scopes. Expected: [friends_list]], CorrId=[EOS-e4rjgpsU1E2FiwmBHXlAeA-1RQJDw2ovk-aMJOVQZ0Tyg]
[2024.11.26-16.23.47:129][ 72]Cmd: STAT FPS
[2024.11.26-16.23.50:654][358]LogWindows: Error: === Critical error: ===
[2024.11.26-16.23.50:654][358]LogWindows: Error:
[2024.11.26-16.23.50:654][358]LogWindows: Error: Fatal error!
[2024.11.26-16.23.50:654][358]LogWindows: Error:
[2024.11.26-16.23.50:654][358]LogWindows: Error: Unhandled Exception: EXCEPTION_ACCESS_VIOLATION reading address 0x0000000000000008
[2024.11.26-16.23.50:654][358]LogWindows: Error:
[2024.11.26-16.23.50:654][358]LogWindows: Error: [Callstack] 0x00007ffc16538080 UnrealEditor-Renderer.dll!UnknownFunction
[2024.11.26-16.23.50:654][358]LogWindows: Error: [Callstack] 0x00007ffc1682ad77 UnrealEditor-Renderer.dll!UnknownFunction
[2024.11.26-16.23.50:654][358]LogWindows: Error: [Callstack] 0x00007ffc1616ccb9 UnrealEditor-Renderer.dll!UnknownFunction
[2024.11.26-16.23.50:654][358]LogWindows: Error: [Callstack] 0x00007ffc16f44b26 UnrealEditor-Renderer.dll!UnknownFunction
[2024.11.26-16.23.50:654][358]LogWindows: Error: [Callstack] 0x00007ffc16efbb8a UnrealEditor-Renderer.dll!UnknownFunction
[2024.11.26-16.23.50:654][358]LogWindows: Error: [Callstack] 0x00007ffc7fb7b7c5 UnrealEditor-RenderCore.dll!UnknownFunction
[2024.11.26-16.23.50:654][358]LogWindows: Error: [Callstack] 0x00007ffc7fba94cf UnrealEditor-RenderCore.dll!UnknownFunction
[2024.11.26-16.23.50:654][358]LogWindows: Error: [Callstack] 0x00007ffc6b912722 UnrealEditor-Core.dll!UnknownFunction
[2024.11.26-16.23.50:654][358]LogWindows: Error: [Callstack] 0x00007ffc6b907d4a UnrealEditor-Core.dll!UnknownFunction
[2024.11.26-16.23.50:654][358]LogWindows: Error: [Callstack] 0x00007ffc6b9081ee UnrealEditor-Core.dll!UnknownFunction
[2024.11.26-16.23.50:654][358]LogWindows: Error: [Callstack] 0x00007ffc7fbd7e1c UnrealEditor-RenderCore.dll!UnknownFunction
[2024.11.26-16.23.50:654][358]LogWindows: Error: [Callstack] 0x00007ffc7fbdceb4 UnrealEditor-RenderCore.dll!UnknownFunction
[2024.11.26-16.23.50:654][358]LogWindows: Error: [Callstack] 0x00007ffc6bf3c0ad UnrealEditor-Core.dll!UnknownFunction
[2024.11.26-16.23.50:654][358]LogWindows: Error: [Callstack] 0x00007ffc6bf335cf UnrealEditor-Core.dll!UnknownFunction
[2024.11.26-16.23.50:654][358]LogWindows: Error: [Callstack] 0x00007ffcc108e8d7 KERNEL32.DLL!UnknownFunction
[2024.11.26-16.23.50:654][358]LogWindows: Error:

Are you sure it’s a MegaLights issue?

This project works normally in all versions, however when enabling mega light, when turning on the first lights, unreal closes and I can only open it again if I disable mega light using notepad.

1 Like

That does sound like a giant bug.

2 Likes

I will review my blueprint code. I may be experiencing some conflict when I enable megalight.

2 Likes

Hiya,

I am a heavy user of nanite displacement and VSM performance suffers quite a lot and RT shadows are fast, but RT shadows don’t appear correctly with megalights if you have a lot of nanite displacement (material based).

I think it’s because the RT shadows are tracing against the low res fallback meshes and ignoring the displacement going on.

As nanite displacement is so rich I think I have to stick with VSM so will VSM be optimised a bit better to work with megalights?

Thanks for consideration as I don’t have a workaround there.

Hi Everyone,

Since I can’t turn off and on PPV Megalights in my Sequencer, can I run some cvar to turn them on and off?

If nothing works I’ll just create another PPV and turn it off there and control the PPV with sequencer…

Thank you

just r.megalights.allowed I think?

Thanks I will try it out

Migrating a project from 5.4, some levels crash when Megalights is enabled.

As soon as i hit play for PIE they crash. Set one of these levels as startup level, and it always crashes shortly after opening until I disable the Megalights flag in DefaultEngine.ini

I can toggle Megalights on and off happily in the affected levels with no issue. But as soon as I play in editor, or load another level then load back into the affected level, it crashes.

The error appears to be exactly as JRFernande, but I have debugger symbols installed so it’s more detailed, the first line relates to light function atlas. I have no light functions in the scene. IT’s going to take a long time of switching stuff on and off trial and error for me to find what this conflict is, so any pointers would be appreciated:

Unhandled Exception: EXCEPTION_ACCESS_VIOLATION reading address 0x0000000000000008

UnrealEditor_Renderer!LightFunctionAtlas::BindGlobalParameters() [D:\build++UE5\Sync\Engine\Source\Runtime\Renderer\Private\LightFunctionAtlas.cpp:990]
UnrealEditor_Renderer!FDeferredShadingSceneRenderer::RenderMegaLights() [D:\build++UE5\Sync\Engine\Source\Runtime\Renderer\Private\MegaLights\MegaLights.cpp:1316]
UnrealEditor_Renderer!FDeferredShadingSceneRenderer::Render() [D:\build++UE5\Sync\Engine\Source\Runtime\Renderer\Private\DeferredShadingRenderer.cpp:2845]
UnrealEditor_Renderer!RenderViewFamilies_RenderThread() [D:\build++UE5\Sync\Engine\Source\Runtime\Renderer\Private\SceneRendering.cpp:5431]
UnrealEditor_Renderer!UE::RendererPrivateUtils::Implementation::TPersistentBuffer<UE::HLSL::FCellBlockData,UE::RendererPrivateUtils::Implementation::FStructuredBufferTraits>::ValidateGPUData<FSceneCullingBuilder::UploadToGPU’::51'::<lambda_1> >'::12’::<l() [D:\build++UE5\Sync\Engine\Source\Runtime\Renderer\Private\SceneRendering.cpp:5734]
UnrealEditor_RenderCore!FRenderCommandPipeRegistry::StopRecording'::2’::<lambda_1>::operator()() [D:\build++UE5\Sync\Engine\Source\Runtime\RenderCore\Private\RenderingThread.cpp:1541]
UnrealEditor_RenderCore!TGraphTask<TFunctionGraphTaskImpl<void __cdecl(void),1> >::ExecuteTask() [D:\build++UE5\Sync\Engine\Source\Runtime\Core\Public\Async\TaskGraphInterfaces.h:634]
UnrealEditor_Core!UE::Tasks::Private::FTaskBase::TryExecuteTask() [D:\build++UE5\Sync\Engine\Source\Runtime\Core\Public\Tasks\TaskPrivate.h:504]
UnrealEditor_Core!FNamedTaskThread::ProcessTasksNamedThread() [D:\build++UE5\Sync\Engine\Source\Runtime\Core\Private\Async\TaskGraph.cpp:779]
UnrealEditor_Core!FNamedTaskThread::ProcessTasksUntilQuit() [D:\build++UE5\Sync\Engine\Source\Runtime\Core\Private\Async\TaskGraph.cpp:668]
UnrealEditor_RenderCore!RenderingThreadMain() [D:\build++UE5\Sync\Engine\Source\Runtime\RenderCore\Private\RenderingThread.cpp:317]
UnrealEditor_RenderCore!FRenderingThread::Run() [D:\build++UE5\Sync\Engine\Source\Runtime\RenderCore\Private\RenderingThread.cpp:443]
UnrealEditor_Core!FRunnableThreadWin::Run() [D:\build++UE5\Sync\Engine\Source\Runtime\Core\Private\Windows\WindowsRunnableThread.cpp:159]

I tested with MegaLight by creating a new, completely empty project. As I suspected that Unreal’s own water bodies system could be causing the crash, I set up a new project with the following steps:

1 - I created a project with the GAMES" > “Blank” template.

2 - I created a level empty.

3 - I enabled the plugins: Water, Chaos Vahicles and Day Sequence.

4 - I added to the empty level: the lendscape (default size), the ocean water body and the Day sequence.

5 - I enabled Mega Lights and Shadows Ray Tracing.

6 - I placed only one point light in the scene.

7 - I started play, and at the same time the crash occurred:

LoginId:9a6bbc12425d311aaffc8190d4d9bf76.

EpicAccountId:2b3f513183a14cff82d9d68cd6941c47

Unhandled Exception: EXCEPTION_ACCESS_VIOLATION reading address 0x0000000000000008

UnrealEditor_Renderer

UnrealEditor_Renderer

UnrealEditor_Renderer

UnrealEditor_Renderer

UnrealEditor_Renderer

UnrealEditor_RenderCore

UnrealEditor_RenderCore

UnrealEditor_Core

UnrealEditor_Core

UnrealEditor_Core

UnrealEditor_RenderCore

UnrealEditor_RenderCore

UnrealEditor_Core

UnrealEditor_Core

kernel32

ntdll

I repeated this entire procedure using bodies of water from rivers and lakes, and the same crash also occurred with just one point light in the scene.

So, I believe that the body of water ocean, rivers and lakes could be responsible for this crash.

I would like the Unreal community to redo these tests and confirm the suspicion that the water bodies system is causing these crashes, reporting this problem to Unreal Engine. My intention is to contribute to the growth and improvement of the Unreal graphics engine, which is incredible.

1 Like

Yes, I think you have it.

After removing the Lake from my Level (Unreal native Water plugin), the level no longer crashes with megalights active.

So as it stands, using the Water plugin with Megalights appears to reliably cause a crash.

1 Like

Thanks for the repro steps. I tried them and it doesn’t crash anymore. I guess it’s one of the things we fixed recently and fix should be in the new hotfix.

This is fixed and fix will be included in the new hotfix.

3 Likes

We recently upgraded to UE5.5 to use MegaLights, but it crashes a lot. Everytime we change some video settings (like which upscaler we are using, scalability setting, etc…) the game crashes. This is what the log says:

[2024.12.04-10.41.38:317][326]LogWindows: Error: === Critical error: ===
[2024.12.04-10.41.38:317][326]LogWindows: Error: 
[2024.12.04-10.41.38:317][326]LogWindows: Error: Unhandled Exception: EXCEPTION_ACCESS_VIOLATION reading address 0x0000000000000008
[2024.12.04-10.41.38:317][326]LogWindows: Error: 
[2024.12.04-10.41.38:317][326]LogWindows: Error: [Callstack] 0x00007ffa13d61530 UnrealEditor-Renderer.dll!LightFunctionAtlas::BindGlobalParameters() [F:\UE5.5\UnrealEngine\Engine\Source\Runtime\Renderer\Private\LightFunctionAtlas.cpp:990]
[2024.12.04-10.41.38:317][326]LogWindows: Error: [Callstack] 0x00007ffa140d79c8 UnrealEditor-Renderer.dll!FDeferredShadingSceneRenderer::RenderMegaLights() [F:\UE5.5\UnrealEngine\Engine\Source\Runtime\Renderer\Private\MegaLights\MegaLights.cpp:1316]
[2024.12.04-10.41.38:317][326]LogWindows: Error: [Callstack] 0x00007ffa139ea229 UnrealEditor-Renderer.dll!FDeferredShadingSceneRenderer::Render() [F:\UE5.5\UnrealEngine\Engine\Source\Runtime\Renderer\Private\DeferredShadingRenderer.cpp:2845]
[2024.12.04-10.41.38:317][326]LogWindows: Error: [Callstack] 0x00007ffa147c1196 UnrealEditor-Renderer.dll!RenderViewFamilies_RenderThread() [F:\UE5.5\UnrealEngine\Engine\Source\Runtime\Renderer\Private\SceneRendering.cpp:5431]
[2024.12.04-10.41.38:317][326]LogWindows: Error: [Callstack] 0x00007ffa1477809a UnrealEditor-Renderer.dll!`FRendererModule::BeginRenderingViewFamilies'::`96'::<lambda_3>::operator()() [F:\UE5.5\UnrealEngine\Engine\Source\Runtime\Renderer\Private\SceneRendering.cpp:5734]
[2024.12.04-10.41.38:317][326]LogWindows: Error: [Callstack] 0x00007ffa2c977535 UnrealEditor-RenderCore.dll!`FRenderThreadCommandPipe::EnqueueAndLaunch'::`5'::<lambda_1>::operator()() [F:\UE5.5\UnrealEngine\Engine\Source\Runtime\RenderCore\Private\RenderingThread.cpp:1541]
[2024.12.04-10.41.38:317][326]LogWindows: Error: [Callstack] 0x00007ffa2c9a639f UnrealEditor-RenderCore.dll!TGraphTask<TFunctionGraphTaskImpl<void __cdecl(void),1> >::ExecuteTask() [F:\UE5.5\UnrealEngine\Engine\Source\Runtime\Core\Public\Async\TaskGraphInterfaces.h:634]
[2024.12.04-10.41.38:317][326]LogWindows: Error: [Callstack] 0x00007ffa28c12f92 UnrealEditor-Core.dll!UE::Tasks::Private::FTaskBase::TryExecuteTask() [F:\UE5.5\UnrealEngine\Engine\Source\Runtime\Core\Public\Tasks\TaskPrivate.h:504]
[2024.12.04-10.41.38:317][326]LogWindows: Error: [Callstack] 0x00007ffa28c08b5a UnrealEditor-Core.dll!FNamedTaskThread::ProcessTasksNamedThread() [F:\UE5.5\UnrealEngine\Engine\Source\Runtime\Core\Private\Async\TaskGraph.cpp:779]
[2024.12.04-10.41.38:317][326]LogWindows: Error: [Callstack] 0x00007ffa28c08ffe UnrealEditor-Core.dll!FNamedTaskThread::ProcessTasksUntilQuit() [F:\UE5.5\UnrealEngine\Engine\Source\Runtime\Core\Private\Async\TaskGraph.cpp:668]
[2024.12.04-10.41.38:317][326]LogWindows: Error: [Callstack] 0x00007ffa2c9c01cc UnrealEditor-RenderCore.dll!RenderingThreadMain() [F:\UE5.5\UnrealEngine\Engine\Source\Runtime\RenderCore\Private\RenderingThread.cpp:317]
[2024.12.04-10.41.38:317][326]LogWindows: Error: [Callstack] 0x00007ffa2c9c8a44 UnrealEditor-RenderCore.dll!FRenderingThread::Run() [F:\UE5.5\UnrealEngine\Engine\Source\Runtime\RenderCore\Private\RenderingThread.cpp:443]
[2024.12.04-10.41.38:317][326]LogWindows: Error: [Callstack] 0x00007ffa29248acd UnrealEditor-Core.dll!FRunnableThreadWin::Run() [F:\UE5.5\UnrealEngine\Engine\Source\Runtime\Core\Private\Windows\WindowsRunnableThread.cpp:159]
[2024.12.04-10.41.38:317][326]LogWindows: Error: [Callstack] 0x00007ffa2923f3cf UnrealEditor-Core.dll!FRunnableThreadWin::GuardedRun() [F:\UE5.5\UnrealEngine\Engine\Source\Runtime\Core\Private\Windows\WindowsRunnableThread.cpp:79]
[2024.12.04-10.41.38:317][326]LogWindows: Error: [Callstack] 0x00007ffaff597374 KERNEL32.DLL!UnknownFunction []

I’ve been trying to attach a debugger to this to investigate further but in the meantime i’ll leave this log here if it could be helpful to the devs

Yeah, crash with LightFunctionAtlas::BindGlobalParameters() was fixed recently and will be included in the new hotfix.

3 Likes

Thank you so much, any ETA for the hotfix?

Follow up question to megalights being enabled on older hardware like a 10 series GPU. Will the game crash or have less performance if I leave it on and someone doesn’t have a RTX GPU? That’s my main concern with it right now for a PC release of my game.

Thanks so much for the update, I’ll keep an eye out for the hotfix! :grin:

The only performant path of MegaLights right now depends on hardware ray-tracing, the answer is that it will definitely run worse. The VSM path has a per-light cost and wouldn’t scale the same.

okay, so basically for PC versions I need a setting to enable it or some people will run poorly. Good to know.