Repository: godot
Issue: Arbitrary crashes (seemingly) due to Point2i method [Linux]
Labels: bug,platform:linuxbsd,topic:porting,confirmed

### Godot version

Godot Engine v4.1.stable.official.970459615

### System information

Godot v4.1.stable - Arch Linux #1 SMP PREEMPT_DYNAMIC Wed, 13 Sep 2023 08:37:40 +0000 - Vulkan (Compatibility) - NVIDIA GeForce GTX 1050 Ti (nvidia; 535.104.05) - Intel(R) Core(TM) i7-7700T CPU @ 2.90GHz (8 Threads)

### Issue description

At least when using the debug mode (play the scene by pressing F5; no exported project), the scene seems to crash randomly even when there is no interaction with the window. Most recently, the window closed/crashed when I was on the phone and didn’t do anything that I am aware of. As I have encountered this issue multiple times during the recent maybe two weeks, I have started Godot with the terminal and can provide a crash log:
```
ERROR: Unhandled XServer error: BadImplementation (server does not implement operation)
   Major opcode of failed request: 20
   Serial number of failed request: 0
   Current serial number in output stream: 199394
   at: default_window_error_handler (platform/linuxbsd/x11/display_server_x11.cpp:869)
ERROR: Unhandled XServer error: BadImplementation (server does not implement operation)
   Major opcode of failed request: 20
   Serial number of failed request: 0
   Current serial number in output stream: 199399
   at: default_window_error_handler (platform/linuxbsd/x11/display_server_x11.cpp:869)
ERROR: Unhandled XServer error: BadImplementation (server does not implement operation)
   Major opcode of failed request: 20
   Serial number of failed request: 0
   Current serial number in output stream: 199404
   at: default_window_error_handler (platform/linuxbsd/x11/display_server_x11.cpp:869)
ERROR: Unhandled XServer error: BadImplementation (server does not implement operation)
   Major opcode of failed request: 20
   Serial number of failed request: 0
   Current serial number in output stream: 199409
   at: default_window_error_handler (platform/linuxbsd/x11/display_server_x11.cpp:869)
ERROR: Unhandled XServer error: BadImplementation (server does not implement operation)
   Major opcode of failed request: 20
   Serial number of failed request: 0
   Current serial number in output stream: 199414
   at: default_window_error_handler (platform/linuxbsd/x11/display_server_x11.cpp:869)
ERROR: Unhandled XServer error: BadImplementation (server does not implement operation)
   Major opcode of failed request: 20
   Serial number of failed request: 0
   Current serial number in output stream: 199419
   at: default_window_error_handler (platform/linuxbsd/x11/display_server_x11.cpp:869)
ERROR: Unhandled XServer error: BadImplementation (server does not implement operation)
   Major opcode of failed request: 20
   Serial number of failed request: 0
   Current serial number in output stream: 199424
   at: default_window_error_handler (platform/linuxbsd/x11/display_server_x11.cpp:869)
ERROR: Unhandled XServer error: BadImplementation (server does not implement operation)
   Major opcode of failed request: 20
   Serial number of failed request: 0
   Current serial number in output stream: 199429
   at: default_window_error_handler (platform/linuxbsd/x11/display_server_x11.cpp:869)
ERROR: Unhandled XServer error: BadImplementation (server does not implement operation)
   Major opcode of failed request: 20
   Serial number of failed request: 0
   Current serial number in output stream: 199434
   at: default_window_error_handler (platform/linuxbsd/x11/display_server_x11.cpp:869)
ERROR: Unhandled XServer error: BadImplementation (server does not implement operation)
   Major opcode of failed request: 20
   Serial number of failed request: 0
   Current serial number in output stream: 199439
   at: default_window_error_handler (platform/linuxbsd/x11/display_server_x11.cpp:869)
ERROR: Unhandled XServer error: BadImplementation (server does not implement operation)
   Major opcode of failed request: 20
   Serial number of failed request: 0
   Current serial number in output stream: 199444
   at: default_window_error_handler (platform/linuxbsd/x11/display_server_x11.cpp:869)
ERROR: Unhandled XServer error: BadImplementation (server does not implement operation)
   Major opcode of failed request: 20
   Serial number of failed request: 0
   Current serial number in output stream: 199449
   at: default_window_error_handler (platform/linuxbsd/x11/display_server_x11.cpp:869)
ERROR: Unhandled XServer error: BadImplementation (server does not implement operation)
   Major opcode of failed request: 20
   Serial number of failed request: 0
   Current serial number in output stream: 199454
   at: default_window_error_handler (platform/linuxbsd/x11/display_server_x11.cpp:869)
ERROR: Unhandled XServer error: BadImplementation (server does not implement operation)
   Major opcode of failed request: 20
   Serial number of failed request: 0
   Current serial number in output stream: 199459
   at: default_window_error_handler (platform/linuxbsd/x11/display_server_x11.cpp:869)
ERROR: Unhandled XServer error: BadImplementation (server does not implement operation)
   Major opcode of failed request: 20
   Serial number of failed request: 0
   Current serial number in output stream: 199464
   at: default_window_error_handler (platform/linuxbsd/x11/display_server_x11.cpp:869)
ERROR: Unhandled XServer error: BadImplementation (server does not implement operation)
   Major opcode of failed request: 20
   Serial number of failed request: 0
   Current serial number in output stream: 199469
   at: default_window_error_handler (platform/linuxbsd/x11/display_server_x11.cpp:869)
ERROR: Unhandled XServer error: BadImplementation (server does not implement operation)
   Major opcode of failed request: 20
   Serial number of failed request: 0
   Current serial number in output stream: 199474
   at: default_window_error_handler (platform/linuxbsd/x11/display_server_x11.cpp:869)
X connection to :0.0 broken (explicit kill or server shutdown).
ERROR: BUG: Unreferenced static string to 0: Physics2DConstraintSolveIslands
   at: unref (core/string/string_name.cpp:129)
ERROR: BUG: Unreferenced static string to 0: Physics2DConstraintSetup
   at: unref (core/string/string_name.cpp:129)
ERROR: BUG: Unreferenced static string to 0: Physics3DConstraintSolveIslands
   at: unref (core/string/string_name.cpp:129)
ERROR: BUG: Unreferenced static string to 0: Physics3DConstraintSetup
   at: unref (core/string/string_name.cpp:129)
ERROR: BUG: Unreferenced static string to 0: Variant
   at: unref (core/string/string_name.cpp:129)
ERROR: Pages in use exist at exit in PagedAllocator: N7Variant5Pools11BucketLargeE
   at: ~PagedAllocator (./core/templates/paged_allocator.h:170)
ERROR: Pages in use exist at exit in PagedAllocator: N7Variant5Pools12BucketMediumE
   at: ~PagedAllocator (./core/templates/paged_allocator.h:170)
ERROR: Pages in use exist at exit in PagedAllocator: N7Variant5Pools11BucketSmallE
   at: ~PagedAllocator (./core/templates/paged_allocator.h:170)
ERROR: BUG: Unreferenced static string to 0: GodotPhysicsDirectSpaceState2D
   at: unref (core/string/string_name.cpp:131)
ERROR: BUG: Unreferenced static string to 0: GodotPhysicsDirectSpaceState3D
   at: unref (core/string/string_name.cpp:131)
ERROR: BUG: Unreferenced static string to 0: interface_added
   at: unref (core/string/string_name.cpp:131)
ERROR: BUG: Unreferenced static string to 0: frame_pre_draw
   at: unref (core/string/string_name.cpp:131)
ERROR: BUG: Unreferenced static string to 0: frame_post_draw
   at: unref (core/string/string_name.cpp:131)
ERROR: BUG: Unreferenced static string to 0: SceneReplicationInterface
   at: unref (core/string/string_name.cpp:131)
ERROR: BUG: Unreferenced static string to 0: process_frame
   at: unref (core/string/string_name.cpp:131)
ERROR: BUG: Unreferenced static string to 0: physics_frame
   at: unref (core/string/string_name.cpp:131)
ERROR: BUG: Unreferenced static string to 0: joy_connection_changed
   at: unref (core/string/string_name.cpp:131)
ERROR: BUG: Unreferenced static string to 0: bus_layout_changed
   at: unref (core/string/string_name.cpp:131)
ERROR: BUG: Unreferenced static string to 0: SceneCacheInterface
   at: unref (core/string/string_name.cpp:131)
ERROR: BUG: Unreferenced static string to 0: SceneRPCInterface
   at: unref (core/string/string_name.cpp:131)
ERROR: BUG: Unreferenced static string to 0: fallback_changed
   at: unref (core/string/string_name.cpp:131)
ERROR: BUG: Unreferenced static string to 0: child_entered_tree
   at: unref (core/string/string_name.cpp:131)
```
Before I encountered this issue the first time, I did a full system update, including graphics card drivers, of course, and switched to the most recent Godot version (I have used 4.0 before), so I can’t exclude a graphics driver issue here that is not handled by Godot. I hope that the method `Point2i` pinpointed by the log above will narrow it down enough to find the reason.

### Steps to reproduce

None, unfortunately. Seems to happen randomly and without doing anything.

### Minimal reproduction project

None.