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

Some interesting output when debugging tetra examples or games #152

Open
johanlindfors opened this issue Nov 24, 2019 · 3 comments
Open
Labels
Area: Platform Issues relating to the platform layer Platform Specific: macOS Issues that are specific to systems running macOS. Status: Needs Replicating Indicates that the issue cannot be replicated - this doesn't necessarily mean it's invalid! Type: Investigation Ongoing investigations and unanswered questions.

Comments

@johanlindfors
Copy link
Contributor

I am using Visual Studio Code to develop with tetra on MacOS, and it's a very nice environment after having added the "LLDB" and "Rust (rls)" extensions. By adding launch configurations (Visual Studio Code automatically adds debug configurations by examining cargo.toml), I can debug and set breakpoints.

An interesting aspect though is that when running any sample I get the following output in the debug terminal, this is prior to having done any explicit graphics::draw call:

2019-11-24 10:54:51.396156+0100 tetras[9199:547938] [plugin] AddInstanceForFactory: No factory registered for id <CFUUID 0x1011042c0> F8BB1C28-BAE8-11D6-9C31-00039315CD46 2019-11-24 10:54:51.417284+0100 tetras[9199:547938] HALC_ShellDriverPlugIn::Open: Can't get a pointer to the Open routine 2019-11-24 10:54:51.417528+0100 tetras[9199:547938] HALC_ShellDriverPlugIn::Open: Can't get a pointer to the Open routine 2019-11-24 10:54:51.604498+0100 tetras[9199:547992] flock failed to lock maps file: errno = 35 2019-11-24 10:54:51.604770+0100 tetras[9199:547992] flock failed to lock maps file: errno = 35 2019-11-24 10:55:27.478664+0100 tetras[9199:547938] [tetras] CGContextSetFillColorWithColor: invalid context 0x0. If you want to see the backtrace, please set CG_CONTEXT_SHOW_BACKTRACE environmental variable. 2019-11-24 10:55:27.478692+0100 tetras[9199:547938] [tetras] CGContextGetCompositeOperation: invalid context 0x0. If you want to see the backtrace, please set CG_CONTEXT_SHOW_BACKTRACE environmental variable. 2019-11-24 10:55:27.478700+0100 tetras[9199:547938] [tetras] CGContextSetCompositeOperation: invalid context 0x0. If you want to see the backtrace, please set CG_CONTEXT_SHOW_BACKTRACE environmental variable. 2019-11-24 10:55:27.478706+0100 tetras[9199:547938] [tetras] CGContextFillRects: invalid context 0x0. If you want to see the backtrace, please set CG_CONTEXT_SHOW_BACKTRACE environmental variable. 2019-11-24 10:55:27.478713+0100 tetras[9199:547938] [tetras] CGContextSetCompositeOperation: invalid context 0x0. If you want to see the backtrace, please set CG_CONTEXT_SHOW_BACKTRACE environmental variable.

The code will run and work as expected but maybe you have some ideas on what might be causing this? Feel free to close this if it's "expected" behaviour.

@17cupsofcoffee 17cupsofcoffee added Area: Platform Issues relating to the platform layer Type: Discussion labels Nov 24, 2019
@17cupsofcoffee
Copy link
Owner

I found an instance of someone getting the same output, and it seems to originate from SDL2: gameprogcpp/code#24

The developer of that project noted that updating SDL2 fixed crashes on Mojave, but they still got the same output on the first frame: gameprogcpp/code#25

So I think this is something upstream in SDL2? I'd be interested to see if you get the same output from another SDL2-based engine (like Love2D or FNA or something like that) - if so, it's probably something that's out of our hands :)

@17cupsofcoffee 17cupsofcoffee added the Platform Specific: macOS Issues that are specific to systems running macOS. label Nov 24, 2019
@johanlindfors
Copy link
Contributor Author

Sorry, but I'm not really certain on how to check which versions of the SDL2 libraries I have installed and is referencing from rust. I used the 'brew upgrade sdl2' command which installed the latest I guess, but the "errors" are still appearing. On a separate machine it seems I already had the latest libraries, well at least that's what brew told me.

@17cupsofcoffee
Copy link
Owner

The version in Homebrew is apparently 2.0.10, which is the current SDL version according to their website.

@17cupsofcoffee 17cupsofcoffee added the Area: High DPI Support Issues relating to high DPI rendering. The bane of every engine dev's life. label Dec 26, 2019
@17cupsofcoffee 17cupsofcoffee removed the Area: High DPI Support Issues relating to high DPI rendering. The bane of every engine dev's life. label Jan 17, 2020
@17cupsofcoffee 17cupsofcoffee added the Status: Needs Replicating Indicates that the issue cannot be replicated - this doesn't necessarily mean it's invalid! label Nov 27, 2020
@17cupsofcoffee 17cupsofcoffee added Type: Bug Problems with the code/documentation that need to be fixed. Type: Investigation Ongoing investigations and unanswered questions. and removed Type: Discussion Type: Bug Problems with the code/documentation that need to be fixed. labels Dec 24, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area: Platform Issues relating to the platform layer Platform Specific: macOS Issues that are specific to systems running macOS. Status: Needs Replicating Indicates that the issue cannot be replicated - this doesn't necessarily mean it's invalid! Type: Investigation Ongoing investigations and unanswered questions.
Projects
None yet
Development

No branches or pull requests

2 participants