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

solved segfault issue when multiple rendering (#141) #171

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

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