Closed oharboe closed 1 week ago
I can reproduce this
@gadfort you implemented the back button so I'd like your insight. I see that on the selection we make the action
makeAction({"Navigate back",...
with a lambda and when the back button is clicked we trigger the action.
When the action is run Inspector::navigateBack() calls Inspector::inspect() -> reload() -> loadActions() which deletes all the actions including the one currently being run. When we return back up the call stack we arrive at the deallocated lambda from the action.
I believe that is the source of the crash. Do you have thoughts on the best fix?
@maliberty taking a quick glance at this, I don't see an obvious fix that doesn't require some odd behavior. Possibly the proper solution is to make calls to inspect a queued connection so the Qt event loop would have to finish one thing before attempting to handle the inspect avoiding the call to reload()
until after the lambda function has returned.
Describe the bug
To reproduce:
Navigate a bit and click "Navigate back"![image](https://github.com/The-OpenROAD-Project/OpenROAD/assets/2798822/47047ff2-5e5b-4fd2-8bff-73c3e7ed703d)
Should crash after a few tries:
Expected Behavior
No crash
Environment
To Reproduce
See above
Relevant log output
No response
Screenshots
No response
Additional Context
No response