-
-
Notifications
You must be signed in to change notification settings - Fork 2.6k
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
General issue for other problems with xcode 10 / macos 10.14 #6149
Comments
I was describing this odd behavior here (and seeing similar crashes on xcode 10): basically many OF objects constructors are not getting called :( If you use legacy build on xcode 10 this particular problem goes away. I see weirder compile things happening too like changes to ofApp.h not triggering rebuilds of ofApp.cpp and other header related issues. With the legacy build system we still have issues with window needing to be moved and the plist permissions for things like camera. At the moment I'm looking at ways of forcing legacy build system via xcode project workspace settings. |
here's reference to the window needs moving issue (for sdl) https://www.syntaxbomb.com/index.php?topic=4927.0 |
vsync on mojave |
wonder if we should do a quick release with theo's changes + legacy build enabled in projects until we figure out how to fix using new builds |
discussion of mojave move window bug on glfw |
@arturoc yes I am looking at the legacy thing now but couldn't find a way to automate it through project generator yet... with the legacy build and xcode 10 you still have the white screen on startup problem (maybe can be fixed with a quick move window hack). on xcode 9.4.1 on mojave we don't seem to have that problem but I want to test a little more. |
also to make matters worse, xcode in 9.4.1 + mojave doesn't seem to load the plist properly so permissions for things like camera usage breaks there. If you open the app outside of xcode (ie, a build .app) plist works. I think the ideal mojave build system is xcode 10 + legacy build + window hack + plist with alot of permissions set. looking at how to make that happen. |
vertical sync issues described here #6146 just linking to make sure there's an account for all the mojave issues |
I would suggest you guys keep both OpenGL and Metal for Mac users, on future releases:
|
Looking at the faiface/pixel issue, it looks like updating the NSOpenGLContext fixes the issue. for OF in ofApp::setup( That would be something like this:
with these headers included and the ofApp.cpp set to C++ / Obj C++
if you want to try at the very end of ofAppGLFWWindow::setup it would just be:
if that works it could fix all the window/gl issues people are noting? |
ping @kylemcdonald @ofZach If it does I can put in a PR. |
just a note that putting this in setup on xcode 10 w/ legacy build doesn't fix the first frame issue |
in update this works: if (ofGetFrameNum() < 2){ but not ofGetFrameNum() < 1.... it seems like you have to wait a few frames for this to work |
Thanks @ofZach ! That blows, but is helpful to know! I think I saw something in the glfw posts that the update call has to happen during or after a buffer swap or something. I'll see if there is something else we can do to make sure ofApp::setup has a proper context to work with. |
@ofTheo some more info on the rendering at launch bug here: https://stackoverflow.com/questions/52938516/opengl-not-rendering-on-macos-mojave and glfw fix |
Couple of issues I have ran into recently: Xcode doesn't recognize changes in header files. In troubleshooting the above I tried switching to Legacy Build however I then can no longer clean the project error message thinks I am using the new system however I confirmed it was switched to legacy and had restarted Xcode I've also see just simple stuff causing crashes (pushing strings into vectors). clean/switch build system sometimes fixes it. |
So I think the render / glfw bug is fixed in their master branch. I am going to update apothecary to try and pull that branch. |
This is the PR for apothecary to pull from the latest glfw which has 10.14 fixes. |
So I just built a zip from the patch-release branch for testing. Might be good to check the ascii video example for the camera permissions which should now be in there. GLFW and rendering is the big unknown, but the current glfw should be included which has a fix for rendering in mojave. Will share on the forum too. |
@ofTheo here some notes on this --
I'll dig further into how we can force legacy -- I found specific files that do this may need to tweak things at the PG level. |
also a weird thing about the new build system is that changes to the ofApp.h file don't seem to be recognized. for example, I can type this into the the h file and it still compiles. there's something off it seems header related (the crashes I see relate to constructors of objects created in .h files not getting called) |
@ofTheo, i'm traveling at the moment. if you merge patch-release into master the next day nightly build will have the changes. |
Thanks @ofZach thats really helpful! I found the file to force the legacy build in the Xcode template, but I think it will need a change to the Project Generator as the current one doesn't copy the file ( actually a folder project.xcworkspace ) over when generating projects. I'll add the folder to the patch-release branch and will merge to master so it will be easier to test. ( Thanks @arturoc ). Might need some help on the PG side :) Vertical Sync is a weird one, I am guessing its a GLFW bug. I don't see it on 10.13 with Xcode 10. |
Seems like V Sync is a glfw bug: |
interesting! can you try 10.13 and with the new build system, compile in debug (I don't know if I see the behavior in release). in particular, try an empty example, compile it to make it run, and then add an ofVideoGrabber to it in the h file and setup / update / draw. I get a crash in setup() since the constructor doesn't get called. I think there's something fishy with how it recompiles.... |
@ofZach just tried that test and I get a crash too. So I guess the new build system is universally bad and not just bad on 10.14 :) |
For the Vertical Sync issue.
|
just tested and still no dice on fixing vsync :( I wonder if a good temporary solution while we wait for a fix would be to either test for 10.14 and add ofSetFrameRate(60) and/or write up instructions about installing the 10.13 sdk.... |
it seems like maybe this is fixed in 10.14.2 ?
|
I can try this beta out and report back.... |
Ah thats sort of annoying as there isn't much we can do about it but wait :) |
Hmm. So the PG changes are in master, but the examples generated by create_packages.sh didn't seem to pull in those changes. I tested the PG locally and it copied the workspace files over enabling legacy build, but in the generated zip its still missing. Going to merge the patch-release with master and see if it comes through in the nightlies. |
Here is a release to test: https://openframeworks.cc/versions/mojave/of_v0.10.0-patch-mojave-rc3_osx_release.zip It should have the project files now for defaulting to legacy. For some reason the last nightly didn't seem to generate the project files with the new Xcode files. So this zip was made by running the OS X Project Generator made by the test server. If the next nightly still doesn't have the files I might need some help from @arturoc to track down the problem. |
on mojave xcode 10 this looks good ! -- legacy mode is loading fine (orange pickaxe) and camera permission etc all working. quick note -- on Xcode 9.4.1 w/ mojave the plist doesn't load so there's permission errors w. apps that use camera (but I think this something we can just encourage people to upgrade to Xcode 10). the plist does work on apps compiled in Xcode 9.4.1 if you run the app outside of Xcode ¯_(ツ)_/¯ |
Thats great to hear! Thanks for testing it. Interesting the plist parsing. Its strange that Xcode would have an issue with extra keys in a plist. I would of assumed it would ignore keys it doesn't recognize. I wonder if we can do a per-Xcode version plist? Will take a look.... |
Okay new zip. This should have a bunch of fixes to the Xcode template that was breaking some addons. Related to #6172 https://openframeworks.cc/versions/mojave/of_v0.10.0-patch-mojave-rc5_osx_release.zip |
Okay all changes are in master. However the build script that runs online is generating the project files the old way. It doesn't seem to be running the latest command line project generator from master. @arturoc if you have any idea about it, that is the last thing left I think? |
Okay - I just needed to recompile the PG on the ci server. Going to close this as I think all these issues should be address now. |
That's strange, the create_packages script should recompile the PG every time before creating the packages. i'll look into why it didn't but glad you got it working |
sadly 10.14.2 doesn't fix the vsync issue. @ofTheo do you think it would make sense to add some kind of check, like if compiled against 10.14 sdk use ofSetFrameRate(60) internally? |
Oh wow that blows! I could imagine there could be runtime detection of 10.14 that sets 60 - but we could also default to vertical sync on and ofSetFramereate 60 being on? It would be a change, but I can't imagine it would be a breaking change in anyway. |
hey definitely don't add that for every possible platform, even if 60hz is the most common is not the default for every monitor and a lot do 59.95 which is almost the same but we would be sleeping here and there without need which could introduce some weirdness in frame based animation and even time based I would just leave it as it is by now, and perhaps make a comment in the forum so people can find it saying that they need to fix the framerate manually by now if they are on osx 10.14 |
Opening this since more stuff comes up and not sure it even belongs on a new issue or it's all related:
https://forum.openframeworks.cc/t/ofimage-issue-in-xcode/30628
The text was updated successfully, but these errors were encountered: