-
-
Notifications
You must be signed in to change notification settings - Fork 21.1k
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
Many errors and crash during iOS startup on older iPad Air #70013
Comments
This particular feature require at least Apple A9. |
@bruvzg If we require this Sampler Arrays feature I was thinking about if this could be specified in the UIRequiredDeviceCapabilities listing, but unfortunately I can't find one to specify that an A9 chip is required. There is a iphone-ipad-minimum-performance-a12 key, and I guess that could be used but it would block older (pre 2018) A9-A10-A11 iOS devices that would potentially be able to run Godot games. Another possible workaround could be to check for iOS version, as it seems iOS 16 has dropped support for older devices pre-A11. So bumping up the MinimumOSVersion would be an indirect requirement of an A11 graphics card or later? Or is it possible to configure the project in some way not to use/require these array sampler features so we can still support older devices? |
You should still be able to use the OpenGL ( But for Vulkan there might be a way for us to check whether the feature is supported before using it, if it's not core to the whole setup. CC @clayjohn @BastiaanOlij |
Not implemented on iOS, OpenGL is deprecated so if we do, it probably should be ANGLE. |
While deprecated, it should still be able to work like it does currently for 3.x, right? We're just missing setting it up as it wasn't a priority while the GL renderer was WIP. The Vulkan mobile renderer likely won't be production ready for 4.0 so we do need OpenGL properly exposed for mobile (and indeed we'l probably use ANGLE for iOS eventually but this comes with its own, new challenges, so it would be good IMO to start with exposing OpenGL proper). |
I think at the moment the way we present samplers is the same between mobile and clustered, I'm not sure off the top of my head if we can make this optional. I don't know enough about MetalVK yet on whether we can get proper feedback if features we rely on are supported on iOS/MacOS.. |
Should be possible to detect it by checking |
Owh thats interesting because I think we already request that data. The question is if we have made the assumption this feature is widely supported and depend on it, or if we can make it optional. I'm not sure where it's used nor have looked into it deep enough to say anything sensible on that, but it won't be hard to store this somewhere accessible. |
Still the same as far as I can tell in 4.0 beta 10 |
Some developments after testing again with 4.0b12. It shows a similar amount of errors during startup like before, but now it no longer crashes when loading the first scene. Instead it seems to load and start since I can hear the music and some sound effects playing from the title menu, but all I can see is what looks like the background ambient color and it keeps spitting out errors like these:
```
2023-01-15 11:20:19.994393+0100 vlobs[330:5070] at: framebuffer_format_get_texture_samples (drivers/vulkan/rendering_device_vulkan.cpp:4114)
USER ERROR: Condition "!E" is true. Returning: TEXTURE_SAMPLES_1
at: framebuffer_format_get_texture_samples (drivers/vulkan/rendering_device_vulkan.cpp:4114)
2023-01-15 11:20:19.994610+0100 vlobs[330:5070] USER ERROR: Mismatch fragment shader output mask (1) and framebuffer color output mask (0) when binding both in render pipeline.
2023-01-15 11:20:19.994833+0100 vlobs[330:5070] at: render_pipeline_create (drivers/vulkan/rendering_device_vulkan.cpp:6005)
USER ERROR: Mismatch fragment shader output mask (1) and framebuffer color output mask (0) when binding both in render pipeline.
at: render_pipeline_create (drivers/vulkan/rendering_device_vulkan.cpp:6005)
2023-01-15 11:20:19.995016+0100 vlobs[330:5070] USER ERROR: Condition "pipeline.is_null()" is true. Returning: RID()
2023-01-15 11:20:19.995079+0100 vlobs[330:5070] at: _generate_version (servers/rendering/renderer_rd/pipeline_cache_rd.cpp:61)
USER ERROR: Condition "pipeline.is_null()" is true. Returning: RID()
at: _generate_version (servers/rendering/renderer_rd/pipeline_cache_rd.cpp:61)
2023-01-15 11:20:19.995144+0100 vlobs[330:5070] USER ERROR: Condition "!dl" is true.
2023-01-15 11:20:19.995194+0100 vlobs[330:5070] at: draw_list_bind_render_pipeline (drivers/vulkan/rendering_device_vulkan.cpp:7108)
USER ERROR: Condition "!dl" is true.
at: draw_list_bind_render_pipeline (drivers/vulkan/rendering_device_vulkan.cpp:7108)
2023-01-15 11:20:19.995473+0100 vlobs[330:5070] USER ERROR: Texture (binding: 0, index 0) is not a valid texture.
2023-01-15 11:20:19.995547+0100 vlobs[330:5070] at: uniform_set_create (drivers/vulkan/rendering_device_vulkan.cpp:5464)
USER ERROR: Texture (binding: 0, index 0) is not a valid texture.
at: uniform_set_create (drivers/vulkan/rendering_device_vulkan.cpp:5464)
2023-01-15 11:20:19.995619+0100 vlobs[330:5070] USER ERROR: Condition "rid.is_null()" is true. Returning: rid
2023-01-15 11:20:19.995711+0100 vlobs[330:5070] at: _allocate_from_uniforms (./servers/rendering/renderer_rd/uniform_set_cache_rd.h:129)
USER ERROR: Condition "rid.is_null()" is true. Returning: rid
at: _allocate_from_uniforms (./servers/rendering/renderer_rd/uniform_set_cache_rd.h:129)
2023-01-15 11:20:19.995777+0100 vlobs[330:5070] USER ERROR: Condition "!dl" is true.
2023-01-15 11:20:19.995828+0100 vlobs[330:5070] at: draw_list_bind_uniform_set (drivers/vulkan/rendering_device_vulkan.cpp:7182)
USER ERROR: Condition "!dl" is true.
at: draw_list_bind_uniform_set (drivers/vulkan/rendering_device_vulkan.cpp:7182)
2023-01-15 11:20:19.996097+0100 vlobs[330:5070] USER ERROR: Condition "!dl" is true.
2023-01-15 11:20:19.996253+0100 vlobs[330:5070] at: draw_list_bind_index_array (drivers/vulkan/rendering_device_vulkan.cpp:7255)
USER ERROR: Condition "!dl" is true.
at: draw_list_bind_index_array (drivers/vulkan/rendering_device_vulkan.cpp:7255)
2023-01-15 11:20:19.996444+0100 vlobs[330:5070] USER ERROR: Condition "!dl" is true.
2023-01-15 11:20:19.996572+0100 vlobs[330:5070] at: draw_list_set_push_constant (drivers/vulkan/rendering_device_vulkan.cpp:7289)
USER ERROR: Condition "!dl" is true.
at: draw_list_set_push_constant (drivers/vulkan/rendering_device_vulkan.cpp:7289)
2023-01-15 11:20:19.996738+0100 vlobs[330:5070] USER ERROR: Condition "!dl" is true.
2023-01-15 11:20:19.996867+0100 vlobs[330:5070] at: draw_list_draw (drivers/vulkan/rendering_device_vulkan.cpp:7307)
USER ERROR: Condition "!dl" is true.
at: draw_list_draw (drivers/vulkan/rendering_device_vulkan.cpp:7307)
2023-01-15 11:20:19.996942+0100 vlobs[330:5070] USER ERROR: Immediate draw list is already inactive.
2023-01-15 11:20:19.996996+0100 vlobs[330:5070] at: draw_list_end (drivers/vulkan/rendering_device_vulkan.cpp:7610)
USER ERROR: Immediate draw list is already inactive.
at: draw_list_end (drivers/vulkan/rendering_device_vulkan.cpp:7610)
2023-01-15 11:20:19.997063+0100 vlobs[330:5070] USER ERROR: Condition "!framebuffer" is true. Returning: INVALID_ID
2023-01-15 11:20:19.997115+0100 vlobs[330:5070] at: draw_list_begin (drivers/vulkan/rendering_device_vulkan.cpp:6860)
USER ERROR: Condition "!framebuffer" is true. Returning: INVALID_ID
at: draw_list_begin (drivers/vulkan/rendering_device_vulkan.cpp:6860)
2023-01-15 11:20:19.997397+0100 vlobs[330:5070] USER ERROR: Condition "!framebuffer" is true. Returning: INVALID_ID
2023-01-15 11:20:19.997452+0100 vlobs[330:5070] at: framebuffer_get_format (drivers/vulkan/rendering_device_vulkan.cpp:4237)
USER ERROR: Condition "!framebuffer" is true. Returning: INVALID_ID
at: framebuffer_get_format (drivers/vulkan/rendering_device_vulkan.cpp:4237)
2023-01-15 11:20:19.997517+0100 vlobs[330:5070] USER ERROR: Condition "!E" is true. Returning: TEXTURE_SAMPLES_1
2023-01-15 11:20:19.997568+0100 vlobs[330:5070] at: framebuffer_format_get_texture_samples (drivers/vulkan/rendering_device_vulkan.cpp:4114)
USER ERROR: Condition "!E" is true. Returning: TEXTURE_SAMPLES_1
at: framebuffer_format_get_texture_samples (drivers/vulkan/rendering_device_vulkan.cpp:4114)
2023-01-15 11:20:19.997735+0100 vlobs[330:5070] USER ERROR: Mismatch fragment shader output
```
So, it now doesn't crash, and some things seems to be making it onto screen, but no UI elements or meshes or shaders. |
Some further improvement, or at least more graceful failing. Now in 4.0b16 if I try to run it I get substancially fewer and easier to understand errors, like these the debug log:
And no crash on launch. I'd say that's probably good enough for development testing to understand what's going wrong. So maybe you can close this issue if you think it's good enough. But on the device it just shows a black screen. Maybe some form of user-directed feedback like a message saying the device isn't supported or something like that could be nice as well? Especially since the app is still possible to download and launch on unsupported devices? But that I guess could be a separate improvement proposal. |
It would be really nice if we had a system popup or something that explained this so users don't have to rely on the logs. |
After now releasing my little iOS game on the app store it's now been tested by a wider array of devices and I've encountered some further incompatibilities (basically player who just get a black screen as stated above). In my testing and research I had previously concluded that iOS 16 required iOS hardware of the same or greater level as the features Godot mobile renderer does, so while you can't specify the hardware requirements for the iOS app I figured I could specify that it requires iOS 16 and get the hardware feature support indirectly (hence the min OS version request). This does seem to hold up mostly, but with the notable exception of some older iPad pro models. Apparently they support iOS 16, but not the graphics requirements of Godot. While it's not a huge problem since iPad pros aren't a big share of the user base it's a quality issue since it means you currently can't guarantee all people who can buy the app on the Apple app store can actually run it if you use the Godot mobile renderer. |
Godot version
4.0.beta8
System information
iPad Air 2, iOS 15.7, Apple A8X GPU
Issue description
I've recently been testing iOS export, and it generally works very well on newer devices even though there are some errors and warnings in the console during startup. However, when trying to run my project on my slightly older iPad Air 2 I get a ton of errors and the game crashes before reaching the title screen (possibly after initial startup when it tries to load shaders and display the title screen). The title music starts playing, but then screeches to a halt and the game crashes before the splash screen is visually replaced by the title screen.
You can find the full error log here: 4.0.0beta8_ipad_air2_vulcan_errors.txt
We start out with this startup and GPU description:
...
This is then followed by a lot of errors being repeated, but the first one that repeats many times is
Followed later by many repetitions of
Along with various other errors.
Basically I interpret this as failures to initialize various shaders and things for the renderer.
This then turns into errors like the following, which I interpret as basically things that are expected to now be in place are not.
And at this point the game crashes
It could well be that this hardware does not support running the engine with these features. So the issue here might more be that it is either not specifying and testing up front what features it requires (which would just block launching/installing the app) or correctly switching to fallbacks if features are missing and there are alternatives. Or, if this also fails, perhaps failing a bit more gracefully with an error message during startup.
Steps to reproduce
This may be difficult to reproduce, since I think it might be specific to this hardware (and possibly other older iOS devices) and not reproducible without it.
But I'm submitting this with this log in hopes that it might still be helpful as an example to see how failures during the engine initialization are not handled gracefully on iOS.
Minimal reproduction project
See steps to reproduce
The text was updated successfully, but these errors were encountered: