eclipse-embed-cdt / eclipse-plugins

The Eclipse Embedded CDT plug-ins for Arm & RISC-V C/C++ developers (formerly known as the GNU MCU Eclipse plug-ins). Includes the archive of previous plug-ins versions, as Releases.
http://eclipse-embed-cdt.github.io/
Eclipse Public License 2.0
554 stars 130 forks source link

pyocd: fix continued errors caused by updating TabDebugger after closed #470

Closed flit closed 3 years ago

flit commented 3 years ago

There were still some occasional errors raised when the launch config dialog was closed or a different launch config selected before the asynchronous data load jobs were finished. This PR changes to use the isDisposed() method of the debugger tab's control (I just didn't know which was the right API to use). It also adds an additional check from the UI jobs prior to actually modifying the widgets.

ilg-ul commented 3 years ago

Nothing specific, just that my recollection of the debugger internals would make my review of little practical value.

flit commented 3 years ago

@jonahgraham Thanks for the review. There is a currently 60 second timeout on calls to the pyocd tool. If you'd prefer more active cancellation I can put it on my list.

jonahgraham commented 3 years ago

@flit I have no idea what the effect of leaving the pending calls around are? If those background operations have no negative effect then nothing to do. I don't have experience with pyocd, so I leave that in your discretion.

flit commented 3 years ago

I don't think there is any negative effect (at least when pyocd itself is called, excepting cases like if the user filled in the path to rm). In the cases where pyocd is called from the launch config editor, it is only reporting data and not actively performing any action. It doesn't even open the USB devices that it probes (just reads device descriptor strings).