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

Main game loop segmentation fault #2

Open
choongjae opened this issue Dec 10, 2021 · 0 comments
Open

Main game loop segmentation fault #2

choongjae opened this issue Dec 10, 2021 · 0 comments

Comments

@choongjae
Copy link
Owner

We've been running into segmentation faults in our main game loop. Changing the conditional to if st.key = 'q' then clear_graph () fixes the problem, but then we have no need for a try-with expression, because clear_graph doesn't raise any errors. In fact, I'm not sure why clear_graph () works, because it's only supposed to clear the window - not delete it. On the other hand, if st.key = 'q' then close_graph () still causes a segmentation fault.

For now, I'm making it so that if st.key = 'q' then raise Exit and then the exception handling is | Exit -> clear_graph ()

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

1 participant