Repository: godot
Issue: Android editor crash when interacting with some GUI elements
Labels: bug,platform:android,topic:rendering,crash,regression

### Tested versions

Reproducible: Latest master v4.3.rc.custom_build.e343dbbcc, 4.3 betas 1, 2 and 3.

### System information

Godot v4.3.rc (e343dbbcc) - Android - Vulkan (Mobile) - integrated Adreno (TM) 506 -  (8 Threads)

### Issue description

Android editor crashes with a signal 11 after simple intereactions, only happens in vulkan mobile render, compatibility render works normally:

<details><summary>Example 1</summary>

https://github.com/user-attachments/assets/19ae6608-1775-43d4-8f91-9ab2b86bcd5b


</details>

<details><summary>Example 2</summary>

https://github.com/user-attachments/assets/37c173c5-1701-4627-b223-f46c35cb60e2


</details>

<details><summary>Example 3</summary>

https://github.com/user-attachments/assets/7f4ec07a-30f9-4ba0-9b56-ee8af684932c


</details>

<details><summary>Backtrace</summary>

```
07-25 10:55:47.602  9029  9066 F libc    : Fatal signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 0x0 in tid 9066 (VkThread), pid 9029 (e.editor.v4.dev)
07-25 10:55:48.067  9124  9124 F DEBUG   : *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
07-25 10:55:48.067  9124  9124 F DEBUG   : Build fingerprint: 'xiaomi/onc/onc:10/QKQ1.191008.001/V11.0.2.0.QFLMIXM:user/release-keys'
07-25 10:55:48.067  9124  9124 F DEBUG   : Revision: '0'
07-25 10:55:48.067  9124  9124 F DEBUG   : ABI: 'arm64'
07-25 10:55:48.084  9124  9124 F DEBUG   : Timestamp: 2024-07-25 10:55:48-0300
07-25 10:55:48.084  9124  9124 F DEBUG   : pid: 9029, tid: 9066, name: VkThread  >>> org.godotengine.editor.v4.dev <<<
07-25 10:55:48.084  9124  9124 F DEBUG   : uid: 10420
07-25 10:55:48.085  9124  9124 F DEBUG   : signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 0x0
07-25 10:55:48.085  9124  9124 F DEBUG   : Cause: null pointer dereference
07-25 10:55:48.085  9124  9124 F DEBUG   :     x0  0000000000000000  x1  0000000000000003  x2  0000007bc22b8800  x3  0000007ba0f10320
07-25 10:55:48.085  9124  9124 F DEBUG   :     x4  0000007bc22f1c00  x5  0000000000000000  x6  0000000000000000  x7  0000000000000001
07-25 10:55:48.085  9124  9124 F DEBUG   :     x8  0000000000000002  x9  0000000000000001  x10 0000000000000001  x11 0000000000000004
07-25 10:55:48.085  9124  9124 F DEBUG   :     x12 0000007bc3125370  x13 0000000000000000  x14 0000000000000000  x15 0000000000000002
07-25 10:55:48.085  9124  9124 F DEBUG   :     x16 0000007bc2c61ef8  x17 0000007bc312b000  x18 0000007bc838a000  x19 0000007bc312b000
07-25 10:55:48.085  9124  9124 F DEBUG   :     x20 0000007bc22b8800  x21 0000007bdbe35710  x22 0000000000000000  x23 0000007bdbe35410
07-25 10:55:48.085  9124  9124 F DEBUG   :     x24 0000000000000001  x25 0000007bb7b50e00  x26 0000000000000028  x27 0000007bc304c020
07-25 10:55:48.085  9124  9124 F DEBUG   :     x28 0000000000000000  x29 0000007bdbe38570
07-25 10:55:48.085  9124  9124 F DEBUG   :     sp  0000007bdbe34af0  lr  0000007bdbe35410  pc  0000007bc2951004
07-25 10:55:48.463  9124  9124 F DEBUG   :
07-25 10:55:48.463  9124  9124 F DEBUG   : backtrace:
07-25 10:55:48.464  9124  9124 F DEBUG   :       #00 pc 00000000000f5004  /vendor/lib64/hw/vulkan.msm8953.so (BuildId: 405d74bc1d0a34bd6c1cf5bd55b5d33a)
07-25 10:55:48.464  9124  9124 F DEBUG   :       #01 pc 00000000000a0468  /vendor/lib64/hw/vulkan.msm8953.so (qglinternal::vkCmdDrawIndexed(VkCommandBuffer_T*, unsigned int, unsigned int, unsigned int, int, unsigned int)+232) (BuildId: 405d74bc1d0a34bd6c1cf5bd55b5d33a)
07-25 10:55:48.464  9124  9124 F DEBUG   :       #02 pc 0000000003d8bdfc  /data/app/org.godotengine.editor.v4.dev-cKyDzGZzSAHZt6_m2kCbzw==/lib/arm64/libgodot_android.so
07-25 10:55:48.464  9124  9124 F DEBUG   :       #03 pc 0000000006b29d64  /data/app/org.godotengine.editor.v4.dev-cKyDzGZzSAHZt6_m2kCbzw==/lib/arm64/libgodot_android.so
07-25 10:55:48.464  9124  9124 F DEBUG   :       #04 pc 0000000006b2b088  /data/app/org.godotengine.editor.v4.dev-cKyDzGZzSAHZt6_m2kCbzw==/lib/arm64/libgodot_android.so
07-25 10:55:48.464  9124  9124 F DEBUG   :       #05 pc 0000000006b32058  /data/app/org.godotengine.editor.v4.dev-cKyDzGZzSAHZt6_m2kCbzw==/lib/arm64/libgodot_android.so
07-25 10:55:48.464  9124  9124 F DEBUG   :       #06 pc 0000000006a79120  /data/app/org.godotengine.editor.v4.dev-cKyDzGZzSAHZt6_m2kCbzw==/lib/arm64/libgodot_android.so
07-25 10:55:48.464  9124  9124 F DEBUG   :       #07 pc 0000000006a78f34  /data/app/org.godotengine.editor.v4.dev-cKyDzGZzSAHZt6_m2kCbzw==/lib/arm64/libgodot_android.so
07-25 10:55:48.464  9124  9124 F DEBUG   :       #08 pc 0000000006c767b0  /data/app/org.godotengine.editor.v4.dev-cKyDzGZzSAHZt6_m2kCbzw==/lib/arm64/libgodot_android.so
07-25 10:55:48.464  9124  9124 F DEBUG   :       #09 pc 0000000006b34c0c  /data/app/org.godotengine.editor.v4.dev-cKyDzGZzSAHZt6_m2kCbzw==/lib/arm64/libgodot_android.so
07-25 10:55:48.464  9124  9124 F DEBUG   :       #10 pc 0000000006b36ef8  /data/app/org.godotengine.editor.v4.dev-cKyDzGZzSAHZt6_m2kCbzw==/lib/arm64/libgodot_android.so
07-25 10:55:48.464  9124  9124 F DEBUG   :       #11 pc 0000000002dde450  /data/app/org.godotengine.editor.v4.dev-cKyDzGZzSAHZt6_m2kCbzw==/lib/arm64/libgodot_android.so
07-25 10:55:48.464  9124  9124 F DEBUG   :       #12 pc 0000000002d7bb0c  /data/app/org.godotengine.editor.v4.dev-cKyDzGZzSAHZt6_m2kCbzw==/lib/arm64/libgodot_android.so
07-25 10:55:48.464  9124  9124 F DEBUG   :       #13 pc 0000000002d9d55c  /data/app/org.godotengine.editor.v4.dev-cKyDzGZzSAHZt6_m2kCbzw==/lib/arm64/libgodot_android.so
07-25 10:55:48.464  9124  9124 F DEBUG   :       #14 pc 0000000000140350  /apex/com.android.runtime/lib64/libart.so (art_quick_generic_jni_trampoline+144) (BuildId: 44dbc6a587cb484a8b272d1608feb17c)
07-25 10:55:48.464  9124  9124 F DEBUG   :       #15 pc 00000000020399dc  /memfd:/jit-cache (deleted) (org.godotengine.godot.vulkan.VkRenderer.onVkDrawFrame+44)
07-25 10:55:48.464  9124  9124 F DEBUG   :       #16 pc 00000000020385f4  /memfd:/jit-cache (deleted) (org.godotengine.godot.vulkan.VkThread.run+948)
07-25 10:55:48.464  9124  9124 F DEBUG   :       #17 pc 000000000013763c  /apex/com.android.runtime/lib64/libart.so (art_quick_osr_stub+60) (BuildId: 44dbc6a587cb484a8b272d1608feb17c)
07-25 10:55:48.464  9124  9124 F DEBUG   :       #18 pc 00000000003380f8  /apex/com.android.runtime/lib64/libart.so (art::jit::Jit::MaybeDoOnStackReplacement(art::Thread*, art::ArtMethod*, unsigned int, int, art::JValue*)+1688) (BuildId: 44dbc6a587cb484a8b272d1608feb17c)
07-25 10:55:48.464  9124  9124 F DEBUG   :       #19 pc 00000000005ac56c  /apex/com.android.runtime/lib64/libart.so (MterpMaybeDoOnStackReplacement+212) (BuildId: 44dbc6a587cb484a8b272d1608feb17c)
07-25 10:55:48.464  9124  9124 F DEBUG   :       #20 pc 0000000000136350  /apex/com.android.runtime/lib64/libart.so (MterpHelpers+240) (BuildId: 44dbc6a587cb484a8b272d1608feb17c)
07-25 10:55:48.464  9124  9124 F DEBUG   :       #21 pc 0000000000029f46  [anon:dalvik-classes2.dex extracted in memory from /data/app/org.godotengine.editor.v4.dev-cKyDzGZzSAHZt6_m2kCbzw==/base.apk!classes2.dex] (org.godotengine.godot.vulkan.VkThread.run+282)
07-25 10:55:48.464  9124  9124 F DEBUG   :       #22 pc 00000000002b4b14  /apex/com.android.runtime/lib64/libart.so (_ZN3art11interpreterL7ExecuteEPNS_6ThreadERKNS_20CodeItemDataAccessorERNS_11ShadowFrameENS_6JValueEbb.llvm.16703252159117058578+240) (BuildId: 44dbc6a587cb484a8b272d1608feb17c)
07-25 10:55:48.464  9124  9124 F DEBUG   :       #23 pc 0000000000592d18  /apex/com.android.runtime/lib64/libart.so (artQuickToInterpreterBridge+1032) (BuildId: 44dbc6a587cb484a8b272d1608feb17c)
07-25 10:55:48.464  9124  9124 F DEBUG   :       #24 pc 0000000000140468  /apex/com.android.runtime/lib64/libart.so (art_quick_to_interpreter_bridge+88) (BuildId: 44dbc6a587cb484a8b272d1608feb17c)
07-25 10:55:48.464  9124  9124 F DEBUG   :       #25 pc 0000000000137334  /apex/com.android.runtime/lib64/libart.so (art_quick_invoke_stub+548) (BuildId: 44dbc6a587cb484a8b272d1608feb17c)
07-25 10:55:48.464  9124  9124 F DEBUG   :       #26 pc 0000000000145fec  /apex/com.android.runtime/lib64/libart.so (art::ArtMethod::Invoke(art::Thread*, unsigned int*, unsigned int, art::JValue*, char const*)+244) (BuildId: 44dbc6a587cb484a8b272d1608feb17c)
07-25 10:55:48.464  9124  9124 F DEBUG   :       #27 pc 00000000004b171c  /apex/com.android.runtime/lib64/libart.so (art::(anonymous namespace)::InvokeWithArgArray(art::ScopedObjectAccessAlreadyRunnable const&, art::ArtMethod*, art::(anonymous namespace)::ArgArray*, art::JValue*, char const*)+104) (BuildId: 44dbc6a587cb484a8b272d1608feb17c)
07-25 10:55:48.464  9124  9124 F DEBUG   :       #28 pc 00000000004b2830  /apex/com.android.runtime/lib64/libart.so (art::InvokeVirtualOrInterfaceWithJValues(art::ScopedObjectAccessAlreadyRunnable const&, _jobject*, _jmethodID*, jvalue const*)+416) (BuildId: 44dbc6a587cb484a8b272d1608feb17c)
07-25 10:55:48.464  9124  9124 F DEBUG   :       #29 pc 00000000004f31ec  /apex/com.android.runtime/lib64/libart.so (art::Thread::CreateCallback(void*)+1176) (BuildId: 44dbc6a587cb484a8b272d1608feb17c)
07-25 10:55:48.464  9124  9124 F DEBUG   :       #30 pc 00000000000e6a00  /apex/com.android.runtime/lib64/bionic/libc.so (__pthread_start(void*)+36) (BuildId: f58dc2e5c0832afee4aa38168e971c9d)
07-25 10:55:48.464  9124  9124 F DEBUG   :       #31 pc 0000000000084c6c  /apex/com.android.runtime/lib64/bionic/libc.so (__start_thread+64) (BuildId: f58dc2e5c0832afee4aa38168e971c9d)
```

</details>

<br>

I bisected the issue to #84976:

![Captura 2024-07-23 15-14-04-774883](https://github.com/user-attachments/assets/950ba9f4-510d-41ea-925a-3125ff25db83)

<br>

Another detail is the editor don't crash if you create a Node2D or a Control node:

https://github.com/user-attachments/assets/74d2a91e-8b03-4541-9056-4627d24b0aa1

<br>

Investigating futher i found that if you do any action that create the `editor_layout.cfg` file (creating a node and saving the scene or creating a node and reloading current project from `Project > Reload current project`) makes the project don't crash anymore, but if i delete `editor_layout.cfg` again or create the node but don't do any of the two actions i said above and kill the editor, the crashes come back.

### Steps to reproduce

See the videos above

### Minimal reproduction project (MRP)

No needed, any new project can reproduce