-
-
Notifications
You must be signed in to change notification settings - Fork 46
Memory allocation exception in Unreal editor during crash handling screenshot capture #895
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
I expect we should allocate memory for the image buffer at startup so we're not trying to allocate during a crash |
Do you have any additional information about the screen resolution, etc. on the machine where this behavior occurs? I wasn’t able to reproduce it on a 4K screen and am just trying to understand the constraints on memory allocation during crash handling |
I don't think it's 100% repro, but I was running |
In general, we should avoid any memory allocations during crash handling |
Alright, based on our previous findings (#410) the solution here could be simply moving image buffers to heap instead allocating them on stack. Basically, whenever the crash handler gets called a special stack for it is allocated in the heap. This allows crash handler to operate even when the crashing game ran out of stack space. The problem with this approach is that if the image buffer for screenshot is allocated on stack within the stack of a crash handler it can easily overflow it and overwrite some heap variables which may eventually lead to another crash. @nwhite-riot Can you please give it another shot with the change suggested in #900? |
It seems like a crash in the editor that attempts to capture a screenshot will cause a memory allocation exception/secondary crash to occur due to screenshot being generated.
The text was updated successfully, but these errors were encountered: