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 ()
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 Exitand then the exception handling is| Exit -> clear_graph ()