Some views unsubcribe from event handlers multiple times
See original GitHub issueDescription
View cleanup logic should not run multiple times.
WARNING | 2022-11-04 16:42:39,623 | angrmanagement.data.object_container | Double-unsubscribe of <bound method QStateTable._watch_states of <angrmanagement.ui.widgets.qstate_table.QStateTable(0x541b440) at 0x7f418604d000>> from (container: Global states list)[]
WARNING | 2022-11-04 16:42:39,804 | angrmanagement.data.object_container | Double-unsubscribe of <bound method QSimulationManagers._watch_simgr of <angrmanagement.ui.widgets.qsimulation_managers.QSimulationManagers(0x538fc50) at 0x7f4186cfbac0>> from (container: Active simulation manager)None
WARNING | 2022-11-04 16:42:39,804 | angrmanagement.data.object_container | Double-unsubscribe of <bound method QSimulationManagers._watch_simgrs of <angrmanagement.ui.widgets.qsimulation_managers.QSimulationManagers(0x538fc50) at 0x7f4186cfbac0>> from (container: Global simulation managers list)[]
WARNING | 2022-11-04 16:42:39,804 | angrmanagement.data.object_container | Double-unsubscribe of <bound method QSimulationManagers._watch_state of <angrmanagement.ui.widgets.qsimulation_managers.QSimulationManagers(0x538fc50) at 0x7f4186cfbac0>> from (container: Selected state)None
Steps to reproduce the bug
- Open angr-management
- Close all open views
- Observe warnings in log
Environment
001987f3970287837ae370a1f2b68de8bca96951
Additional context
Related #776
Issue Analytics
- State:
- Created a year ago
- Comments:6 (6 by maintainers)
Top Results From Across the Web
C# -= operator to unsubscribe from a single event multiple times
Assume subscribing to the same event multiple times is valid for this application logic, such as follows: Property_Saved += ...
Read more >How to subscribe to and unsubscribe from events - C# ...
To subscribe to events by using an anonymous function ... If you don't have to unsubscribe from an event later, you can use...
Read more >No Un-subscription from Event - New rules / languages
Every event that is subscribed to, should be unsubscribed from as well. Compliant Code Any code where subscriptions and un-subscriptions exist.
Read more >C# Unsubscribe Events - YouTube
Shows how we unsubscribe from C# events. ... C# - Delegates, Lambda Expressions, and Events ... 6.6K views 10 years ago.
Read more >c# - What should a method which creates conditionally self ...
And ideally it is passed in the constructor of the "operator". If you need to unsubscribe and subscribe on a regular basis, probably...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
iirc with the old docking system hiding was the only event we got, there was no destruction event. If hiding/destruction is working correctly now, go nuts on fixing it.
@rhelmot Which was the intention of the existing code? https://github.com/angr/angr-management/blob/41b574ed070e8112b1cf5e61e43e81286d569c86/angrmanagement/ui/widgets/qstate_table.py#L77 and https://github.com/angr/angr-management/blob/41b574ed070e8112b1cf5e61e43e81286d569c86/angrmanagement/ui/widgets/qsimulation_managers.py#L50