Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GLES2 error: initialize: Directional shadow framebuffer status invalid on macOS #26570

Closed
robgraeber opened this issue Mar 4, 2019 · 27 comments · Fixed by #31259
Closed

GLES2 error: initialize: Directional shadow framebuffer status invalid on macOS #26570

robgraeber opened this issue Mar 4, 2019 · 27 comments · Fixed by #31259

Comments

@robgraeber
Copy link

Godot version: 3.1 beta 10

OS/device including version: OS X 10.12 AMD Radeon Pro 455

Issue description: Hey I noticed when restarting the editor sometimes the old editor doesn't fully close and instead hangs forever. I noticed it more yesterday when I was trying out the GLES2 VS GLES3 settings, but can't reproduce it 100%. Are there logs files somewhere?

Steps to reproduce: Hard to reproduce, happens sporadically when doing "Quit to project list" or switching the video driver.

Minimal reproduction project: In this case I was testing with Dodge the Creeps.

screen shot 2019-03-04 at 12 56 58 am

@fian46
Copy link

fian46 commented Mar 4, 2019

i can confirm that happened on ubuntu 18.04 too sometimes

@akien-mga
Copy link
Member

Can you run Godot from a temrinal and see if any errors/backtraces are displayed when this happens?

@bruvzg
Copy link
Member

bruvzg commented Mar 4, 2019

#24206 and #24669 duplicate?

@akien-mga
Copy link
Member

Probably, if so should be fixed in the master branch / beta 11 / RC 1.

@akien-mga
Copy link
Member

Assuming duplicate of #24669 and thus fixed. Please comment if you still reproduce it in the next build, and I'll reopen it.

@robgraeber
Copy link
Author

robgraeber commented Mar 11, 2019

@akien-mga it's still happening on rc2. Seems to happen more often now, it happens every time I go from GLES3 to GLES2 or vice versa. Here's the log when running Godot from cli (switching from GLES3 to GLES2 on dodge the creeps):

Running: /Applications/Godot.app/Contents/MacOS/Godot --path /Users/bobby/Downloads/godot-demo-projects-master/2d/dodge_the_creeps --remote-debug 127.0.0.1:6007 --allow_focus_steal_pid 46001 --position 480,90
arguments
0: /Applications/Godot.app/Contents/MacOS/Godot
1: --path
2: /Users/bobby/Downloads/godot-demo-projects-master/2d/dodge_the_creeps
3: --remote-debug
4: 127.0.0.1:6007
5: --allow_focus_steal_pid
6: 46001
7: --position
8: 480,90
Current path: /Applications/Godot.app/Contents/Resources
OpenGL ES 3.0 Renderer: AMD Radeon Pro 455 OpenGL Engine
WARNING: cleanup: ObjectDB Instances still exist!
   At: core/object.cpp:2092.
arguments
0: /Applications/Godot.app/Contents/MacOS/Godot
1: --path
2: /Users/bobby/Downloads/godot-demo-projects-master/2d/dodge_the_creeps
3: -e
4: res://Main.tscn
Current path: /Applications/Godot.app/Contents/Resources
OpenGL ES 2.0 Renderer: AMD Radeon Pro 455 OpenGL Engine
ERROR: initialize: Directional shadow framebuffer status invalid
   At: drivers/gles2/rasterizer_scene_gles2.cpp:3355.  

@akien-mga akien-mga reopened this Mar 11, 2019
@akien-mga akien-mga changed the title Godot Editor sometimes freezes while closing on Mac. GLES2 error: initialize: Directional shadow framebuffer status invalid on macOS Mar 11, 2019
@akien-mga
Copy link
Member

Do you get the same error when running a GLES2 project directly?

@akien-mga
Copy link
Member

And does it run if you remove default_env.tres?

@akien-mga
Copy link
Member

And finally, could you run Godot with the --verbose argument to have more detailed output (should show the OpenGL errors).

Should be something like /Applications/Godot.app/Contents/MacOS/Godot --verbose -e --path /Users/bobby/Downloads/godot-demo-projects-master/2d/dodge_the_creeps

@bruvzg
Copy link
Member

bruvzg commented Mar 11, 2019

I do get ERROR: initialize: Directional shadow framebuffer status invalid error when running Godot with the GLES2 driver (with both existing GLES3 project and newly created GLES2 project), but can't reproduce crash or freeze.

Edit: same GLES2 error is present in beta 1 and onwards.

@robgraeber Check Console.app->User Reports for Godot crash logs.

@akien-mga
Copy link
Member

Edit: same GLES2 error is present in beta 1 and onwards.

Does that mean that 3.1 alpha 5 worked, or you just tested down to beta 1?

@bruvzg
Copy link
Member

bruvzg commented Mar 11, 2019

Does that mean that 3.1 alpha 5 worked, or you just tested down to beta 1?

I just tested all betas. And I do not find anything not working with any, it's just printing this error on the start. It's probably completely irrelevant to this issue or #26912.

@bruvzg
Copy link
Member

bruvzg commented Mar 11, 2019

Done some more test and shadows are NOT working in GLES2 (I assume it should work if it's trying to setup directional shadow framebuffer):

GLES 3 (macOS, shadow ok):
Screenshot 2019-03-11 at 22 28 22

GLES 2 (macOS, beta 1, 7 and 9, no shadow, everything is dark):
Screenshot 2019-03-11 at 22 29 07

GLES 2 (macOS, beta 10+, no shadow, everything is covered in stripes):
Screenshot 2019-03-11 at 22 28 06

Update: GLES 2 shadows works on Windows 10 (same hardware).

GLES2 (Windows 10, shadow ok):
Capture

Update 2: GLES 2 shadows also works on Linux (Ubuntu 18.10, same hardware)
Screenshot from 2019-03-12 16-53-10

@akien-mga
Copy link
Member

GLES2 (after #26928, fully broken):

Fixed in #26932.

@n3rdw1z4rd
Copy link
Contributor

n3rdw1z4rd commented Mar 13, 2019

I am still seeing this error in 3.1-stable using GLES2, although I do see shadows at runtime:

E 0:00:00:0050 Directional shadow framebuffer status invalid
drivers/gles2/rasterizer_scene_gles2.cpp:3355 @ initialize()

Godot 3.1-stable
macOS 10.14.3

@robgraeber
Copy link
Author

For the freezing issue on mac, I don't see any logs in the Console/User Reports and verbose mode didn't have any new information. It happens on rc3 too. Not sure if it's related, but when I close the editor in general I get this error:

ERROR: cleanup: There are still MemoryPool allocs in use at exit!
   At: core/pool_vector.cpp:70.

@n3rdw1z4rd
Copy link
Contributor

I haven't experienced any freezing, and didn't notice that error. I will try again soon and see if I am getting that as well...

@n3rdw1z4rd
Copy link
Contributor

Running my project from Terminal:

ERROR: initialize: Directional shadow framebuffer status invalid
At: drivers/gles2/rasterizer_scene_gles2.cpp:3355.

I didn't see any other errors, or any freezing.

@n3rdw1z4rd
Copy link
Contributor

n3rdw1z4rd commented Mar 14, 2019

I built from the 3.1-stable tag with target=debug
macOS: 10.14.3 (2017 Macbook Pro)

After running my project:

OpenGL ES 2.0 Renderer: AMD Radeon Pro 560 OpenGL Engine
ERROR: initialize: Directional shadow framebuffer status invalid:
At: drivers/gles2/rasterizer_scene_gles2.cpp:3355.
WARNING: _update_root_rect: Font oversampling does not work in 'Viewport' stretch mode, only '2D'.
At: scene/main/scene_tree.cpp:1241.
GameManager: _ready
args: {host:127.0.0.1, port:3000}
Start: _ready
_on_Button_Play_Solo_pressed
GameManager: startSoloPlay
WARNING: cleanup: ObjectDB Instances still exist!
At: core/object.cpp:2092.
ERROR: cleanup: There are still MemoryPool allocs in use at exit!
At: core/pool_vector.cpp:70.

Still no freezing though.

I would like to add this bit of information:
When I run the editor and open my project without running the project I get:

OpenGL ES 2.0 Renderer: AMD Radeon Pro 560 OpenGL Engine
ERROR: initialize: Directional shadow framebuffer status invalid:
At: drivers/gles2/rasterizer_scene_gles2.cpp:3355.

On exiting the app (still without running my project):
WARNING: cleanup: ObjectDB Instances still exist!
At: core/object.cpp:2092.
ERROR: cleanup: There are still MemoryPool allocs in use at exit!
At: core/pool_vector.cpp:70.

@SuperDIMMaX
Copy link

some problem - Windows 10, Radeon 4500m, Godot 3.any version, OpenGL ES 2/3 - no 3d shadows

ERROR: initialize: Condition ' status != 0x8CD5 ' is true. Continuing..:
At: drivers/gles3/rasterizer_scene_gles3.cpp:4996
ERROR: initialize: Directional shadow framebuffer status invalid
At: drivers/gles3/rasterizer_scene_gles3.cpp:5021

or

ERROR: initialize: Directional shadow framebuffer status invalid
At: drivers/gles2/rasterizer_scene_gles2.cpp:3355

@ImperatorS79
Copy link

Message originally posted in #19896, but I think it is better here:

Hello, I also have a HD graphics 3000, on windows 7, OpenGL 3.1.
I tried to launch the Wesnoth's Godot demo, it worked in Godot 3.1 beta 11, but not in stable.
Here are the console outputs:

  • beta 11 :
OpenGL ES 2.0 Renderer: Intel(R) HD Graphics 3000
ERROR: initialize: Directional shadow framebuffer status invalid
   At: drivers/gles2/rasterizer_scene_gles2.cpp:3250
  • stable when godot start:
OpenGL ES 2.0 Renderer: Intel(R) HD Graphics 3000
ERROR: initialize: Directional shadow framebuffer status invalid
   At: drivers/gles2/rasterizer_scene_gles2.cpp:3355
  • stable after launching project
ERROR: is_viable: Error initializing GLAD
   At: drivers/gles3/rasterizer_gles3.cpp:142

It does not work in rc3 either, and in rc1 I only have the GLAD error at the beginning and I cannot even try to launch the project.

@dirkk0
Copy link

dirkk0 commented Mar 25, 2019

I can reproduce this on a MBP Mac OSX High Sierra (Intel Iris Graphics 6100), when I switch between GLES2 and 3.
On GLES2 the error is:
E 0:00:00:0132 Directional shadow framebuffer status invalid
drivers/gles2/rasterizer_scene_gles2.cpp:3196 @ initialize()
Happens in both runtime and editor.

In GLES3 the shadows show.

It might be worth noting that
a) the error doesn't show always, most of the time the shadows just don't show and
b) when I set Max Distance to something between 2 and 5, I do see shadows:
https://www.dropbox.com/s/wyzsp27fa5kw8oq/Screenshot%202019-03-25%2011.54.16.png?dl=0

@hiulit
Copy link

hiulit commented Mar 25, 2019

  • Godot 3.1-stable
  • MacBookPro (Retina, 15-inch, Mid 2015, Intel Iris Pro 1536 MB)
  • 2D project
OpenGL ES 2.0 Renderer: Intel Iris Pro OpenGL Engine
E 0:00:00:0062   Directional shadow framebuffer status invalid
  <C Source>     drivers/gles2/rasterizer_scene_gles2.cpp:3355 @ initialize()

@akien-mga akien-mga modified the milestones: 3.1, 3.2 Apr 8, 2019
@ArdaE
Copy link
Contributor

ArdaE commented Apr 9, 2019

Same problem here on macOS 10.13.6 (MacBookPro Retina, mid-2012, NVIDIA GeForce GT 650M, Intel HD Graphics 4000).

Happens even in an empty scene with just Node2D or Control at the top level, in a freshly created project. I've tried playing around with some related-looking project settings to no avail.

@clayheaton
Copy link

@akien-mga

Here's an example project: https://github.com/clayheaton/JJCopyExportBug

(If this is a different bug or should be referenced elsewhere, please let me know.)

Is it possible this affects the GLES2 export to HTML5? I have a project that exports flawlessly to HTML5 from GLES3 and runs fine in the editor or as an exported app when in GLES2, but doesn't work properly when exported to HTML5 when GLES2 is active.

(Actually, I get the WebGL Context lost issue when I try to resize with the GLES3 export in Chrome. Maybe related to #16050? It won't allow me to load the game in the browser if I have the JavaScript console open but works fine when that's not open.)

Here's a screenshot of the errors in Chrome when I do an HTML5 export from GLES2:

Screen Shot 2019-07-10 at 10 29 49 AM

This is what it is supposed to look like and this screen is from an HTML5 export from GLES3, running in Chrome.

Screen Shot 2019-07-10 at 10 35 51 AM

@akien-mga
Copy link
Member

Yeah, there are definitely some issues in the GLES2 setup on platforms with more restrictive implementations (macOS, iOS, WebGL and some older Intel IGPs on Windows). There were lots of changes prior to the 3.1 release around this code to fix similar issues, but it looks like there is still work to do to make the GLES2 setup fully compliant with the lowest end.

@clayheaton
Copy link

For what it's worth, I tried exporting from GLES2 on Windows (on a Macbook Pro) and encountered the same failure described above.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment