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
Xcode project template doesn't work #222
Comments
Hi! I can't remember if it's in a working state (on macOS) but the sample And indeed I didn't even realize there was something under |
|
What's the crash call stack? |
Call stack:
In
and I can see in the debugger that |
It sounds like the Metal RenderSystem didn't get loaded at all. Is there an Ogre.log generated? Could you upload it? |
Where would I look for Ogre.log? |
I suspect it was trying to put Ogre.log somewhere it didn't have permission to write. I changed the |
Hi thanks! And the same is happening with the plugins.cfg file (which tells which plugins to load and their locations, including RenderSystems) It couldn't find it so no RenderSystems loaded leads to the crash, either because the relative path is wrong for mac, or because the file is not being included into the bundle |
You're right, the file is not being included in the bundle, but even if I fix that, it still doesn't work, because the sample isn't looking in the bundle for the plugins.cfg file. It's just looking in the current working directory, wherever the heck that is. It's awkward to fix that without using any Objective-C, but I'll see what I can do. |
We provide some helpers which should help you on this issue (source code) |
Yes, that helps. If I replace the line
with
then it gets past the configuration dialog before crashing. The new crash call stack:
|
Ok I don't recognize the error and it sounds like the VaoManager pointer passed along via constructors to GpuResource is either nullptr or corrupted (possibly corrupted because it says Is there any chance you mixed a Debug DLL (dynlib) of MetalRenderSystem with a Release version of OgreMain (or viceversa)? |
No, I've never built Release versions of any of the Ogre libraries. |
Something I don't understand is happening in the constructor of |
That can happen because:
|
Huh, I don't know what happened, but you're right... I just deleted all the frameworks and rebuilt them, and now I get past that error. Now I get a new error,
I suppose I just need to copy some stuff into the bundle. I'll play with that tomorrow. Thanks for all your help. |
Ah yeah that error means that either |
Having fixed that error, the program hangs. If I turn on Undefined Behavior Sanitizer, I see some log messages:
|
OK I pushed a fix for the UB bug. Thanks! But I don't think that was the cause of your crash. Is the callstack there? (when sanitizer is off, or after pulling my fix) |
At this point I don't have a crash, but a hang. Using the Time Profiler in Instruments, the heaviest stack trace (after pulling your fix) is:
|
Ah! Thanks! Are you able to submit your changes to get Tutorial 00 to this stage? That'd make my work easier to check this issue |
Not sure what you mean by "submit your changes", in what form? |
Either a diff or pull request. If you think the changes aren't good enough (ie. has some hardcoded stuff) posting a patch here is fine |
Aside from my change to the
That last step might not be required to be able to run the app under the Xcode debugger, but is needed to run the app independently. |
The sample now loads, but there is no rendering yet
OK I took a look at the sample. I pushed a fix for the initial crashes you found. However I got to the same point as you (the app "freezes" doing nothing). Actually it works fine, but the render loop iterates without displaying anything on screen After a quick inspection the problem is about window handling. On macOS we have been relying on SDL to handle events and windowing. Without SDL, there Ogre creates Ogre is currently not providing one out of the box and the sample is not providing one either. On iOS the samples provide an Thus that's why it's not working... there's missing code, that hasn't been written yet. I'm no macOS windowing expert; thus perhaps you or someone else is better suited than me to fix it. Help is appreciated. |
EmptyProject sample (https://ogrecave.github.io/ogre-next/api/2.3/_using_ogre_in_your_app.html#SpeedingThingsUp) replaces these templates These templates are also ancient
Thanks, I'll see what I can do. By the way, have you considered turning on GitHub's Discussions tab? Personally I like that better than going elsewhere for forums. |
How did you come to the conclusion that a window controller was needed? I did a bit of testing in Tutorial01, one of the samples that works with SDL. At least as of the end of What looks more questionable to me is that |
Based on example code on the internet it looks like the missing piece. But again like I said I have very little experience with NSWindow in general, thus I could be wrong. |
See pull request #223 |
System Information
Detailed description
The Xcode template in SDK/OSX/Xcode Templates/Xcode4/Project Templates/Ogre produces a broken project that can't find its files. I guess that shouldn't be too much of a surprise given the "Xcode4" in the path, when Xcode is at version 12. After I started fixing search paths and so forth, I found that the template files reference a deprecated header
OgreRenderWindow.h
, and requires a 3rd-party library called OIS. It would be great if there were an up to date macOS Xcode project template or starter project that uses only native functions other than Ogre, no SDL or OIS.The text was updated successfully, but these errors were encountered: