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.
Root of stack overflow is calling virtual method in constructor of org.netbeans.modules.xml.text.TextEditorSupport().
Created attachment 117155 [details] test
Created attachment 117156 [details] proposed fix
Created attachment 117190 [details] Can't we just fix it in XML?
Are you sure the patch works OK in all situations ? E.g. one can call lookup(EditorCookie.class).prepareDocument() on XMLDO, and we may end up with a CES that has never been set a MimeType; similarly for other API methods -- all of them would have to propagate setMimeType so the observed state of CES is not (that much) changed.
Created attachment 117245 [details] Added faster initialization Note that hypothetical clients, which SUBCLASS TextEditorSupport will still suffer from MimeType not being set 'on time', unless the syncMimeType() is called from many API methods.
Fixed in http://hg.netbeans.org/jet-main/rev/48d6314465ff
Committed test is just failing with StackOverflowError as before, does it really work in your environment?
Changeset: e96313ac0e70 Author: Svata Dedic <sdedic@netbeans.org> Date: 2012-03-29 12:59 Message: Issue #209992 - Stack overflow in CES of XML data object if defined CES redirector: fixed Wrong (old) patch applied; correcting.
Thanks. Btw, do you understand why 100% failed test was not run in any hudson jobs? May be module is excluded from testing?
Reproduced on html data objects. Stack: at org.netbeans.modules.cnd.cesredirector.CESRedirectorImpl.redirect(CESRedirectorImpl.java:119) at org.openide.text.CloneableEditorSupportRedirector.findRedirect(CloneableEditorSupportRedirector.java:61) at org.openide.text.CloneableEditorSupport.setMIMEType(CloneableEditorSupport.java:1560) at org.netbeans.modules.html.HtmlEditorSupport.<init>(HtmlEditorSupport.java:120) at org.netbeans.modules.html.HtmlDataObject.getHtmlEditorSupport(HtmlDataObject.java:195) at org.netbeans.modules.html.HtmlDataObject.createCookie(HtmlDataObject.java:185) at org.openide.nodes.CookieSet$CookieEntry.getCookie(CookieSet.java:601) at org.openide.nodes.CookieSet$C.convert(CookieSet.java:784) at org.openide.nodes.CookieSet$C.convert(CookieSet.java:779) at org.openide.nodes.CookieSetLkp$ConvertingItem.getInstance(CookieSetLkp.java:277) at org.openide.util.lookup.AbstractLookup.lookup(AbstractLookup.java:421) at org.netbeans.modules.cnd.cesredirector.CESRedirectorImpl.redirect(CESRedirectorImpl.java:119) at org.openide.text.CloneableEditorSupportRedirector.findRedirect(CloneableEditorSupportRedirector.java:61)
Sasha, shouldn't it be the new P1?
(In reply to comment #11) > Sasha, shouldn't it be the new P1? Created separate bug #210541.
Integrated into 'main-golden', will be available in build *201204021038* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress) Changeset: http://hg.netbeans.org/main-golden/rev/e96313ac0e70 User: Svata Dedic <sdedic@netbeans.org> Log: Issue #209992 - Stack overflow in CES of XML data object if defined CES redirector: fixed Wrong (old) patch applied; correcting.
I will try to fix it in a general way as part of fix for bug 210541