webots: Webots crashes for null radius in `Extrusion`

Describe the Bug As surfaced here https://github.com/cyberbotics/webots/pull/3627, when changing the radius of the signs (CautionSign, ExitSign,…) to 0 or to a negative value, it crashes Webots. In practice the problem likely stems from the Extrusion sub PROTO.

Although it’s good practice to sanitize the parameters, it isn’t normal that it crashes regardless.

It is not a regression.

About this issue

  • Original URL
  • State: open
  • Created 3 years ago
  • Comments: 18 (18 by maintainers)

Most upvoted comments

Understood.

I think that I got it now but I instrumented and modified the code so much that it will take me a while to figure out the minimum set of changes for it. Basically I think that the editors are keeping references to deleted object due to the regeneration somehow. Adding connect to the destroyed signal to disable the editor might have done the trick. But I am certainly not sure that something more fundamental is not broken here. The editors should probably have been cleared and recreated but somehow the event might have been queued.

Ok it doesn’t seem to be as simple as I described it 😦 My code prevents the first crash but clicking on the spin box again crashes in a completely different place. And it doesn’t seem to crash at always the same location either so some memory must be corrupted or something like that. I will dig deeper but I have the impression that it is not just one bug 😉

Indeed I can reproduce the crash that way too. I might have a look at it next week too. Crashes tend to be easy to fix 😉