You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[This bug report is a "Work In Progress" due to a large amount of supporting data that needs to be attached/explained & somewhat convoluted & uncertain underlying cause--and GitHub not having a "save as draft" option. :) ]
Godot version: v3.2.alpha2.official
OS/device including version: Mac OS X 10.9.5 / OpenGL ES 3.0 Renderer: NVIDIA GeForce GT 650M OpenGL Engine
Issue description:
A 2D GLES3 project without a (3D) Camera node crashes (after up to ~ 30 seconds has elapsed) in the GPU driver--seemingly due to a null pointer?--perhaps caused by procedural sky in default Godot environment? (The editor frequently also crashes when modifying the project & running under GLES3.)
The same MRP project runs without crashing under GLES2--but does cause some warnings to appear.
A workaround is to add a (3D) Camera node to the scene. I've seen apparently conflicting results in relation to whether the node needs to be visible or can be hidden.
Modifying default_env.tres to have a "Background Mode" of "Clear Color" may also prevent the crash.
Underlying issue seems it may be related to a shader accessing an uninitialized cube-map texture normally used for GIProbe and/or reflection?
[TODO: Add render quality setting observations.]
Godot traceback log:
$ /Users/USER/Downloads/Godot-v3.2-alpha2_osx.64.app/Contents/MacOS/Godot --video-driver GLES3 --path /Users/USER/Projects/godot/3.2-alpha2-gles3-2d-no-camera-issue res://ColorRect.tscn
arguments
0: /Users/USER/Downloads/Godot-v3.2-alpha2_osx.64.app/Contents/MacOS/Godot
1: --video-driver
2: GLES3
3: --path
4: /Users/USER/Projects/godot/3.2-alpha2-gles3-2d-no-camera-issue
5: res://ColorRect.tscn
Current path: /Users/USER/Downloads/Godot-v3.2-alpha2_osx.64.app/Contents/Resources
Godot Engine v3.2.alpha2.official - https://godotengine.org
OpenGL ES 3.0 Renderer: NVIDIA GeForce GT 650M OpenGL Engine
Registered camera FaceTime HD Camera (Built-in) with id 1 position 0 at index 0
handle_crash: Program crashed with signal 11
Dumping the backtrace. Please include this when reporting the bug on https://github.com/godotengine/godot/issues
[1] 1 libsystem_platform.dylib 0x00007fff939735aa _sigtramp + 26
[2] 2 ??? 0x0000000000000000 0x0 + 0
[3] 3 GeForceGLDriver 0x00001234402b9706 gldReadTextureData + 688435
[4] 4 GeForceGLDriver 0x00001234401dd19b GeForceGLDriver + 1954203
[5] 5 GeForceGLDriver 0x00001234401e2f4a GeForceGLDriver + 1978186
[6] 6 GeForceGLDriver 0x00001234402e0760 gldReadTextureData + 848269
[7] 7 libGPUSupportMercury.dylib 0x00007fff92759f8e gldUpdateDrawFramebuffer + 168
[8] 8 GLEngine 0x00007fff90c0c407 gleUpdateDrawFramebufferState + 525
[9] 9 GLEngine 0x00007fff90c0d60c gleDoDrawDispatchCoreGL3 + 104
[10] 10 GLEngine 0x00007fff90bc1d9a gleDrawArraysOrElements_Entries_Body + 116
[11] 11 GLEngine 0x00007fff90bbb29b glDrawArrays_GL3Exec + 194
[12] RasterizerCanvasGLES3::canvas_render_items(RasterizerCanvas::Item*, int, Color const&, RasterizerCanvas::Light*, Transform2D const&) (in Godot) + 89212
[13] VisualServerCanvas::render_canvas(VisualServerCanvas::Canvas*, Transform2D const&, RasterizerCanvas::Light*, RasterizerCanvas::Light*, Rect2 const&) (in Godot) + 1915
[14] VisualServerViewport::_draw_viewport(VisualServerViewport::Viewport*, ARVRInterface::Eyes) (in Godot) + 2819
[15] VisualServerViewport::draw_viewports() (in Godot) + 992
[16] VisualServerRaster::draw(bool, double) (in Godot) + 323
[17] Main::iteration() (in Godot) + 1028
[18] OS_OSX::run() (in Godot) + 634
[19] main (in Godot) + 811
[20] 20 libdyld.dylib 0x00007fff8d8275fd start + 1
[21] 21 ??? 0x0000000000000006 0x0 + 6
-- END OF BACKTRACE --
Abort trap: 6
[TODO: Add details from OS crash log.]
Steps to reproduce: [TODO: Describe how to add ColorRect node with default color to project is enough to trigger the crash.]
Edit: Note also that I previously encountered what appears to be the same crash back in March: #27222 (comment) (I have some vague recollection of GLES3 & Godot 3.something not working, then working, then not working again around that time.)
As I've had success with using apitrace in the past to debug convoluted OpenGL issues, I again used apitrace to get some more insight into what is happening.
First I generated an OpenGL trace file of the time proceeding the crash with the apitrace tool (that I had built on a previous occasion):
Updated main description to include screenshots of suspicious surfaces from OpenGL traces & add some breadcrumbs/links to potentially related issues & source code.
Not sure when I'll get back to writing this up but hopefully there's enough here that someone more familiar with the rendering side of things can identify the root cause of the apparent uninitialized or incorrectly referenced surfaces/textures.
Sounds like its an NVidia driver issue. Seeing as it doesn't crash on my 1050, I'm guessing newer drivers handle this more gracefully? In which case, are you able to just update your drivers? (not sure if its possible on such an old GPU)
[This bug report is a "Work In Progress" due to a large amount of supporting data that needs to be attached/explained & somewhat convoluted & uncertain underlying cause--and GitHub not having a "save as draft" option. :) ]
Godot version: v3.2.alpha2.official
OS/device including version: Mac OS X 10.9.5 / OpenGL ES 3.0 Renderer: NVIDIA GeForce GT 650M OpenGL Engine
Issue description:
A 2D GLES3 project without a (3D)
Camera
node crashes (after up to ~ 30 seconds has elapsed) in the GPU driver--seemingly due to a null pointer?--perhaps caused by procedural sky in default Godot environment? (The editor frequently also crashes when modifying the project & running under GLES3.)The same MRP project runs without crashing under GLES2--but does cause some warnings to appear.
A workaround is to add a (3D)
Camera
node to the scene. I've seen apparently conflicting results in relation to whether the node needs to be visible or can be hidden.Modifying
default_env.tres
to have a "Background Mode" of "Clear Color" may also prevent the crash.Underlying issue seems it may be related to a shader accessing an uninitialized cube-map texture normally used for GIProbe and/or reflection?
[TODO: Add render quality setting observations.]
Godot traceback log:
[TODO: Add details from OS crash log.]
Steps to reproduce: [TODO: Describe how to add
ColorRect
node with default color to project is enough to trigger the crash.]Minimal reproduction project:
3.2-alpha2-gles3-2d-no-camera-issue.zip
(The issue has also been observed "in the wild" when running this
Seedlings-osx-0.6.5-a.zip
demo.)Edit: Note also that I previously encountered what appears to be the same crash back in March: #27222 (comment) (I have some vague recollection of GLES3 & Godot 3.something not working, then working, then not working again around that time.)
Minimal workaround example project:
3.2-alpha2-gles3-2d-no-camera-issue-workaround.zip
OpenGL debugging with
apitrace
As I've had success with using
apitrace
in the past to debug convoluted OpenGL issues, I again usedapitrace
to get some more insight into what is happening.First I generated an OpenGL trace file of the time proceeding the crash with the
apitrace
tool (that I had built on a previous occasion):Then I used the
qapitrace
GUI viewer tool to analyze the trace:apitrace
trace observationsThis screenshot shows the "suspicious" cube map surfaces I observed early on in a GLES3 run that crashes, note the seemingly "random noise" values:
A zoomed version of one of the suspicious cube map surfaces:
The apparently "clean" cube map surfaces visible when the 3D
Camera
node GLES3 workaround is used:The associated sky texture that also appears in the trace when the GLES3 camera workaround is used:
The "correct?" skybox cube map surfaces (and warning logs) that are visible in the non-crashing GLES2 traces:
The sequence of OpenGL calls that result in the crash under GLES3:
The above function call sequence seems to correspond to this section of code:
godot/drivers/gles3/rasterizer_canvas_gles3.cpp
Lines 646 to 725 in 24e1039
[TODO: Add links to potentially related/informative source code including:
godot/drivers/gles3/rasterizer_canvas_gles3.cpp
,drivers/gles3/rasterizer_scene_gles3.cpp
,drivers/gles2/rasterizer_scene_gles2.cpp
,drivers/gles2/rasterizer_storage_gles2.cpp
,drivers/gles3/rasterizer_storage_gles3.cpp
,godot/drivers/gles3/shaders/copy.glsl
,_draw_sky()
,RasterizerSceneGLES3::reflection_probe_instance_postprocess_step()
&RasterizerSceneGLES2::reflection_probe_instance_begin_render()
.][TODO: To be continued... :) ]
The text was updated successfully, but these errors were encountered: