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

Segmentation fault (core dumped) with image observation offscreen rendering #770

Open
chrisgao99 opened this issue Oct 28, 2024 · 0 comments

Comments

@chrisgao99
Copy link

Hello,

This is a problem I met only with the headless remote server R, but it works fine on server C. The problem is whenenver I set image_observation True, use_render False, it will raise this error:

Current thread 0x00007fa5e4c07400 (most recent call first):
  File "/home/baz7dy/.conda/envs/ipenv1/lib/python3.9/site-packages/direct/showbase/ShowBase.py", line 890 in _doOpenWindow
  File "/home/baz7dy/.conda/envs/ipenv1/lib/python3.9/site-packages/direct/showbase/ShowBase.py", line 753 in <lambda>
  File "/home/baz7dy/.conda/envs/ipenv1/lib/python3.9/site-packages/direct/showbase/ShowBase.py", line 775 in openWindow
  File "/home/baz7dy/.conda/envs/ipenv1/lib/python3.9/site-packages/direct/showbase/ShowBase.py", line 1071 in openMainWindow
  File "/home/baz7dy/.conda/envs/ipenv1/lib/python3.9/site-packages/direct/showbase/ShowBase.py", line 1035 in openDefaultWindow
  File "/home/baz7dy/.conda/envs/ipenv1/lib/python3.9/site-packages/direct/showbase/ShowBase.py", line 342 in __init__
  File "/sfs/weka/scratch/baz7dy/INTP/metadrive/metadrive/engine/core/engine_core.py", line 208 in __init__
  File "/sfs/weka/scratch/baz7dy/INTP/metadrive/metadrive/engine/base_engine.py", line 55 in __init__
  File "/sfs/weka/scratch/baz7dy/INTP/metadrive/metadrive/engine/engine_utils.py", line 38 in initialize_engine
  File "/sfs/weka/scratch/baz7dy/INTP/metadrive/metadrive/engine/engine_utils.py", line 17 in _fix_offscreen_rendering
  File "/sfs/weka/scratch/baz7dy/INTP/metadrive/metadrive/engine/engine_utils.py", line 33 in initialize_engine
  File "/sfs/weka/scratch/baz7dy/INTP/metadrive/metadrive/envs/base_env.py", line 412 in lazy_init
  File "/sfs/weka/scratch/baz7dy/INTP/metadrive/metadrive/envs/base_env.py", line 520 in reset
  File "/sfs/weka/scratch/baz7dy/INTP/mdtrail/try_snet.py", line 29 in reset
  File "/sfs/weka/scratch/baz7dy/INTP/mdtrail/try_snet.py", line 69 in <module>
Segmentation fault (core dumped)

I found out that the error happens when it creates an offscreen window in ShowBase and I tried to print the inputs to prepare the difference between the two servers:

print("in showbase _doOpenWindow 886",pipe, name, 0, "fbprobs is: ", fbprops, "props is:", props,"flags is", flags)
win = self.graphicsEngine.makeOutput(pipe, name, 0, fbprops, props, flags)

>>>in showbase _doOpenWindow 886 <panda3d.core.GraphicsPipe object at 0x7fa4e0473f30> window1 0 fbprobs is:  depth_bits=1 color_bits=3 red_bits=1 green_bits=1 blue_bits=1 alpha_bits=1 multisamples=8 back_buffers=1 force_hardware  props is: origin=(-2, -2) size=(1, 1) title="MetaDrive v0.4.2.3" !undecorated !fixed_size !fullscreen open !cursor_hidden absolute  flags is 2052

But I didn't find any difference so the input configs are not the reason it fails.

I guess the reason may be because of driver and opengl compatibility but I'm not sure where to start. Could you provide any ideas or suggestions for solving the problem? I would truly appreciate it.

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