Bug 482062 - Add diagnostic logging to SubMonitor
Summary: Add diagnostic logging to SubMonitor
Status: RESOLVED FIXED
Alias: None
Product: Equinox
Classification: Eclipse Project
Component: Components (show other bugs)
Version: unspecified   Edit
Hardware: PC Linux
: P3 normal (vote)
Target Milestone: 4.13 RC1   Edit
Assignee: Stefan Xenos CLA
QA Contact:
URL:
Whiteboard:
Keywords: noteworthy
Depends on:
Blocks:
 
Reported: 2015-11-12 22:25 EST by Stefan Xenos CLA
Modified: 2019-08-23 08:35 EDT (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Stefan Xenos CLA 2015-11-12 22:25:38 EST
We should have some sort of diagnostic mode that SubMonitor can be put into which will log a stack trace whenever it is used incorrectly.

The sort of errors we can detect are:
1. Attempt to report progress before any ticks are allocated (via beginTask or setWorkRemaining)
2. Attempt to invoke beginTask more than once
3. Attempt to report progress on a monitor after invoking done()
4. Attempt to report more progress than there were ticks allocated on the monitor
5. Attempt to report 0 ticks

We should optionally log these so that such errors can be fixed.
Comment 1 Stefan Xenos CLA 2015-11-12 22:28:04 EST
Also, we should revert the fix to bug 252446 since it covers up bugs of type 1.
Comment 2 Eclipse Genie CLA 2015-11-12 22:32:59 EST
New Gerrit change created: https://git.eclipse.org/r/60285
Comment 3 Lars Vogel CLA 2015-11-13 02:07:05 EST
+1. I suggest to use the tracing facilities of Eclipse to activate them.
Comment 4 Eclipse Genie CLA 2016-04-21 21:25:57 EDT
New Gerrit change created: https://git.eclipse.org/r/71196
Comment 7 Lars Vogel CLA 2016-04-23 02:28:02 EDT
Stefan, please add this to our N&N M7.
Comment 8 Lars Vogel CLA 2019-08-23 08:17:11 EDT
(In reply to Lars Vogel from comment #7)
> Stefan, please add this to our N&N M7.

Not done, took me a longer time to refind this bug. I suggest we add this as N&N to our current release.
Comment 9 Eclipse Genie CLA 2019-08-23 08:34:44 EDT
New Gerrit change created: https://git.eclipse.org/r/148221