Skip to content

Conversation

@Micha062301
Copy link

This change improves diagnostic capabilities by adding exit code logging when a Pygame process terminates. Preserving information about why a process exited will help troubleshoot issues in student code.

The change:

  • Adds a dedicated callback function for process termination
  • Logs when a pygame process exits with a non-zero exit code
  • The addition of logging doesn't change the functional behavior and doesn't impact compatibility.

Tested on Sugar 0.116 with multiple process exit scenarios to ensure proper logging and activity termination behavior.

This change improves diagnostic capabilities by adding exit code
logging when a pygame process terminates. This will help troubleshoot issues in student code by preserving information about why a process exited.
@quozl
Copy link
Contributor

quozl commented Apr 22, 2025

Thanks, but testing on Sugar 0.116 is unsuitable, please test on Sugar 0.121 or the HEAD of the master branch of Sugar.

@Micha062301
Copy link
Author

I've re-tested the changes on Sugar 0.121 and the current HEAD of the master branch. I'm happy to report that all tests passed successfully on both versions:

Normal program exit (code 0): Activity closes normally without logging
Error exit (code 1): Activity closes with appropriate diagnostic logging
Crash scenarios: Activity handles termination properly with logging

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