Open francesco-mannella opened 5 years ago
The else clause is useless. The needed change is uncommenting line 159
Can you please provide a small script to reproduce the crash? Like create and destroy environment so this else branch is triggered, crash can be observed before this change, no crash after.
Can you please provide a small script to reproduce the crash? Like create and destroy environment so this else branch is triggered, crash can be observed before this change, no crash after.
The issue was the same as #141. The following code crashed before the proposed change:
import gym, roboschool
from OpenGL import GLU
import time
env = [None, None]
for i in range(2):
env[i] = gym.make('RoboschoolReacher-v1')
env[i].reset()
while True:
for i in range(2):
action = env[i].action_space.sample()
observation, reward, done, info = env[i].step(action)
print("Render")
env[i].render()
time.sleep(1)
@francesco-mannella so the only change was to uncomment the line on line 159? Could you also add a python unit test (for instance, the one that would run the snippet that you provided)? Thanks!
Modified roboschool/cpp-household/python-binding.py so that OpenGL is correctly initialized in the two cases (app instance was already allocated or not)