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

PsyTimers, need to destroy their GSource when disposed or canceled. #135

Open
maartenuni opened this issue Nov 5, 2024 · 1 comment
Open
Assignees
Labels
bug Something isn't working

Comments

@maartenuni
Copy link
Contributor

In the unit tests we sometimes draw stuff without a GMainLoop running. this results in sources being invoked on disposed/finalized Timers..

@maartenuni maartenuni added the bug Something isn't working label Nov 5, 2024
@maartenuni maartenuni self-assigned this Nov 5, 2024
@maartenuni maartenuni changed the title PsyTimers, need to destroy their GSource when disposed PsyTimers, need to destroy their GSource when disposed or canceled. Feb 12, 2025
@maartenuni
Copy link
Contributor Author

They also need to dispose the GSource when, they are canceling a timer. E.g when setting the timer, we first cancel it. Then set a new time and register it with the thread. However, it can be the case that the thread has already initiated a new fire with a GSource and set a source_id on the timer. If it fires again, the timers->source_id is overwritten and we lose the reference to that source id and a newly created mainloop further in the tests is going to handle that source, on a timer that has been destroyed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant