This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.
Summary: | Bad apisupport project declaration suspends IDE start-up | ||
---|---|---|---|
Product: | apisupport | Reporter: | _ tball <tball> |
Component: | Project | Assignee: | Jesse Glick <jglick> |
Status: | RESOLVED DUPLICATE | ||
Severity: | blocker | ||
Priority: | P3 | ||
Version: | 5.x | ||
Hardware: | All | ||
OS: | All | ||
Issue Type: | DEFECT | Exception Reporter: | |
Attachments: | stacktrace |
Description
_ tball
2005-06-02 19:17:22 UTC
Created attachment 22458 [details]
stacktrace
Re. exception vs. assertion - yes of course; the reason there is no complex error handling for this or any similar cases in other project types is that it should be handled more simply in the future by schema validation (issue #42686) but we have not yet implemented that. The use of assertions will be reasonable when that is implemented. Can make OpenProjectList catch RuntimeException - no plans to catch Error. *** This issue has been marked as a duplicate of 42686 *** Regardless of how (or even if) the project.xml is validated, IDE start-up shouldn't hang when a bad file is discovered. What appears to be happening is that due to the assertion being thrown, the "open project list" task aborts but the IDE waits forever for its completion with only the splash screen being displayed. The only way I could figure out how to "fix" this is to discard my .netbeans/dev directory, which also deleted all of my settings. To duplicate this error, open the autoupdate project (hopefully before it's fixed). It should display the assertion error. Then exit the IDE and attempt to re-enter it with the same userdir. The IDE should throw the same assertion, and then hang. I tried adding a try/catch block in projectuiapi/src/org/netbeans/spi/project/ui/ProjectOpenedHook.java around the project opened forwarding, and the IDE recovered from the assertion failure. "IDE start-up shouldn't hang when a bad file is discovered": sure, but there is no rule about what happens when assertion errors are thrown. (POH already catches RuntimeException's, and NbInstaller.loadCode should probably be patched to catch AssertionError.) The assertion errors need to *not* be thrown, which I think is best solved by issue #42686. In the meantime, don't edit project.xml files to be invalid acc. to schema. *** This issue has been marked as a duplicate of 42686 *** I will patch NbInstaller.loadCode soon. |