Error java.lang.StackOverflowError

0 votes
asked Mar 9, 2016 in bug by anonymous
edited Mar 9, 2016

Hi,

Below is an example.

@startuml
note over Locus,Cassandra: [[{3 things Bill Gates thinks could revolutionize life in the next 20 years\n First is an energy innovation to lower the cost and get rid of greenhouse gases\n 3 things Bill Gates thinks could revolutionize life in the next 20 years\n First is an energy innovation to lower the cost and get rid of greenhouse gases\n3 things Bill Gates thinks could revolutionize life in the next 20 years\n First is an energy innovation to lower the cost and get rid of greenhouse gases\n3 things Bill Gates thinks could revolutionize life in the next 20 years\n First is an energy innovation to lower the cost and get rid of greenhouse gases\n3 things Bill Gates thinks could revolutionize life in the next 20 years\n First is an energy innovation to lower the cost and get rid of greenhouse gases\n3 things Bill Gates thinks could revolutionize life in the next 20 years\n First is an energy innovation to lower the cost and get rid of greenhouse gases\n3 things Bill Gates thinks could revolutionize life in the next 20 years\n First is an energy innovation to lower the cost and get rid of greenhouse gases\n3 things Bill Gates thinks could revolutionize life in the next 20 years\n First is an energy innovation to lower the cost and get rid of greenhouse gases\n3 things Bill Gates thinks could revolutionize life in the next 20 years\n First is an energy innovation to lower the cost and get rid of greenhouse gases\n3 things Bill Gates thinks could revolutionize life in the next 20 years\n First is an energy innovation to lower the cost and get rid of greenhouse gases\n3 things Bill Gates thinks could revolutionize life in the next 20 years\n First is an energy innovation to lower the cost and get rid of greenhouse gases\n}]]test it
@enduml

When I try to run it to get a sequence diagram programmatically, I got the following error messages:

Error java.lang.StackOverflowError
java.lang.StackOverflowError
    at java.util.regex.Pattern$Branch.match(Pattern.java:4604)
    at java.util.regex.Pattern$GroupHead.match(Pattern.java:4658)
    at java.util.regex.Pattern$Loop.match(Pattern.java:4785)
    at java.util.regex.Pattern$GroupTail.match(Pattern.java:4717)
    at java.util.regex.Pattern$BranchConn.match(Pattern.java:4568)

...

    at java.util.regex.Pattern$Loop.match(Pattern.java:4785)
    at java.util.regex.Pattern$GroupTail.match(Pattern.java:4717)
You should send a mail to plantuml@gmail.com with this log (V8036)

Is there any limit on the tooltip message size?

My plantuml version is 8036.

Thanks,

 

1 Answer

0 votes
answered Mar 14, 2016 by plantuml (131,770 points)
Thanks for the report.

However, are you sure about the version you are using ?
There may be some limitations, but your example seems to work on the online server:

http://plantuml.com/plantuml/svg/xSun3i9030J0h-m3A11qb211mmz2YbFY71OdMpexWO3uEnSUWIYkNUskHjG9Eb76MRlHLeTW5gJFOOUcUMtXLvPes7DAE0Kd-oOtGwTZwf5fqZGwg_2Ja7WWi9GAGUZXsAmnKyXs4HmvcuCDGK12ESwbAJg5PGnN9BqNnJBjj3GB0f4ScNleW9Y9vAgZ4M8mMXx_6LTjrLPjrLPjlxUzsxPmogL_0000

Could you double check your example and the version you are using ?
Thanks
commented Mar 23, 2016 by anonymous
I just tested your new plantuml.jar. It looks like the result is the same as before.

PATTERN=(?i)^caption(?:[\s ]*:[\s ]*|[\s ]+)(.*[\p{L}0-9_.].*)$
PATTERN=(?i)^(?:(left|right|center)?[\s ]*)footer(?:[\s ]*:[\s ]*|[\s ]+)(.*[\p{L}0-9_.].*)$
PATTERN=(?i)^(?:(left|right|center)?[\s ]*)header(?:[\s ]*:[\s ]*|[\s ]+)(.*[\p{L}0-9_.].*)$
PATTERN=(?i)^(skinparam|skinparamlocked)[\s ]+([\w.]*(?:\<\<.*\>\>)?[\w.]*)[\s ]+([^{}]*)$
PATTERN=(?i)^minwidth[\s ]+(\d+)$
PATTERN=(?i)^rotate$
PATTERN=(?i)^scale[\s ]+([0-9.]+)(?:[\s ]*/[\s ]*([0-9.]+))?$
PATTERN=(?i)^scale[\s ]+([0-9.]+)[\s ]*[*x][\s ]*([0-9.]+)$
PATTERN=(?i)^scale[\s ]+([0-9.]+)[\s ]+(width|height)$
PATTERN=(?i)^scale[\s ]+max[\s ]+([0-9.]+)[\s ]+width$
PATTERN=(?i)^scale[\s ]+max[\s ]+([0-9.]+)[\s ]+height$
PATTERN=(?i)^scale[\s ]+max[\s ]+([0-9.]+)[\s ]*[*x][\s ]*([0-9.]+)$
PATTERN=(?i)^!transformation[\s ]+([^{}]*)$
PATTERN=(?i)^(hide|show)[\s ]+unlinked$
PATTERN=RegexConcat ^sprite[\s ]+\$?([\p{L}0-9_]+)[\s ]*(?:\[(\d+)x(\d+)/(\d+)(z)\])?[\s ]+([-_A-Za-z0-9]+)$
PATTERN=RegexConcat ^sprite[\s ]+\$?([\p{L}0-9_]+)[\s ]*[\s ]+(.*)$
PATTERN=RegexConcat ^(hide|show)[\s ]+((?:public|private|protected|package)?(?:[,\s ]+(?:public|private|protected|package))*)[\s ]+(members?|attributes?|fields?|methods?)$
PATTERN=RegexConcat ^(hide|show)[\s ]+(?:(class|interface|enum|annotation|abstract|[\p{L}0-9_.]+|["“”«»][^"“”«»]+["“”«»]|\<\<.*\>\>)[\s ]+)*?(?:(empty)[\s ]+)?(members?|attributes?|fields?|methods?|circle\w*|stereotypes?)$
PATTERN=RegexConcat ^post[-[\s ]]?it[\s ]+([-\p{L}0-9_./]+)[\s ]+:?(.*)?$
PATTERN=(?i)^width[\s ]+(\d+)$
PATTERN=(?i)^[\s ]*$
PATTERN=(?i)^[\s ]*(['‘’].*||/['‘’].*['‘’]/[\s ]*)$
PATTERN=(?i)^!pragma[\s ]+([A-Za-z_][A-Za-z_0-9]*)(?:[\s ]+(.*))?$
PATTERN=(?i)^title(?:[\s ]*:[\s ]*|[\s ]+)(.*[\p{L}0-9_.].*)$
PATTERN=(?i)^caption(?:[\s ]*:[\s ]*|[\s ]+)(.*[\p{L}0-9_.].*)$
PATTERN=(?i)^(?:(left|right|center)?[\s ]*)footer(?:[\s ]*:[\s ]*|[\s ]+)(.*[\p{L}0-9_.].*)$
PATTERN=(?i)^(?:(left|right|center)?[\s ]*)header(?:[\s ]*:[\s ]*|[\s ]+)(.*[\p{L}0-9_.].*)$
PATTERN=(?i)^(skinparam|skinparamlocked)[\s ]+([\w.]*(?:\<\<.*\>\>)?[\w.]*)[\s ]+([^{}]*)$
PATTERN=(?i)^minwidth[\s ]+(\d+)$
PATTERN=(?i)^rotate$
.....
commented Mar 23, 2016 by plantuml (131,770 points)
I am interested by the very last "PATTERN=" line because it should print the regex that crashes. That would definitively help for debug.
Thanks!
commented Mar 24, 2016 by anonymous
Ok, below are the last PATTER= lines.

PATTERN=(?i)^(skinparam|skinparamlocked)[\s ]+([\w.]*(?:\<\<.*\>\>)?[\w.]*)[\s ]+([^{}]*)$
PATTERN=(?i)^minwidth[\s ]+(\d+)$
PATTERN=(?i)^rotate$
PATTERN=(?i)^scale[\s ]+([0-9.]+)(?:[\s ]*/[\s ]*([0-9.]+))?$
PATTERN=(?i)^scale[\s ]+([0-9.]+)[\s ]*[*x][\s ]*([0-9.]+)$
PATTERN=(?i)^scale[\s ]+([0-9.]+)[\s ]+(width|height)$
PATTERN=(?i)^scale[\s ]+max[\s ]+([0-9.]+)[\s ]+width$
PATTERN=(?i)^scale[\s ]+max[\s ]+([0-9.]+)[\s ]+height$
PATTERN=(?i)^scale[\s ]+max[\s ]+([0-9.]+)[\s ]*[*x][\s ]*([0-9.]+)$
PATTERN=(?i)^!transformation[\s ]+([^{}]*)$
PATTERN=(?i)^(hide|show)[\s ]+unlinked$
PATTERN=RegexConcat ^sprite[\s ]+\$?([\p{L}0-9_]+)[\s ]*(?:\[(\d+)x(\d+)/(\d+)(z)\])?[\s ]+([-_A-Za-z0-9]+)$
PATTERN=RegexConcat ^sprite[\s ]+\$?([\p{L}0-9_]+)[\s ]*[\s ]+(.*)$
PATTERN=RegexConcat ^(hide|show)[\s ]+((?:public|private|protected|package)?(?:[,\s ]+(?:public|private|protected|package))*)[\s ]+(members?|attributes?|fields?|methods?)$
PATTERN=RegexConcat ^(hide|show)[\s ]+(?:(class|interface|enum|annotation|abstract|[\p{L}0-9_.]+|["“”«»][^"“”«»]+["“”«»]|\<\<.*\>\>)[\s ]+)*?(?:(empty)[\s ]+)?(members?|attributes?|fields?|methods?|circle\w*|stereotypes?)$
PATTERN=RegexConcat ^post[-[\s ]]?it[\s ]+([-\p{L}0-9_./]+)[\s ]+:?(.*)?$
PATTERN=(?i)^width[\s ]+(\d+)$

Thanks
commented Mar 25, 2016 by plantuml (131,770 points)
Ok, thanks for the logs.
The problem may have been understood. Difficult to be affirmative.
Here is yet another version that may work with your example https://dl.dropboxusercontent.com/u/13064071/plantuml.jar
Can you tell us the result ?
Note that even if this works, the problem is not completely solved : it would just mean that we have understand it.
Thanks and sorry about this remote debug!
commented Mar 28, 2016 by anonymous
It works with your attached plantuml.jar.
Thanks a lot!
...