Uploaded image for project: 'CommandBox'
  1. COMMANDBOX-569

CSS intermittently throws a 500 error with java.lang.StringIndexOutOfBoundsException

    Details

    • Type: Bug
    • Status: Resolved (View workflow)
    • Priority: Major
    • Resolution: Duplicate
    • Affects Version/s: 3.5.0
    • Fix Version/s: None
    • Component/s: Runwar, Server Integration
    • Labels:
      None
    • Environment:

      Windows10

      Description

      Randomly (but seemingly more when restarting an application or under a higher load), certain CSS files will return a 500 error for no apparent reason.

      {{2017-02-10 13:26:43 ERROR io.undertow.request UT005023: Exception handling request to /wheels/public/assets/css/normalize.min.css
      java.lang.StringIndexOutOfBoundsException: String index out of range: 43
      	at java.lang.String.charAt(String.java:658)
      	at java.lang.Character.codePointAt(Character.java:4866)
      	at java.util.regex.Pattern$CharProperty.match(Pattern.java:3775)
      	at java.util.regex.Pattern$Curly.match0(Pattern.java:4260)
      	at java.util.regex.Pattern$Curly.match(Pattern.java:4234)
      	at java.util.regex.Pattern$BmpCharProperty.match(Pattern.java:3798)
      	at java.util.regex.Pattern$GroupHead.match(Pattern.java:4658)
      	at java.util.regex.Pattern$Begin.match(Pattern.java:3525)
      	at java.util.regex.Matcher.match(Matcher.java:1270)
      	at java.util.regex.Matcher.matches(Matcher.java:604)
      	at org.cfmlprojects.regexpathinfofilter.RegexPathInfoFilter.doFilter(RegexPathInfoFilter.java:36)
      	at io.undertow.servlet.core.ManagedFilter.doFilter(ManagedFilter.java:61)
      	at io.undertow.servlet.handlers.FilterHandler$FilterChainImpl.doFilter(FilterHandler.java:131)
      	at io.undertow.servlet.handlers.FilterHandler.handleRequest(FilterHandler.java:84)
      	at io.undertow.servlet.handlers.security.ServletSecurityRoleHandler.handleRequest(ServletSecurityRoleHandler.java:62)
      	at io.undertow.servlet.handlers.ServletDispatchingHandler.handleRequest(ServletDispatchingHandler.java:36)
      	at io.undertow.servlet.handlers.security.SSLInformationAssociationHandler.handleRequest(SSLInformationAssociationHandler.java:131)
      	at io.undertow.servlet.handlers.security.ServletAuthenticationCallHandler.handleRequest(ServletAuthenticationCallHandler.java:57)
      	at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43)
      	at io.undertow.security.handlers.AbstractConfidentialityHandler.handleRequest(AbstractConfidentialityHandler.java:46)
      	at io.undertow.servlet.handlers.security.ServletConfidentialityConstraintHandler.handleRequest(ServletConfidentialityConstraintHandler.java:64)
      	at io.undertow.security.handlers.AuthenticationMechanismsHandler.handleRequest(AuthenticationMechanismsHandler.java:60)
      	at io.undertow.servlet.handlers.security.CachedAuthenticatedSessionHandler.handleRequest(CachedAuthenticatedSessionHandler.java:77)
      	at io.undertow.security.handlers.AbstractSecurityContextAssociationHandler.handleRequest(AbstractSecurityContextAssociationHandler.java:43)
      	at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43)
      	at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43)
      	at io.undertow.servlet.handlers.ServletInitialHandler.handleFirstRequest(ServletInitialHandler.java:285)
      	at io.undertow.servlet.handlers.ServletInitialHandler.dispatchRequest(ServletInitialHandler.java:264)
      	at io.undertow.servlet.handlers.ServletInitialHandler.access$000(ServletInitialHandler.java:81)
      	at io.undertow.servlet.handlers.ServletInitialHandler$1.handleRequest(ServletInitialHandler.java:175)
      	at io.undertow.server.Connectors.executeRootHandler(Connectors.java:202)
      	at io.undertow.server.HttpServerExchange$1.run(HttpServerExchange.java:802)
      	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
      	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
      	at java.lang.Thread.run(Thread.java:745)}}
      

      Attached files,

      • bug.zip - a skeleton application which can trigger it
      • bug.png - a screenshot

      However, this is highly intermittent, so it's actually quite hard to trigger. we see it more when restarting large applications, like the cfwheels core, and it's only either both normalize.min.css OR milligram.min.css OR both; (but never cfwheels.css) which makes me think that the regex is choking on the comments, or minified nature of those files in some sort of race condition? Or something.

        Gliffy Diagrams

          Attachments

            Issue links

              Activity

                People

                • Assignee:
                  Unassigned
                  Reporter:
                  neokoenig Tom King
                • Votes:
                  0 Vote for this issue
                  Watchers:
                  1 Start watching this issue

                  Dates

                  • Created:
                    Updated:
                    Resolved: