EXCEPTION_STACK_OVERFLOW error occurs on startup. How to solve this?

I am using Unreal engine 5.2.1. I have face these error over two weeks. I think its happen because of too much size of widgets. I have 454 Widgets on my project. When I delete some widgets, it works fine. Blueprints are not corrupted. I have no any loop on my blueprints. Is there any solution for this problem? Any way to increase allocated memory? Please help me fast as you can. Because this is very urgent project.

Thank you!!!

You can increase the stack size of a binary either as a build setting (requires custom build of UE) or by using the editbin tool that comes with Visual Studio. First figure out what the current stack size in your build, then increase it with the tool.

From your description this sounds like your widgets/blueprints have too deep of a dependency/reference chain. Somewhere in the loading code there’s a recursive call to load referenced packages (and its referenced packages and so on). So as soon as your project opens again I’d recommend you take a look at the reference viewer and try to reduce some dependencies.

1 Like

Yeah. The widget blueprints each one has atleast one reference. I can’t reduce reference node because they are important.

I am not a full time developer. Can you explain more about editbin tool?or video some article showing how to increase the stack size that will be helpful.

It’s pretty straight forward. After installing Visual Studio there should be a Developer Command Prompt for VS <Version> in your start menu. Run it and in the new window do the following:

  • Find the previous stack sizes, note that the values are in hexadecimal dumpbin /HEADERS <Path/To/Unreal.exe>
         2DC6C00 size of stack reserve
            1000 size of stack commit
  • Change the stack size, note that the values are regular decimal numbers (NOT hexadecimal!). For example to double the stack size in my example editbin /STACK:96000000 <Path/To/Unreal.exe>
  • Finally you can reset the stack size back to the old value the same way editbin /STACK:48000000 <Path/To/Unreal.exe>

Read the official documentation if you want to know more:

1 Like

Thank You for your help. But I got this error when I input this Command.

Could you help me?

Are you sure the path is correct? The _ in Program_Files looks wrong. If you have spaces in your path (as Program Files usually does) you need to put quotes around the entire path. dumpbin /HEADERS "C:\Program Files\Path to Unreal.exe"

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.