carla-simulator / scenario_runner

Traffic scenario definition and execution engine
https://carla-scenariorunner.readthedocs.io/en/latest/
MIT License
534 stars 363 forks source link

Carla crashes with some scenarios when recording #942

Open semmelknoedel opened 2 years ago

semmelknoedel commented 2 years ago

Describe the bug Some scenarios, e.g., FollowLeadingVehicle_1 lead to a crash when the --record flag is set. Other scenarios can be recorded, e.g., when OpenScenario is used or ChangeLane_1 don't. The crash occurs with the call of: self.client.start_recorder(recorder_name, True) in scenario_runner.py I'm using the release version of carla. I also tried it with the docker container. Both have the same behavior.

There are some very rare random occasions when this doesn't lead to a crash, but I cannot see why.

To Reproduce

  1. Start FollowLeadingVehicle_1 scenario with --record path/to/file

Desktop (please complete the following information):

it crashes with

Signal 11 caught. Malloc Size=65538 LargeMemoryPoolOffset=65554 CommonUnixCrashHandler: Signal=11 Malloc Size=131160 LargeMemoryPoolOffset=196744 Malloc Size=131160 LargeMemoryPoolOffset=327928 Engine crash handling finished; re-raising signal 11 for the default handler. Good bye. Segmentation fault (core dumped)

It doesn't happen when the SCENARIO_RUNNER_ROOT is not set right.

semmelknoedel commented 2 years ago

One additional information I found out today: When I use self.client.start_recorder(recorder_name, True) it crashes. When I replace True with False there is no problem any more. However, then the metric tool doesn't have all information available.