OF_FULLSCREEN Causing Crash with `validateRenderPassDescriptor`

My app is crashing when I use OF_FULLSCREEN, like ofSetupOpenGL(1920,1080,OF_FULLSCREEN);. I repeatedly get this:

validateRenderPassDescriptor:885: failed assertion renderTargetHeight (1800) must be <= minimum attachment height (1694).'

None of the following actions have removed the error or changed the values reported in the error:
— Entering a variety of different resolutions
— Running on an external monitor
— Running on the laptop’s monitor with the external monitor disconnected

When I search for this online it turns up remarkably little, not even for just “validateRenderPassDescriptor”.

I have found that the error occurs after update() completes but before entering the code I have in draw(). When I dig through the error trace it doesn’t say anything that I am able to see as informative on what could be going on.

I am running Big Sur 11.2 on an M1 Air. My oF version is 11.0 with one workaround for Big Sur described at Building in macOS 11.0 Big Sur.

Hi!

Can you try the nightly build on the bottom of: https://openframeworks.cc/download/ ?
There are a few other GLFW fixes for M1 which might of been needed and could relate to the issue you mention.

If that works ( or doesn’t work ) please update this thread.
If its still broken I can open a GH issue for it.

Thanks,
Theo

Using the 20210209 nightly I now have the same error with my app as I do when trying to run the OpenCV example:

ld: warning: ignoring file /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.1.sdk/System/Library/Frameworks//QTKit.framework/QTKit.tbd, missing required architecture arm64 in file /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.1.sdk/System/Library/Frameworks//QTKit.framework/QTKit.tbd
Undefined symbols for architecture arm64:
  "___TBB_machine_fetchadd4", referenced from:
      ___itt_domain_create_init_3_0 in opencv.a(ittnotify_static.c.o)
      ___itt_string_handle_create_init_3_0 in opencv.a(ittnotify_static.c.o)
      ___itt_counter_create_init_3_0 in opencv.a(ittnotify_static.c.o)
      ___itt_counter_create_typed_init_3_0 in opencv.a(ittnotify_static.c.o)
      ___itt_init_ittlib in opencv.a(ittnotify_static.c.o)
ld: symbol(s) not found for architecture arm64

It looks like someone posted it at Build fails on ARM based M1 MacBookPro and then someone sent a link to where you posted workarounds before Building in macOS 11.0 Big Sur but I don’t see any shared error text there and I don’t have any reason to believe it would be the same solution because it is different parts of the code.

Thanks once again, Theo

Hi Bryan,

Do you get this with the current nightly build?
As of today it is: of_v20210209_osx_nightly.zip

Or is this with the of_v0.11.0_osx_release.zip ?

Many thanks!
Theo

EDIT: I downloaded of_v20210209_osx_nightly.zip and the folder that came out of it was of_v20210209_osx_release

Ah okay - thanks!
I’ll check on our M1 system - I believe this was working at one point.

If you try the examples/templates/emptyExample/ and set it to fullscreen in ofMain.cpp do you get any of the errors you described in the first post?

Good thought. And yes, I just checked and it worked immediately with OF_FULLSCREEN.

1 Like

Great - thanks!
I’ll double check the opencv issues and see if I can find a fix. :+1:

Hi. Can you try the nightly builds now?
202100211 or newer.

The opencv libs are now packaged a different way and hoping that might fix the Undefined symbol issue you were seeing.

I got 20210211, moved my project over, and updated the addons with Project Generator. The app seems to have the same error with different filenames. Here is the error exactly:

ld: warning: ignoring file /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.1.sdk/System/Library/Frameworks//QTKit.framework/QTKit.tbd, missing required architecture arm64 in file /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.1.sdk/System/Library/Frameworks//QTKit.framework/QTKit.tbd
Undefined symbols for architecture arm64:
  "___TBB_machine_fetchadd4", referenced from:
      ___itt_domain_create_init_3_0 in libittnotify.a(ittnotify_static.c.o)
      ___itt_string_handle_create_init_3_0 in libittnotify.a(ittnotify_static.c.o)
      ___itt_counter_create_init_3_0 in libittnotify.a(ittnotify_static.c.o)
      ___itt_counter_create_typed_init_3_0 in libittnotify.a(ittnotify_static.c.o)
      ___itt_init_ittlib in libittnotify.a(ittnotify_static.c.o)
ld: symbol(s) not found for architecture arm64
clang: error: linker command failed with exit code 1 (use -v to see invocation)

This was the same for both own own project and the OpenCv example.

p.s. I haven’t seen _runMeFirst.command in the Project Generator folder of these nightly builds so I’ve been copying it over from previous oF versions and then running it in the latest build.

Thanks @TravelByRocket

I think this is the issue here:

I am going to try and apply this patch.
It will be another day before we can test but I think it should solve the issue.

All the best,
Theo

Right on. Sounds good and thanks, I’ll be available to check it out whenever it gets applied.

Hey @TravelByRocket
There is a new nightly build up. Let me know if it works for you.

:crossed_fingers:

Thanks!
Theo

Woo! So, kinda good news… The patch seems to have worked so the app is now running for the first time with these nightly builds but I am back to the original issue with renderTargetHeight when I try running it with OF_FULLSCREEN :upside_down_face:. Everything is perfect if I use window mode.

Well that’s good news for the opencv issue!
Thanks for checking.

For the fullscreen issue - I realize the MacBook Air M1 resolution might be set to lower than 1920x1080.
What if you do:

ofSetupOpenGL(1024, 768,OF_FULLSCREEN);

Normally it shouldn’t matter - but I wonder if we are running into this GLFW / M1 bug.
Hoping I’ll get a chance to test this on my Mini M1 ( its being used as an emergency replacement computer right now ).

Yes! The sloppy parts of my app seem to be going much faster now that it is compiling for M1 directly.

I still have the same issue following your suggestion and several other resolution combinations. The dimension numbers I see in the error only change with the resolution I have the screen set at through System Preferences.

Using ofSetupOpenGL(1024, 768,OF_FULLSCREEN); I got:

  • Display resolution 1680,1050: validateRenderPassDescriptor:885: failed assertion renderTargetHeight (2100) must be <= minimum attachment height (1994).'
  • Display resolution 1440,900: validateRenderPassDescriptor:885: failed assertion renderTargetHeight (1800) must be <= minimum attachment height (1694).'
  • Display resolution 1280,800: validateRenderPassDescriptor:885: failed assertion renderTargetHeight (1600) must be <= minimum attachment height (1494).'
  • Display resolution 1024,640: validateRenderPassDescriptor:885: failed assertion renderTargetHeight (1280) must be <= minimum attachment height (1174).'

And then with display resolution at 1440,900 and using ofSetupOpenGL(W,H,OF_FULLSCREEN); where W and H are each of the four display resolution pairs I still got the same numbers in the error as I did with ofSetupOpenGL(1024,768,OF_FULLSCREEN);

Ah okay, yeah I am guessing it is something with grabbing the native window size for the fullscreen call. All those numbers are the native equivalent of the display res ( display res x 2 for retina screens ).

I’ll see if I can reproduce this here.

Hey @TravelByRocket

I can reproduce this and I have a temporary fix.
See the issue here: https://github.com/openframeworks/openFrameworks/issues/6685

I think we can get a fix for 0.11.1 but it might be a few days as I won’t have regular access to my test M1 machine.

Let me know if that works for you.
Thanks!
Theo

I’m back in action with this workaround! Thank you, thank you!

1 Like

@TravelByRocket

Hi there.
The fix should now be in the nightly releases. When you have a moment would you be able to try the nightly link at the bottom of: https://openframeworks.cc/download/ build 20210223 or newer.

Many thanks ( and for finding this issue too ) !
Theo