| Summary: | Launch config dialog misses last changes in program arguments (timing issue) | ||
|---|---|---|---|
| Product: | [Eclipse Project] JDT | Reporter: | Markus Keller <markus.kell.r> |
| Component: | Debug | Assignee: | JDT-Debug-Inbox <jdt-debug-inbox> |
| Status: | CLOSED WONTFIX | QA Contact: | |
| Severity: | normal | ||
| Priority: | P3 | CC: | jreimann, sarika.sinha |
| Version: | 3.6.2 | ||
| Target Milestone: | --- | ||
| Hardware: | PC | ||
| OS: | Windows 7 | ||
| Whiteboard: | stalebug | ||
Nothing new. Already happens since at least 3.6.2. This bug hasn't had any activity in quite some time. Maybe the problem got resolved, was a duplicate of something else, or became less pressing for some reason - or maybe it's still relevant but just hasn't been looked at yet. If you have further information on the current state of the bug, please add it. The information can be, for example, that the problem still occurs, that you still want the feature, that more information is needed, or that the bug is (for whatever reason) no longer relevant. -- The automated Eclipse Genie. @Jens, Do you want to work on this? I can give it a try, but I don't make any promises! So after digging a little bit into this, the problem seems clear to me. As always there are a few ways to solve this. The tabs seem to not directly update the internal state, by prevent "too many" updates by scheduling an internal update job. Which by is delayed by 200ms. So between making a change and pressing the launch button, you currently need a delay of 200ms, otherwise the launch configuration doesn't get saved. If you increase the delay in `org.eclipse.debug.ui.AbstractLaunchConfigurationTab.getUpdateJobDelay()` to something bigger than 200ms, then you can more easily test this issue. One workaround would be to ignore the call to "isDirty()" when the launch button is pressed (in `org.eclipse.debug.internal.ui.launchConfigurations.LaunchConfigurationsDialog.handleLaunchPressed()`). This seems to work for me, however it doesn't fix the issue that the "isDirty()" method is actually broken. It simply can't tell at the moment if the launch configuration is needs saving. And it gets called from a few more places. Still, it would fix the issue at hand. Another workaround would be to re-implement this "schedule" method to simply always do the update inline. However that might cause sever UI problems, as this blocks in the UI thread. I guess a more proper way to fix this, would be to enhance the interface of the launch tabs, to request some kind of "sync now" operation. Which might simply wait for the update jobs to complete, and then progress. But this would mean enhancing the interface `org.eclipse.debug.ui.ILaunchConfigurationTabGroup` and/or `org.eclipse.debug.ui.ILaunchConfigurationTab`. |
The launch configuration dialog misses changes in the program arguments field if they happen during the background validation. Steps: - launch this: import java.util.Arrays; public class Test { public static void main(final String[] args) { System.out.println(Arrays.toString(args)); } } - copy some arguments to the clipboard - edit launch configuration, go to Arguments tab, and set focus to "Program arguments" - press and hold Ctrl and then quickly press V, Enter => LCD is closed and application is started without saving the pasted arguments. Can also be reproduced by typing a letter and then quickly clicking Run/Debug.