State:Closed|icon_bug|icon_katana|database:public|Resolution:Fixed|TargetRelease:3.1v6|BugID:397080|
Problem summary:
It is somehow possible for the list of collapsed events to be modified at the same time that it is being used. This leads to an exception being raised.
Steps to reproduce:
em = Utils.EventModuledef handler1(event): print('Handler1: ', event) em.QueueEvent('event2', 0) QtWidgets.QApplication.processEvents() # Events only get added to self.__collapsedEvents if# there are any handlers registered that consume them.def handler2(event): passem.RegisterCollapsedHandler(handler1, 'event1', 0)em.RegisterCollapsedHandler(handler2, 'event2', 0)em.QueueEvent('event1', 0) Expected behaviour:
If events are queued while previous events are being processed, they should be deferred until the next update, instead of raising an exception.
Actual behaviour:
The following exception is printed to the terminal.
[ERROR python.root]: A Runtime[ERROR python.root]: A RuntimeError occurred in "EventModuleUI.py": dictionary changed size during iterationTraceback (most recent call last):File "bin/software_python/Utils/v5/EventModuleUI.py", line 128, in invokeCollapsedHandlers The user also reported that Katana became unresponsive at the same time.
Workaround:
No known workaround.
Tested versions/platforms:
Customer version/platform:
We're sorry to hear that
Please tell us why