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

Closing environment causes a crash #499

Open
Jonii opened this issue Oct 19, 2023 · 0 comments
Open

Closing environment causes a crash #499

Jonii opened this issue Oct 19, 2023 · 0 comments

Comments

@Jonii
Copy link

Jonii commented Oct 19, 2023

import gymnasium as gym

game_name = 'ALE/MontezumaRevenge-v5'
env = gym.make(game_name, render_mode="human")
obs, _ = env.reset()
env.close()

import time

print("sleeping")
time.sleep(5)

What's expected is that the game would open and close, you'd see text "sleeping", and after 5s, the program exits. What actually happens is that the game window stays up for 5s, after which the program exits. The actual game renders properly until you try to close it, this example does not demonstrate that part since it is working as expected.

This bug is made worse in Jupyter, where this causes the Python kernel to crash if you try to render the game.

Using version 0.8.1 on Ubuntu 22.04.

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