Search Issue Tracker

Fixed in 2020.2.X

Fixed in 2019.4.X, 2020.1.X

Votes

0

Found in

Issue ID

1254442

Regression

No

Crash caused by the profiler history size stored in the registry

Profiling

-

I somehow got into a situation where trying to open any Unity project would crash immediately with:
received signal from system: SIGSEGV
Stack trace:
0x00007ff618eeff28 (Unity) [StackWalker.cpp:961] StackWalker::GetCurrentCallstack
0x00007ff618efcf22 (Unity) [StackWalker.cpp:939] StackWalker::ShowCallstack
0x00007ff61c14e7df (Unity) [Stacktrace.cpp:142] GetStacktrace
0x00007ff618ef9750 (Unity) [CrashHandler.cpp:26] winutils::PrintStackTrace
0x00007ff618eee3a5 (Unity) [CrashHandler.cpp:100] winutils::CrashHandler::DefaultSignalHandler
0x00007ff621202163 (Unity) seh_filter_exe
0x00007ff62291af98 (Unity) _longjmp_internal
0x00007ff6211140eb (Unity) _C_specific_handler
0x00007ff8048011ff (ntdll) _chkstk
0x00007ff8047ca289 (ntdll) RtlRaiseException
0x00007ff8047ffe6e (ntdll) KiUserExceptionDispatcher
0x00007ff6166e081f (Unity) [DynamicHeapAllocator.cpp:255] DynamicHeapAllocator::InitializeMemoryBlock
0x00007ff6166e23f7 (Unity) [DynamicHeapAllocator.cpp:207] DynamicHeapAllocator::RequestLargeAllocMemory
0x00007ff6166dac15 (Unity) [DynamicHeapAllocator.cpp:475] DynamicHeapAllocator::Allocate
0x00007ff61668f38d (Unity) [MemoryManager.cpp:1634] MemoryManager::Allocate
0x00007ff6166b3981 (Unity) [MemoryManager.cpp:352] malloc_internal
0x00007ff618310920 (Unity) [dynamic_array.cpp:17] dynamic_array_detail::dynamic_array_data::reserve
0x00007ff61ce3b212 (Unity) [ProfilerHistory.cpp:36] ProfilerHistory::ProfilerHistory
0x00007ff61ce706e4 (Unity) [ProfilerSession.cpp:47] profiling::ProfilerSession::ProfilerSession
0x00007ff61ce7729a (Unity) [ProfilerSession.cpp:63] profiling::ProfilerSession::Initialize
0x00007ff617abbce1 (Unity) [Profiler.cpp:197] profiler_initialize
0x00007ff617ab5773 (Unity) [Profiler.cpp:49] StaticInitializeProfiler
0x00007ff618218e31 (Unity) [RegisterRuntimeInitializeAndCleanup.cpp:70] RegisterRuntimeInitializeAndCleanup::ExecuteInitializations
0x00007ff6179eb12c (Unity) [Player.cpp:642] RuntimeInitialize
0x00007ff61c16935a (Unity) [WinEditorMain.cpp:798] WinMain
0x00007ff62108e832 (Unity) _isa_available_init
0x00007ff62108e71e (Unity) _isa_available_init
0x00007ff62108e5de (Unity) _isa_available_init
0x00007ff62108e8c9 (Unity) WinMainCRTStartup
0x00007ff8045c7bd4 (KERNEL32) BaseThreadInitThunk
0x00007ff8047cced1 (ntdll) RtlUserThreadStart

I tried restarting my computer, cleaning up my temp directory, killing any other running processes, etc. and nothing. Every Unity version I have on my machine fails to open and crashes immediately with that callstack even before Editor.log is created.

Update: this happened after calling ProfilerUserSettings.set_frameCount with a very large value, which saves that value to a registry key that seems to be shared across all Unity versions.

Add comment

Log in to post comment

All about bugs

View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.