Skip to content

Memory allocation exception in Unreal editor during crash handling screenshot capture #895

Closed
@nwhite-riot

Description

@nwhite-riot

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.

[Inline Frame] UnrealEditor-Core.dll!_mi_page_malloc(mi_heap_s *) Line 33	C
UnrealEditor-Core.dll!_mi_malloc_generic(mi_heap_s * heap, unsigned __int64 size) Line 875	C
UnrealEditor-Core.dll!_mi_heap_malloc_zero(mi_heap_s * heap, unsigned __int64 size, bool zero) Line 148	C
UnrealEditor-Core.dll!mi_heap_malloc_zero_aligned_at(mi_heap_s * const heap, const unsigned __int64 size, const unsigned __int64 alignment, const unsigned __int64 offset, const bool zero) Line 47	C
[Inline Frame] UnrealEditor-Core.dll!mi_heap_malloc_aligned_at(mi_heap_s *) Line 66	C
[Inline Frame] UnrealEditor-Core.dll!mi_heap_malloc_aligned(mi_heap_s *) Line 70	C
UnrealEditor-Core.dll!mi_malloc_aligned(unsigned __int64 size, unsigned __int64 alignment) Line 97	C
[Inline Frame] UnrealEditor-Core.dll!FMallocMimalloc::TryMalloc(unsigned __int64 Alignment, unsigned int) Line 83	C++
UnrealEditor-Core.dll!FMallocMimalloc::Malloc(unsigned __int64 Size, unsigned int Alignment) Line 90	C++
[Inline Frame] UnrealEditor-Core.dll!FLowLevelMemTracker::IsEnabled() Line 1086	C++
UnrealEditor-Core.dll!FMemory::Malloc(unsigned __int64 Count, unsigned int Alignment) Line 27	C++
UnrealEditor-ImageWrapper.dll!png_malloc(png_struct_def * png_ptr, unsigned __int64 size) Line 503	C
UnrealEditor-ImageWrapper.dll!png_zalloc(void * png_ptr, unsigned int items, unsigned int size) Line 92	C
UnrealEditor-ImageWrapper.dll!deflateInit2_()	C
UnrealEditor-ImageWrapper.dll!png_write_IHDR(png_struct_def * png_ptr, unsigned int width, unsigned int height, int bit_depth, int color_type, int compression_type, int filter_type, int interlace_type) Line 659	C
UnrealEditor-ImageWrapper.dll!png_write_info_before_PLTE(png_struct_def * png_ptr, png_info_def * info_ptr) Line 62	C
UnrealEditor-ImageWrapper.dll!png_write_info(png_struct_def * png_ptr, png_info_def * info_ptr) Line 133	C
UnrealEditor-ImageWrapper.dll!png_write_png(png_struct_def * png_ptr, png_info_def * info_ptr, int transforms, void * params) Line 1534	C
UnrealEditor-ImageWrapper.dll!FPngImageWrapper::Compress(int Quality) Line 257	C++
UnrealEditor-ImageWrapper.dll!FImageWrapperBase::GetCompressed(int Quality) Line 49	C++
UnrealEditor-ImageWrapper.dll!FImageWrapperModule::CompressImage(TArray<unsigned char,TSizedDefaultAllocator<64>> & OutData, EImageFormat ToFormat, const FImageView & InImage, int Quality) Line 478	C++
[Inline Frame] UnrealEditor-Engine.dll!FImageUtils::CompressImage(TArray<unsigned char,TSizedDefaultAllocator<64>> &) Line 156	C++
UnrealEditor-Engine.dll!FImageUtils::PNGCompressImageArray(int ImageWidth, int ImageHeight, const TArrayView<FColor const ,__int64> & SrcData, TArray<unsigned char,TSizedDefaultAllocator<64>> & DstData) Line 1032	C++
UnrealEditor-Sentry.dll!SentryScreenshotUtils::CaptureScreenshot(const FString & ScreenshotSavePath) Line 67	C++
UnrealEditor-Sentry.dll!FGenericPlatformSentrySubsystem::TryCaptureScreenshot() Line 581	C++
UnrealEditor-Sentry.dll!FGenericPlatformSentrySubsystem::OnCrash(const sentry_ucontext_s * uctx, sentry_value_u event, void * closure) Line 127	C++
UnrealEditor-Sentry.dll!FWindowsSentrySubsystem::OnCrash(const sentry_ucontext_s * uctx, sentry_value_u event, void * closure) Line 53	C++
UnrealEditor-Sentry.dll!FGenericPlatformSentrySubsystem::HandleOnCrash(const sentry_ucontext_s * uctx, sentry_value_u event, void * closure) Line 84	C++
UnrealEditor-Sentry.dll!sentry__backend_new()	Unknown
UnrealEditor-Sentry.dll!crashpad::CrashpadClient::StartHandler(class base::FilePath const &,class base::FilePath const &,class base::FilePath const &,class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &,class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &,class std::map<class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >,class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >,struct std::less<class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > >,class std::allocator<struct std::pair<class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const ,class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > > > > const &,class std::vector<class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >,class std::allocator<class std::basic_string<char,struct std::char	Unknown

Metadata

Metadata

Assignees

No one assigned

    Labels

    BugSomething isn't working

    Type

    Projects

    Status

    Done

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions