Skip to content

Conversation

@francesco-mannella
Copy link

Modified roboschool/cpp-household/python-binding.py so that OpenGL is correctly initialized in the two cases (app instance was already allocated or not)

@francesco-mannella
Copy link
Author

The else clause is useless. The needed change is uncommenting line 159

@olegklimov
Copy link
Contributor

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.

@francesco-mannella
Copy link
Author

francesco-mannella commented Feb 13, 2019

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)

@pzhokhov
Copy link
Contributor

pzhokhov commented May 3, 2019

@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!

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

Successfully merging this pull request may close these issues.

3 participants