-
-
Notifications
You must be signed in to change notification settings - Fork 200
Closed
Labels
Description
Description
This issue was originally reported for Unreal SDK:
Customer integrated FAB version of the plugin (0.21.1) which uses sentry-native with breakpad internally on Windows. When the game build is placed in a directory with a long path a crash occurs during SDK initialization. This behavior is likely caused by a buffer overflow (MAX_PATH is 260) in this section of breakpad’s code
While the latest Unreal plugin version now uses only Crashpad on Windows, Breakpad is still used on Xbox where this could potentially become a problem in the future.
When does the problem happen
- During build
- During run-time
- When capturing a hard crash
Environment
- OS: Windows
- Native SDK 0.7.16
- SENTRY_BACKEND=breakpad
Steps To Reproduce
- Use long string to configure database path via
sentry_options_set_database_path, e.g:
D:\twin_apps\applications\qa\d82f49c8-42fe-4e64-b962-09965c408faa\f92d3ddd-10ca-4f73-a9e1-6f551cde3ed8\00e4764d-67cb-4f5e-8562-814a4cf2ddd2\333e32d1-7de2-47b0-82af-7724af5ba27a\bin\Windows\TestLongPath\.sentry-native
- Call
sentry-init
Expected result:
- SDK initializes successfully.
Actual result:
- SDK crashes with the following output:
2025.10.10-07.20.54:340][ 0]LogSentrySdk: Sentry plugin auto initialization: true
[2025.10.10-07.20.54:341][ 0]LogSentrySdk: using database path "D:\twin_apps\applications\qa\d82f49c8-42fe-4e64-b962-09965c408faa\f92d3ddd-10ca-4f73-a9e1-6f551cde3ed8\00e4764d-67cb-4f5e-8562-814a4cf2ddd2\333e32d1-7de2-47b0-82af-7724af5ba27a\bin\Windows\TestLongPath\.sentry-native"
[2025.10.10-07.20.54:341][ 0]LogSentrySdk: Verbose: starting transport
[2025.10.10-07.20.54:343][ 0]LogSentrySdk: Verbose: starting background worker thread
[2025.10.10-07.20.54:343][ 0]LogSentrySdk: Verbose: starting backend
[2025.10.10-07.20.54:343][ 0]LogSentrySdk: Verbose: background worker thread started
[2025.10.10-07.20.54:343][ 0]LogWindows: Error: appError called: Fatal error: [File:D:\build\++UE5\Sync\Engine\Source\Runtime\Launch\Private\Windows\LaunchWindows.cpp] [Line: 72]
SECURE CRT: Invalid parameter detected.
Expression: Unknown Function: Unknown. File: Unknown Line: 0
[2025.10.10-07.20.54:343][ 0]LogWindows: Windows GetLastError: The operation completed successfully. (0)
[2025.10.10-07.21.05:976][ 0]LogWindows: Could not start crash report client using ../../../Engine/Binaries/Win64/CrashReportClient-Win64-Debug.exe
[2025.10.10-07.21.05:977][ 0]LogMemory: Platform Memory Stats for Windows
[2025.10.10-07.21.05:977][ 0]LogMemory: Process Physical Memory: 576.44 MB used, 601.59 MB peak
[2025.10.10-07.21.05:977][ 0]LogMemory: Process Virtual Memory: 741.76 MB used, 767.84 MB peak
[2025.10.10-07.21.05:977][ 0]LogMemory: Physical Memory: 28283.82 MB used, 36960.46 MB free, 65244.29 MB total
[2025.10.10-07.21.05:977][ 0]LogMemory: Virtual Memory: 39435.75 MB used, 40144.54 MB free, 79580.28 MB total
[2025.10.10-07.21.05:977][ 0]Message dialog closed, result: Ok, title: The UE-TestLongPath Game has crashed and will close, text: Fatal error: [File:D:\build\++UE5\Sync\Engine\Source\Runtime\Launch\Private\Windows\LaunchWindows.cpp] [Line: 72]
SECURE CRT: Invalid parameter detected.
Expression: Unknown Function: Unknown. File: Unknown Line: 0
[2025.10.10-07.21.05:977][ 0]LogWindows: Error: === Critical error: ===
[2025.10.10-07.21.05:977][ 0]LogWindows: Error:
[2025.10.10-07.21.05:977][ 0]LogWindows: Error: Fatal error: [File:D:\build\++UE5\Sync\Engine\Source\Runtime\Launch\Private\Windows\LaunchWindows.cpp] [Line: 72]
[2025.10.10-07.21.05:977][ 0]LogWindows: Error: SECURE CRT: Invalid parameter detected.
[2025.10.10-07.21.05:977][ 0]LogWindows: Error: Expression: Unknown Function: Unknown. File: Unknown Line: 0
[2025.10.10-07.21.05:977][ 0]LogWindows: Error:
[2025.10.10-07.21.05:977][ 0]LogWindows: Error:
[2025.10.10-07.21.05:977][ 0]LogWindows: Error:
[2025.10.10-07.21.05:977][ 0]LogWindows: Error: [Callstack] 0x00007ff762427ab9 TestLongPath.exe!InvalidParameterHandler() []
[2025.10.10-07.21.05:977][ 0]LogWindows: Error: [Callstack] 0x00007ffa1091de76 ucrtbase.dll!UnknownFunction []
[2025.10.10-07.21.05:977][ 0]LogWindows: Error: [Callstack] 0x00007ffa109203ec ucrtbase.dll!UnknownFunction []
[2025.10.10-07.21.05:977][ 0]LogWindows: Error: [Callstack] 0x00007ff765908c85 TestLongPath.exe!swprintf_s() []
[2025.10.10-07.21.05:977][ 0]LogWindows: Error: [Callstack] 0x00007ff765908341 TestLongPath.exe!google_breakpad::ExceptionHandler::UpdateNextID() []
[2025.10.10-07.21.05:977][ 0]LogWindows: Error: [Callstack] 0x00007ff765907efb TestLongPath.exe!google_breakpad::ExceptionHandler::Initialize() []
[2025.10.10-07.21.05:977][ 0]LogWindows: Error: [Callstack] 0x00007ff765906f30 TestLongPath.exe!google_breakpad::ExceptionHandler::ExceptionHandler() []
[2025.10.10-07.21.05:977][ 0]LogWindows: Error: [Callstack] 0x00007ff765903674 TestLongPath.exe!sentry__backend_free() []
[2025.10.10-07.21.05:977][ 0]LogWindows: Error: [Callstack] 0x00007ff7658f264a TestLongPath.exe!sentry_init() []
[2025.10.10-07.21.05:977][ 0]LogWindows: Error: [Callstack] 0x00007ff762453525 TestLongPath.exe!SentrySubsystemDesktop::InitWithSettings() [C:\Users\tusta\Desktop\TestLongPath\Plugins\Sentry_5.3_FAB\Source\Sentry\Private\Desktop\SentrySubsystemDesktop.cpp:280]
[2025.10.10-07.21.05:977][ 0]LogWindows: Error: [Callstack] 0x00007ff762470db5 TestLongPath.exe!USentrySubsystem::Initialize() [C:\Users\tusta\Desktop\TestLongPath\Plugins\Sentry_5.3_FAB\Source\Sentry\Private\SentrySubsystem.cpp:118]
[2025.10.10-07.21.05:977][ 0]LogWindows: Error: [Callstack] 0x00007ff762471225 TestLongPath.exe!USentrySubsystem::Initialize() [C:\Users\tusta\Desktop\TestLongPath\Plugins\Sentry_5.3_FAB\Source\Sentry\Private\SentrySubsystem.cpp:59]
[2025.10.10-07.21.05:977][ 0]LogWindows: Error: [Callstack] 0x00007ff761afc3a9 TestLongPath.exe!FSubsystemCollectionBase::AddAndInitializeSubsystem() []
[2025.10.10-07.21.05:977][ 0]LogWindows: Error: [Callstack] 0x00007ff761b3269e TestLongPath.exe!FSubsystemCollectionBase::Initialize() []
[2025.10.10-07.21.05:977][ 0]LogWindows: Error: [Callstack] 0x00007ff761c2380a TestLongPath.exe!UEngine::Init() []
[2025.10.10-07.21.05:977][ 0]LogWindows: Error: [Callstack] 0x00007ff760e14b35 TestLongPath.exe!UGameEngine::Init() []
[2025.10.10-07.21.05:977][ 0]LogWindows: Error: [Callstack] 0x00007ff76240a688 TestLongPath.exe!FEngineLoop::Init() []
[2025.10.10-07.21.05:977][ 0]LogWindows: Error: [Callstack] 0x00007ff7624274a6 TestLongPath.exe!GuardedMain() []
[2025.10.10-07.21.05:977][ 0]LogWindows: Error: [Callstack] 0x00007ff76242769a TestLongPath.exe!GuardedMainWrapper() []
[2025.10.10-07.21.05:977][ 0]LogWindows: Error: [Callstack] 0x00007ff76242a546 TestLongPath.exe!LaunchWindowsStartup() []
[2025.10.10-07.21.05:977][ 0]LogWindows: Error: [Callstack] 0x00007ff76243a134 TestLongPath.exe!WinMain() []
[2025.10.10-07.21.05:977][ 0]LogWindows: Error: [Callstack] 0x00007ff765a461fa TestLongPath.exe!__scrt_common_main_seh() [D:\a\_work\1\s\src\vctools\crt\vcstartup\src\startup\exe_common.inl:288]
[2025.10.10-07.21.05:977][ 0]LogWindows: Error: [Callstack] 0x00007ffa10fbe8d7 KERNEL32.DLL!UnknownFunction []
[2025.10.10-07.21.05:977][ 0]LogWindows: Error:
[2025.10.10-07.21.05:979][ 0]LogExit: Executing StaticShutdownAfterError
[2025.10.10-07.21.05:979][ 0]LogWindows: FPlatformMisc::RequestExit(1, LaunchWindowsStartup.ExceptionHandler)
[2025.10.10-07.21.05:979][ 0]LogWindows: FPlatformMisc::RequestExitWithStatus(1, 3, LaunchWindowsStartup.ExceptionHandler)
[2025.10.10-07.21.05:979][ 0]LogCore: Engine exit requested (reason: Win RequestExit)