| Summary: | Includes path lost on restart | ||||||
|---|---|---|---|---|---|---|---|
| Product: | [Tools] CDT | Reporter: | Doug Schaefer <cdtdoug> | ||||
| Component: | cdt-build-managed | Assignee: | Project Inbox <cdt-build-managed-inbox> | ||||
| Status: | REOPENED --- | QA Contact: | Jonah Graham <jonah> | ||||
| Severity: | critical | ||||||
| Priority: | P3 | CC: | eclipse.sprigogin, malaperle, yevshif | ||||
| Version: | 7.0 | ||||||
| Target Milestone: | --- | ||||||
| Hardware: | PC | ||||||
| OS: | Windows 7 | ||||||
| See Also: | https://git.eclipse.org/r/82321 | ||||||
| Whiteboard: | |||||||
| Attachments: |
|
||||||
|
Description
Doug Schaefer
I'm using Wascana 1.0 Beta 1 and I can't reproduce it. Anything in the error log? (In reply to comment #0) > The include path is lost and #include <iostream> shows a warning. Have you tried to close and reopen the file after the initial refresh finishes? (In reply to comment #1) > I'm using Wascana 1.0 Beta 1 and I can't reproduce it. Anything in the error > log? No logs. And this is reproducible on every machine I tried. Another important point is to start with a fresh workspace. (In reply to comment #2) > (In reply to comment #0) > > The include path is lost and #include <iostream> shows a warning. > > Have you tried to close and reopen the file after the initial refresh finishes? That works fine. It looks like it's lost when we shut down. The scanner discovery info is stored in the .sc file in the metadata. Is it not getting loaded any more? (In reply to comment #3) > (In reply to comment #1) > > I'm using Wascana 1.0 Beta 1 and I can't reproduce it. Anything in the error > > log? > > No logs. And this is reproducible on every machine I tried. Another important > point is to start with a fresh workspace. Thanks, that did it. (In reply to comment #3) I'm also seeing it. Ugh. I just did the same test in Galileo and it fails there too. First thing I see in the debugger: The first project created in a workspace is broken. All others after are fine. The fMap variable in ScannerConfigInfoFactory2 seems to be incomplete in the first one. There are no 'scannerConfigBuildInfo' records written to the .cproject file. (In reply to comment #8) > First thing I see in the debugger: The first project created in a workspace is > broken. All others after are fine. > The fMap variable in ScannerConfigInfoFactory2 seems to be incomplete in the > first one. There are no 'scannerConfigBuildInfo' records written to the > .cproject file. That reminds me of bug 243564 and bug 265692 Next data point: In CfgScannerConfigInfoFactory2.CfgInfo.createMap() line 180 First time through inputType.isExtensionElement is true, i.e. it's the one from the build definition. Thus the info never gets created. Second time through, inputType.isExtensionElement is false, and we're good. Off to the next round of debug stack... Last step for going home for supper. First time through, the NotificationManager is created and the listener set is empty. By the time the second project is created, the ConfigurationDataProvider is registered as a listener who then takes care of updating the inputType for the tool. It gets created and registered later on when the MBSWizardHandler.createProject does a setProjectDescription after the configuration is created which is too late. BTW, what the hell is all this stuff? Why is this thing that's lazily loaded through an extension point responsible for setting up the configuration instance for the inputType of a tool, and why does that cause a mysterious string of supposedly unrelated events that cause the missing scannerConfigBuildInfo, which then causes the missing built-in include path. Ugh!!!! Created attachment 168851 [details]
Applied Fix
I've committed the attached patch. It moves the init of the config data provider to bundle start time. Doesn't seem to be much data created and it's solely dependent on what extensions are defined so it shouldn't slow start up time noticeably.
Please review and comment. I can always revisit the solution.
Marking fixed for now. *** cdt cvs genie on behalf of dschaefer *** Bug 313038 - Includes path lost on restart. Moved the init of the config data provider to bundle start time so it's ready in time for first project creation. [*] CProjectDescriptionManager.java 1.88 http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.cdt/all/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/settings/model/CProjectDescriptionManager.java?root=Tools_Project&r1=1.87&r2=1.88 [*] CConfigurationDataProviderDescriptor.java 1.6 http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.cdt/all/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/settings/model/CConfigurationDataProviderDescriptor.java?root=Tools_Project&r1=1.5&r2=1.6 New Gerrit change created: https://git.eclipse.org/r/82321 The fix for this bug triggered bug 503012. Reopened. |