Controller Service Fails to Handle Multiple Controllers with Same References for Different Entities
Description
The current implementation of the ControllerService
class does not correctly handle the scenario where multiple entities have controllers with the same references. This leads to incorrect controller ID mappings and potential runtime errors when attempting to change the state of a controller.
Steps to Reproduce
- Create multiple entities, each with user-defined controllers that have the same reference.
- Attempt to change the state of a controller for one of the entities using the
ActivateControllerAction
. - Observe that the controller ID mapping is incorrect, leading to runtime errors or incorrect controller state changes.
Expected Behavior
The ControllerService
should correctly handle multiple entities with controllers that have the same references. Each entity should maintain its own mapping of controller references to controller IDs.
Actual Behavior
The ControllerService
fails to maintain separate mappings for each entity, leading to incorrect controller ID mappings and potential runtime errors.
Edited by René Paris