Skip to content

Add process termination diagnostic logging in PyGameActivity #110

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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

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