| Summary: | Schema code completion causes stack error | ||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
| Product: | [WebTools] WTP Source Editing | Reporter: | Laurens Holst <laurens.nospam> | ||||||||
| Component: | wst.xml | Assignee: | Keith Chong <keith.chong.ca> | ||||||||
| Status: | CLOSED FIXED | QA Contact: | Nitin Dahyabhai <thatnitind> | ||||||||
| Severity: | critical | ||||||||||
| Priority: | P2 | CC: | d_a_carver, hjzhang, valentinbaciu | ||||||||
| Version: | 3.0 | Flags: | valentinbaciu:
pmc_approved?
(david_williams) valentinbaciu: pmc_approved? (raghunathan.srinivasan) valentinbaciu: pmc_approved? (naci.dai) deboer: pmc_approved+ valentinbaciu: pmc_approved? (neil.hauge) valentinbaciu: pmc_approved? (kaloyan) valentinbaciu: review+ thatnitind: review+ |
||||||||
| Target Milestone: | 3.0.1 | ||||||||||
| Hardware: | PC | ||||||||||
| OS: | Windows Vista | ||||||||||
| Whiteboard: | PMC_approved | ||||||||||
| Attachments: |
|
||||||||||
|
Description
Laurens Holst
Please don't forget to attach the schema and/or test case. Created attachment 105911 [details]
Testcase
Ah, sorry, thank you :). Testcase attached.
Opening the schema-test.xml file and trying to use code completion should exhibit the issue.
Created attachment 105915 [details]
Stack trace zip
Stack overflow trace.
The stack trace seems to indicate that CMDescriptionBuilder cannot handle this schema. This code hasn't changed recently, so perhaps there's a new (recursive?) pattern in this modified schema that this code doesn't handle properly. I have not changed anything in the last two months. I just re-tested it in Eclipse 3.3 (confirming that it is not an issue there, so it really is a regression). OK, we'll then look deeper in the content model XSD adapter code to see if anything's changed there. The CMDescriptionBuilder should take account of cyclic model group references, The groups are visited over and over again, which leads to the stackoverflow. Created attachment 108782 [details]
Apply to org.eclipse.wst.xml.core
1. Explain why you believe this is a stop-ship defect. Or, if it is a "hotbug" (requested by an adopter) please document it as such. User has to shut down the workbench. 2. Is there a work-around? If so, why do you believe the work-around is insufficient? None 3. How has the fix been tested? Is there a test case attached to the bugzilla record? Has a JUnit Test been added? Tested manually and it does fix the problem scenario. See bug 242639. Will investigate adding the JUnit later. 4. Give a brief technical overview. Who has reviewed this fix? Need a way to keep track of the model groups that have been visited. By keeping them in a stack, and then seeing if the current group has been visited, we can then determine to continue visiting the children or not, and thus prevent the stackoverflow. Valentin will review the fix. 5. What is the risk associated with this fix? Low. Technically, the change will only affect schemas with cyclic group references. All other schemas should be unaffected. Nitin/Valentin, can you please continue with the PMC approval process. Thanks. The fix looks good. Keith consulted with Craig in creating the patch. We will try to beef up our JUnits in the Content Model area in 3.1. Nitin, PMC please review and if all is OK approve this fix. The fix is localized to a class that computes content model information for display in the documentation window shown to the right of the content assist drop down in the XML schema editor (and other XML-like source editors). Ugly problem and simple fix. Approved. Looks good to me. Seems to me the fix was committed and released to 3.0.1 builds with the tag v200807310316 and to 3.1 builds with the tag v200807310312. Thanks! I released the fix early this morning after seeing the approval from Tim. I was going to resolve this bug as fixed before the WTP call today. Verified fix in wtp-R-3.0.1-20080818032401. Laurens, can you please verify and close this bug? I have tried this in WTP 3.0.1 released on the update servers, and can verify that this is fixed, I no longer get stack errors when using our XHTML schema. Thanks! Found a new, similar bug in WTP 3.0.1, probably related. Bug 245851. |