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

FIX debug bitmap should not be free'd #80

Merged
merged 3 commits into from
Oct 12, 2024

Conversation

ninovanhooff
Copy link
Collaborator

⚠️ I'm out of my depth here

Please review carefully, but I think this is the way to do it

Before this change
Simulator would crash with a nillegal access exception on the second invocation of this sample

let debugBitmap = gfx.getDebugBitmap()
gfx.pushContext(debugBitmap)
gfx.fillRect(x, y, width, height, kColorWhite)
gfx.popContext()

After this change
🌞

@Nycto
Copy link
Collaborator

Nycto commented Oct 12, 2024

Does this repro if you put it in a test?

@ninovanhooff
Copy link
Collaborator Author

Yes. Though on Mac the Simulator freezes indefinetly if the test is broken.
Either on linux this doesn't happen, or the github runner will time out, which would also make the test fail. It would then be hard to trace that fail back to this test tho.

Added a test to t_ghraphics

By the way, if you could add a little manual to README.md on how to run the tests locally, that would be appreciated. I used the very crude

 rm ./stderr.txt && rm ./stdout.txt && nimble simulator && open --stdout ./stdout.txt --stderr ./stderr.txt ./tests.pdx

Inside the tests folder.

@Nycto Nycto merged commit 321bb88 into samdze:dev Oct 12, 2024
4 checks passed
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

Successfully merging this pull request may close these issues.

2 participants