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

Simulator crashes when using playdate.system.error #90

Open
ninovanhooff opened this issue Dec 7, 2024 · 1 comment
Open

Simulator crashes when using playdate.system.error #90

ninovanhooff opened this issue Dec 7, 2024 · 1 comment

Comments

@ninovanhooff
Copy link
Collaborator

ninovanhooff commented Dec 7, 2024

When calling playdate.system.error("somestring") the simulator prints the message in red to the console as expected.

When someone attempts to restart the simulator using cmd-/ctrl-R, the handler processes the event kEventTerminate. When you use certain functions ?that attempt to allocate?, the simulator freezes. Attaching a debugger shows a BAD_ACCESS_EXCEPTION after going trough a memtrace codepath

image
image

For a reproducible example, see ninovanhooff@79c8529

In this example it is the things.join call in proc print where the crash happens.

Reproduce:

Observed on Mac OS; simulator 2.6.2

  • compile and start the exampe project in the simulator
  • open the simulator console
  • press up on the dpad.
  • this produces the red "This is an Error message" in the console and pauses the simulator as expected
  • When pressing the restart button, the simulator hangs and needs a force-close

The freeze does not happen when removing the print "testtest" line

@Nycto
Copy link
Collaborator

Nycto commented Dec 8, 2024

Interesting -- I've got a branch that completely cuts out the memtracing code when it's not turned on. I'll clean that up and submit a CR. We can see if it helps.

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

No branches or pull requests

2 participants