godotengine / godot

Godot Engine – Multi-platform 2D and 3D game engine
https://godotengine.org
MIT License
89.06k stars 20.19k forks source link

Viewport ARVR + ARVR camera crash Issue under GLES3, not GLES2 #55369

Open JOELwindows7 opened 2 years ago

JOELwindows7 commented 2 years ago

Godot version

3.4 official (v3.4.stable.official.206ba70f4)

System information

Windows 11 x64, GLES3, Intel Core i7-8750H, Intel UHD Graphic 630, Nvidia GeForce GTX 1050Ti, Nvidia GameReady 496.49

Issue description

Describe

Crash when attempted to open a Viewport tscn that configured for ARVR & has an ARVR camera. It only happens with GLES3. Doing the same with GLES2 won't cause any trouble.

Terminal log

Hexagon Engine

Quick open scene ZetrixViewport.tscn

...
ERROR: Condition "ret == 0" is true. Returned: ERR_CANT_FORK
   at: execute (platform/windows/os_windows.cpp:2843)
thirdparty/mbedtls/library/ssl_tls.c:5084: mbedtls_ssl_fetch_input() returned -27648 (-0x6c00)
thirdparty/mbedtls/library/ssl_tls.c:4455: ssl_get_next_record() returned -27648 (-0x6c00)
thirdparty/mbedtls/library/ssl_cli.c:1691: mbedtls_ssl_read_record() returned -27648 (-0x6c00)
ERROR: TLS handshake error: -27648
   at: _do_handshake (modules/mbedtls/stream_peer_mbedtls.cpp:87)
mbedtls error: returned -0x6c00

ERROR: GL ERROR: Source: OpenGL Type: Error     ID: 1282        Severity: High  Message: GL_INVALID_OPERATION error generated.
   at: _gl_debug_print (drivers/gles3/rasterizer_gles3.cpp:124)
ERROR: GL ERROR: Source: OpenGL Type: Error     ID: 1282        Severity: High  Message: GL_INVALID_OPERATION error generated.
   at: _gl_debug_print (drivers/gles3/rasterizer_gles3.cpp:124)
ERROR: GL ERROR: Source: OpenGL Type: Error     ID: 1282        Severity: High  Message: GL_INVALID_OPERATION error generated. The required buffer is missing.
   at: _gl_debug_print (drivers/gles3/rasterizer_gles3.cpp:124)
ERROR: GL ERROR: Source: OpenGL Type: Error     ID: 1282        Severity: High  Message: GL_INVALID_OPERATION error generated. The required buffer is missing.
   at: _gl_debug_print (drivers/gles3/rasterizer_gles3.cpp:124)
ERROR: GL ERROR: Source: OpenGL Type: Error     ID: 1282        Severity: High  Message: GL_INVALID_OPERATION error generated. The required buffer is missing.
   at: _gl_debug_print (drivers/gles3/rasterizer_gles3.cpp:124)
ERROR: FATAL: Index p_index = 0 is out of bounds (size() = 0).
   at: get (./core/cowdata.h:156)
PS C:\Users\joelr\Documents\kolmorotzzet (kolmorotshitt)\Artistic Setups\Godot>

editor closes.

tried to also remake the similar ARVR viewport & added its VR Nodes under ReplacementZetrixViewport.tscn to find that closing & reopening it crashes as well under GLES3

TestViewporto
Open Zetrixer.tscn
Editing project: C:/Users/joelr/Documents/starring codes/Godot Projects/TestViewporto (C:::Users::joelr::Documents::starring codes::Godot Projects::TestViewporto)
Godot Engine v3.4.stable.official.206ba70f4 - https://godotengine.org
PS C:\Users\joelr\Documents\kolmorotzzet (kolmorotshitt)\Artistic Setups\Godot> OpenGL ES 3.0 Renderer: NVIDIA GeForce GTX 1050 Ti/PCIe/SSE2
OpenGL ES Batching: ON

ERROR: Unsupported locale 'in', falling back to 'en'.
   at: set_locale (core/translation.cpp:980)
ERROR: unsupported format character
   at: (core/variant.cpp:3067)
ERROR: unsupported format character
   at: (core/variant.cpp:3067)
ERROR: unsupported format character
   at: (core/variant.cpp:3067)
ERROR: unsupported format character
   at: (core/variant.cpp:3067)
ERROR: unsupported format character
   at: (core/variant.cpp:3067)
ERROR: unsupported format character
   at: (core/variant.cpp:3067)
ERROR: unsupported format character
   at: (core/variant.cpp:3067)
ERROR: unsupported format character
   at: (core/variant.cpp:3067)
ERROR: unsupported format character
   at: (core/variant.cpp:3067)
ERROR: unsupported format character
   at: (core/variant.cpp:3067)
ERROR: unsupported format character
   at: (core/variant.cpp:3067)
ERROR: unsupported format character
   at: (core/variant.cpp:3067)
ERROR: unsupported format character
   at: (core/variant.cpp:3067)
ERROR: unsupported format character
   at: (core/variant.cpp:3067)
ERROR: unsupported format character
   at: (core/variant.cpp:3067)
ERROR: unsupported format character
   at: (core/variant.cpp:3067)
ERROR: Can't use canvas background mode in a render target configured without sampling
   at: render_scene (drivers/gles3/rasterizer_scene_gles3.cpp:4212)

Editor locks up. soft-locked. force close needed.

I have tried other possible configurations, but none of them crash. only Zetrixer does.

Steps to reproduce

New from scratch

  1. Create new project, use GLES3
  2. have a new Viewport. configure for ARVR,
  3. add new ARVR camera inside that viewport
  4. Save that node tscn
  5. close that node tscn
  6. open it again. It crashes under GLES3
  7. Repeat with GLES2. it does not crash.

Using minimal project

  1. Open this minimal project
  2. Try open following tscn:
    • Emti.tscn Empty viewport
    • WithRegularCam.tscn has just regular Camera node
    • WithRegularCam.tscnARVR same as above, but the viewport checkbox ARVR
    • Zetrixer.tscn minimally configured to be ARVR. with ARVR camera & viewport checkbox ARVR
  3. Notice that it crashes whenever Zetrixer.tscn being opened. It crashes under GLES3.
  4. repeat process but with GLES2. open the same Zetrixer.tscn and it does not crash.

(BIG REPOSITORY) Using Hexagon Engine

  1. Clone & Open Hexagon Engine project
  2. Quick open dummy viewport called Viewportoroso.tscn which is basically empty viewport with nothing but checkbox ARVR and stuff. Also try open other control scene. As you can see, normally this should opens fine
  3. Quick open VR viewport called ZetrixViewport.tscn or ReplacementZetrixViewport.tscn. If you were in GLES3, the video driver crash, editor closes.
  4. repeat with GLES2. open ZetrixViewport.tscn or ReplacementZetrixViewport.tscn again, won't crash.

Minimal reproduction project

Minimal project

TestViewporto.zip

(OPTIONAL, NOT MINIMAL) Hexagon Engine

https://github.com/Perkedel/HexagonEngine

JOELwindows7 commented 2 years ago

I also have had tried the minimal project on linux

Godot Version

3.4 Official (v3.4.stable.official.206ba70f4)

System

Linux x64 (Ubuntu) (Uname -r = Linux joelwindows7-Strix-15-GL503GE 5.8.0-59-generic #66-Ubuntu SMP Thu Jun 17 00:46:01 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux), GLES3, Intel Core i7-8750H, Intel UHD Graphic 630, Nvidia GeForce GTX 1050Ti, Nvidia driver 460.91.03

Result

TestViewporto

Open Zetrixer.tscn

diting project: /media/joelwindows7/OS/Users/joelr/Documents/starring codes/Godot Projects/TestViewporto (::media::joelwindows7::OS::Users::joelr::Documents::starring codes::Godot Projects::TestViewporto)
Godot Engine v3.4.stable.official.206ba70f4 - https://godotengine.org
OpenGL ES 3.0 Renderer: GeForce GTX 1050 Ti/PCIe/SSE2
OpenGL ES Batching: ON
joelwindows7@joelwindows7-Strix-15-GL503GE:/media/joelwindows7/OS/Users/joelr/Documents/kolmorotzzet (kolmorotshitt)/Artistic Setups/Godot$  
ERROR: unsupported format character
   at: vformat (core/variant.cpp:3067)
ERROR: unsupported format character
   at: vformat (core/variant.cpp:3067)
ERROR: unsupported format character
   at: vformat (core/variant.cpp:3067)
ERROR: unsupported format character
   at: vformat (core/variant.cpp:3067)
ERROR: unsupported format character
   at: vformat (core/variant.cpp:3067)
ERROR: unsupported format character
   at: vformat (core/variant.cpp:3067)
ERROR: unsupported format character
   at: vformat (core/variant.cpp:3067)
ERROR: unsupported format character
   at: vformat (core/variant.cpp:3067)
ERROR: unsupported format character
   at: vformat (core/variant.cpp:3067)
ERROR: unsupported format character
   at: vformat (core/variant.cpp:3067)
ERROR: unsupported format character
   at: vformat (core/variant.cpp:3067)
ERROR: unsupported format character
   at: vformat (core/variant.cpp:3067)
ERROR: unsupported format character
   at: vformat (core/variant.cpp:3067)
ERROR: unsupported format character
   at: vformat (core/variant.cpp:3067)
ERROR: unsupported format character
   at: vformat (core/variant.cpp:3067)
ERROR: unsupported format character
   at: vformat (core/variant.cpp:3067)
ERROR: Can't use canvas background mode in a render target configured without sampling
   at: render_scene (drivers/gles3/rasterizer_scene_gles3.cpp:4212)
^C

Same GLES3 hang, I have to ^C (Ctrl + C in terminal window, to Force close).

I also tried the same under GLES2 and it won't crash.

edit: I mean to force close, not that it automatically force close

akien-mga commented 2 years ago

I can reproduce the issue with the MRP on Linux. It doesn't seem to crash per se for me but it does stall when opening the Zetrixer.tscn scene.

Checking where it's stuck at with gdb, I get:

(gdb) bt
#0  0x00007facefa0ac45 in clock_nanosleep@GLIBC_2.2.5 () from /lib64/libc.so.6
#1  0x00007facefa0f653 in nanosleep () from /lib64/libc.so.6
#2  0x0000000002967d43 in OS_Unix::delay_usec (this=0x7ffd9596d500, p_usec=49451) at drivers/unix/os_unix.cpp:243
#3  0x00000000046b619d in OS::add_frame_delay (this=0x7ffd9596d500, p_can_draw=true) at core/os/os.cpp:812
#4  0x00000000017f534c in Main::iteration () at main/main.cpp:2291
#5  0x00000000017b8c45 in OS_X11::run (this=0x7ffd9596d500) at platform/x11/os_x11.cpp:3705
#6  0x00000000017a680f in main (argc=2, argv=0x7ffd9596de48) at platform/x11/godot_x11.cpp:55

Tested with 3.x 2176b694a.