[jbosstools-issues] [JBoss JIRA] (JBIDE-10472) CLONE - XHTML Validator hangs eclipse

Victor Rubezhny (Issue Comment Edited) (JIRA) jira-events at lists.jboss.org
Mon Dec 19 16:19:09 EST 2011


    [ https://issues.jboss.org/browse/JBIDE-10472?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12652124#comment-12652124 ] 

Victor Rubezhny edited comment on JBIDE-10472 at 12/19/11 4:17 PM:
-------------------------------------------------------------------

This issue is very similar to the old one that was found in Apache's Derby subproject: https://issues.apache.org/jira/browse/DERBY-1446 and according BugZilla https://bugs.eclipse.org/bugs/show_bug.cgi?id=149754 fixed in Eclipse 3.2.1. However, the code of org.eclipse.core.runtime.internal.adaptor.ContextFinder is changed since Eclipse 3.2.1, so I'm not sure that ContextFinder is a real cause of infinite loop in fillInStackTrace() (100% of CPU usage is more like an infinite loop, than a deadlock).

Also, the issue is very similar to the following: https://bugs.eclipse.org/bugs/show_bug.cgi?id=275512. This issue is also occurs SAXParserException is to be risen in SAXParser. The only difference is that there is no chance to recover in our case.

More about our case is that the "hanging" occurs in first pass of validator (the place when I try to detect the type of file: I'm trying to parse the file to get its DOCTYPE declaration and see if it is declared as XHTML. But SAXParser never gives me a chance to complete the parsing). And here the parser is configured to stop parsing on first fatal error.
 
So, probably, new BugZilla is to be risen for the issue.
                
      was (Author: vrubezhny):
    This issue is very similar to the old one that was found in Apache's Derby subproject: https://issues.apache.org/jira/browse/DERBY-1446 and according BugZilla https://bugs.eclipse.org/bugs/show_bug.cgi?id=149754 fixed in Eclipse 3.2.1. However, the code of org.eclipse.core.runtime.internal.adaptor.ContextFinder is changed since Eclipse 3.2.1, so I'm not sure that ContextFinder is a real cause of infinite loop in fillInStackTrace() (100% of CPU usage is more like an infinite loop, than a deadlock).

Also, the issue is very similar to the following: https://bugs.eclipse.org/bugs/show_bug.cgi?id=275512. This issue is also occurs SAXParserException is to be risen in SAXParser. The only difference is that there is no chance to recover in our case.

More about our case is that the "hanging" occurs in first pass of validator (the place when I try to detect the type of file: I'm trying to parse the file to get its DOCTYPE declaration and see if it is declared as XHTML. But SAXParser never gives me a chance to complete the parsing). And here the parser is configured to stop parsing on firt fatal error.
 
So, probably, new BugZilla is to be risen for the issue.
                  
> CLONE - XHTML Validator hangs eclipse
> -------------------------------------
>
>                 Key: JBIDE-10472
>                 URL: https://issues.jboss.org/browse/JBIDE-10472
>             Project: Tools (JBoss Tools)
>          Issue Type: Bug
>          Components: jsp/jsf/xml source editing
>    Affects Versions: 3.3.0.M4
>            Reporter: Alexey Kazakov
>            Assignee: Victor Rubezhny
>            Priority: Blocker
>             Fix For: 3.3.0.Beta1
>
>         Attachments: pluginsxml.patch
>
>
> Create the following html and build the project:
> {code}
> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
> <html>
> <head>
>           <title>some title</title>
> </head>
> <body>
> <h2>some heading.</h2>
> SOME TEST!!!!<br>
> MORE TEXT
> <script type="text/javascript" language="javascript" >
> // A comment
> function GetCookie (name) {
>   var arg = name + "=";
>   var alen = arg.length;
>   var clen = document.cookie.length;
>   var i = 0;
>  while (i < clen) {
>     var j = i + alen;
>     if (document.cookie.substring(i, j) == arg)
>       return getCookieVal (j);
>     i = document.cookie.indexOf(" ", i) + 1;
>     if (i == 0) break;
>           } 
> return null;
> }
> function getCookieVal (offset) {
>   var endstr = document.cookie.indexOf (";", offset);
>  if (endstr == -1)
>     endstr = document.cookie.length;
>   return document.cookie.substring(offset, endstr);
> }
> //comment
> var xyz = GetCookie('xyz'); // Comments
> var datum = new Date();
> var d1 = datum.getTime().toString();
> // comment "" bla
> var d2 = "100";  
> // comment
> var d3 = "dba";  
> // comment
> var abc = 999; 
> // comment
> function urlEncode (string) {
>                     string = string.replace(/ /g, '+');
>                            return escape(string);
>           }
> // comment
> // comment
> if(cookie != "" && cookie != null ){
>           document.write("<img src=\"http://example.com./xxx?bla=" + xyz + "&bar="+abc+"&d1=" +urlEncode(d1)+ "&d2=" +urlEncode(d2) +"&d3=" +urlEncode(d3)+"\" alt=\"\" width=\"1\" height=\"1\" border=\"0\" >"); 
> }
> else {
> var cookie = "kaz" 
> }
> </script>
> </body>
> </html>
> {code}

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.jboss.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        


More information about the jbosstools-issues mailing list