Skip to content

Crash When Switching Camera Projection After Initialization #6910

@CoolSpy3

Description

@CoolSpy3

Describe the Bug
If a Camera's projection field is changed after its been initialized, Webots attempts (and fails) to regenerate its memory-mapped file and then crashes on the next timestep. This is probably a result of some assumptions that the file will never change.

The initial error could probably be corrected by adding in a fallback to an alternate filename, however, some more work probably has to be done to ensure that the rest of the code (e.g. the controller api) is properly notified of the change. It would be even nicer if there was a way to get the code to gracefully-release the old file before creating the new one, but that might not be easily possible.

Steps to Reproduce

  1. Open the camera.wbt sample world.
  2. Make sure the simulation is running
  3. Find the Camera node in the Scene Tree
  4. Set its projection field to spherical
  5. Crash

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingcrashCause a crash

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions