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

Metal Rendering issues: iOS 16.x blank screen when not running in debugger #3392

Open
NworbLegin opened this issue Jan 2, 2025 · 0 comments

Comments

@NworbLegin
Copy link

Describe the bug
When the example-17 program is run on an iOS device running iOS 16.x a black screen is displayed when run from the device. When run from XCode the example runs as expected.
This was initially found in our client app, but has been reproduced using example-17 from Xcode

Devices tested:

  • iPhoneX (iOS 16.7.10 Latest available) - Issue occurs
  • iPhone 8 (iOS 16.7.10 Latest available) - Issue occurs
  • iPhone SE (iOS 15.8.3 Latest available) - No Issues
  • iPadPro 11in iOS 17.6.1 - No Issues

To Reproduce
Mac Mini M1, 2020 running Sonoma 14.6.1 + XCode 15.2
Grab latest bgfx, bx and bimg using git
cd into the bgfx folder
run "make projgen"
Open the .build/projects/xcode9-ios folder and open bgfx.xcworkspace in XCode
Adjust the signing and attempt to build the workspace
Build will fail as xcode can't find malloc.h in fontstash.h and allocator.cpp.
Change the #include <malloc.h> to #include <stdio.h> in both places.
Build the example-17-drawstress app successfully
Deploy the app to a device running iOS 16.x and run it using the debugger
The example app will work correctly and display the array of coloured cubes
Stop the debugger
Run the app directly from the phone
The example app will show a black screen
Try the same with iOS 17.x - this will work correctly when launched from the device
Re-target the Xcode project to iOS 15.6 and try on an iOS 15 device - this will work correctly when launched from the device

Expected behavior
The app should work correctly when run from the device

Screenshots
Not really worthwhile as it's showing a black screen!

Additional context
When built for our app It was found that the change that broke this was the commit 5f56 on the 18th August 2023.
Rewinding to the following branches works across all iOS devices:

  • bgfx 17th August '23 (0758)
  • bimg 24th April '23 (ec02)
  • bx 3th July '23 (198c)

I suspect that there is something within the deprecation fixes to renderer_mtl.mm that are not compatible with iOS 16
5f564db

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant