question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

examples: interactive_play.py - segmentation fault

See original GitHub issue

Habitat-Lab and Habitat-Sim versions

Habitat-Lab: master Habitat-Sim: stable (installed via conda)

❓ Questions and Help

I am trying to get the example code to run if I run python examples/interactive_play.py I am getting a Segmentation fault error.

Fatal Python error: (pygame parachute) Segmentation Fault

Current thread 0x00007f8cffe50340 (most recent call first):
  File "/home/Pia/anaconda3/envs/habitat-36/lib/python3.6/site-packages/habitat_sim/simulator.py", line 615 in draw_observation
  File "/home/Pia/anaconda3/envs/habitat-36/lib/python3.6/site-packages/habitat_sim/simulator.py", line 400 in get_sensor_observations
  File "/home/Pia/Development/manipulation/habitat-lab/habitat/tasks/rearrange/rearrange_sim.py", line 368 in step
  File "/home/Pia/Development/manipulation/habitat-lab/habitat/tasks/rearrange/actions.py", line 68 in step
  File "/home/Pia/Development/manipulation/habitat-lab/habitat/core/embodied_task.py", line 303 in step
  File "/home/Pia/Development/manipulation/habitat-lab/habitat/tasks/rearrange/rearrange_task.py", line 48 in step
  File "/home/Pia/Development/manipulation/habitat-lab/habitat/tasks/rearrange/rearrange_pick_task.py", line 144 in step
  File "/home/Pia/Development/manipulation/habitat-lab/habitat/core/env.py", line 267 in step
  File "examples/interactive_play.py", line 127 in step_env
  File "examples/interactive_play.py", line 248 in get_input_vel_ctlr
  File "examples/interactive_play.py", line 297 in play_env
  File "examples/interactive_play.py", line 376 in <module>
Aborted (core dumped)

The error arises in line 292 of interactive_play.py, when the variable step_results is set. The error seems to be related to the renderer. The segmentation fault finally happens in line 615 of habitat-sim/simulator.py (last stable version) self._sim.renderer.draw(self._sensor_object, self._sim).

Any idea how to fix this, or whether I am something is missing? Thank you very much!

A little side information: If I comment the following lines in interactive_play.py

screen = pygame.display.set_mode(
            [draw_obs.shape[1], draw_obs.shape[0]]
)

and create the scene within the while loop (just for debugging here)

screen = pygame.display.set_mode([640, 512])   # new line added
screen.blit(draw_obuse_ob, (0, 0))

I can see the rendered output in the first iteration of the while loop, but the segmentation fault error appears again in the second iteration of the while loop, when step_result is computed.

If I use the last stable version of habitat-lab, the interactive_play.py script runs, however the shown output is black and the terminal outputs repetitively the following two lines:

W0721 20:14:02.845535 15000 PhysicsManager.cpp:248] ::addObject : simpleObjectHandle : new_obj_viz
W0721 20:14:02.845551 15000 PhysicsManager.cpp:251] ::addObject : newObjectHandle : new_obj_viz_:0000

Issue Analytics

  • State:open
  • Created 2 years ago
  • Reactions:4
  • Comments:5

github_iconTop GitHub Comments

6reactions
Stefuniversecommented, Nov 13, 2021

Hi, we are using this repo for a project at university and one of my project partners found, that you can start the example by installing an earlier pygame version.

pip install pygame==1.9.6

I am not sure, if this could be a final solution for this issue, because I am not sure of the implications of using this earlier version but it can at least be a workaround for you.

0reactions
guhurcommented, Nov 19, 2021

@Stefuniverse’s solution is working for me! Thanks

Read more comments on GitHub >

github_iconTop Results From Across the Web

Python Interactive mode on Arch Linux ... - Unix StackExchange
Using Arch Linux everytime I try to use Python interactive mode no matter what I type I get Segmentation fault (core dumped) and...
Read more >
Error: Segmentation fault (core dumped) - python
"Segmentation fault (core dumped)" is the string that Linux prints when a program exits with a SIGSEGV signal and you have core creation ......
Read more >
Issue 23187: Segmentation fault, possibly asyncio related
msg233608 ‑ (view) Author: Ivailo Karamanolev (karamanolev) Date: 2015‑01‑07 23:41 msg233609 ‑ (view) Author: Guido van Rossum (gvanrossum) * Date: 2015‑01‑07 23:48 msg233610 ‑ (view)...
Read more >
The 2018 Model Aquatic Health Code (MAHC) Annex - CDC
Examples include swimming pools, wave pools, lazy rivers, surf pools, ... “Ground-Fault Circuit Interrupter” (GFCI) means a device for ...
Read more >
neural and computational mechanisms of bidding behaviour
RL, reinforcement learning; RPE, reward prediction error; RW, Rescorla– ... example, in a simple auction with one buyer and one seller,.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found