Fix bug in Python "example.wbt" world #6708
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
When running the simulation this error message appears: Error: wb_supervisor_field_get_type() called with invalid 'field' argument.
Related Issues
Fixes #6707
Tasks
Additional Information
I suspect that the bug is related to PR #6613.
webots/src/controller/c/supervisor.c
Lines 1398 to 1422 in 37f0c14
The check_field failed, meaning the field reference (WbFieldRef) was not found in the field_list.
That means that the field_list is not updated correctly, or the field reference f was not properly retreived from wb_supervisor_field_get_type method.