| Summary: | Launch history generation could be more robust | ||||||||
|---|---|---|---|---|---|---|---|---|---|
| Product: | [Eclipse Project] Platform | Reporter: | Remy Suen <remy.suen> | ||||||
| Component: | Debug | Assignee: | Michael Rennie <Michael_Rennie> | ||||||
| Status: | VERIFIED FIXED | QA Contact: | |||||||
| Severity: | normal | ||||||||
| Priority: | P3 | CC: | darin.eclipse, Michael_Rennie | ||||||
| Version: | 3.5 | Flags: | darin.eclipse:
review+
|
||||||
| Target Milestone: | 3.5 RC1 | ||||||||
| Hardware: | All | ||||||||
| OS: | All | ||||||||
| Whiteboard: | |||||||||
| Attachments: |
|
||||||||
|
Description
Remy Suen
(In reply to comment #0) > Speaking of bad launch > configurations, I did have one launch configuration that had no name, it was > the last one I launched before Eclipse crashed. To clarify, I'm pretty sure it had a name (I launched the main class via the context menu). But when I restarted the name was lost (but I could identify it by its main class). Created attachment 133109 [details]
Malformed launchConfigurationHistory.xml
Okay, maybe it didn't have a name after all. Restarting Eclipse doesn't help. Deleting the .metadata/.plugins/org.eclipse.debug.core/ folder doesn't help. Deleting .metadata/.plugins/org.eclipse.debug.ui/launchConfigurationHistory.xml did the trick.
As you can see from the file, there is a launch configuration with no name.
I have filed bug 273656 for the buggy launch configuration generation code. While the fix for bug 273656 will prevent Eclipse from creating configurations with no name, we should examine what we are doing during the history restore phase. As Remy mentioned we should not toss the whole history just because one (or more) configurations have errors / problems. Created attachment 134283 [details]
proposed fix
Inspecting the code we are doing the correct thing, we prune any configuration that has errors / problems when trying to restore the history(s). Looking at the configuration code itself, we should be checking the name attribute when we load it from the memento, and throw an exception if the name is undefined.
The patch extends the support we had - which checked if attributes were present - with checking if the attributes actually have values.
applied patch to HEAD please verify Darin W Verified. |