How to reproduce:
1. Open the attached “EditorWindowCrash 2022.2.zip” Project
2. Open the “Test” Drop-down tab from the Tool Bar and press on the “OpenTestWindow” button
3. Press the “menu to crash” button and press the “open crash window #” button in order (e.g: 1 → 2 → 3)
4. Press the “open crash window 3” button
Expected result: The "Test" window opens
Actual result: The Editor crashes
Reproducible with: 2022.2.4f1, 2022.3.2f1
Not reproducible with: 2021.3.27f1, 2022.2.3f1, 2023.1.0f1, 2023.2.0a9
Reproducible on: Windows 10
Not reproducible on: macOS Ventura 13.4 (Intel)
Notes: If the issue does not reproduce, repeat step 4
First few lines of the Stack Trace:
{{0x00007FF6E5EA1385 (Unity) GUIView::OnInputEvent }}
{{0x00007FF6E58DC2C3 (Unity) GUIView::ProcessInputEventFromAPI }}
{{0x00007FF6E58DC198 (Unity) GUIView::ProcessInputEvent }}
{{0x00007FF6E5E9A2CC (Unity) GUIView::DoPaint }}
0x00007FF6E5EA327C (Unity) GUIView::RepaintViews
0x00007FF6E5E9BAA1 (Unity) GUIView::GUIViewWndProc
{{0x00007FF8E0B7E858 (USER32) CallWindowProcW }}
{{0x00007FF8E0B7E3DC (USER32) DispatchMessageW }}
{{0x00007FF8E0B90C33 (USER32) SendMessageTimeoutW }}
0x00007FF8E1AD0EB4 (ntdll) KiUserCallbackDispatcher