How to reproduce:
Stack overflow exception should occurs.
Test file is attached.
--
Scala IDE:
Build id: 4.0.0-vfinal-20150305-1644-Typesafe
OS:
Windows, Linux
- Create new object:
object Test {
val outers = """
8526263.390372114 9859294.221185917 8526257.546098849 9859292.767757097
8527416.170490975 9859597.692807384 8527409.958863387 9859579.647585547
8527409.958863387 9859579.647585547 8527400.797269294 9859553.018627921
8527400.797269294 9859553.018627921 8527390.544744194 9859523.208576953 8527380.993531883 9859495.48287608
8527380.993531883 9859495.48287608 8527370.462708052 9859469.622109318
8527248.912956057 9859137.499431524 8527181.787303109 9858909.895823691 8527175.887370097 9858911.623389287
8527068.330478093 9858685.946628658 8527078.449419804 9858710.186648976
8527068.330478093 9858685.946628658 8527033.554269169 9858578.156339811
8526953.537819186 9859721.405307911 8526959.059265928 9859719.979214678 8526847.528268103 9859392.342045354 8526850.734269438 9859371.966358911 8526873.343258018 9859364.753983542 8526943.430009421 9859571.612266276 8526999.401449393 9859739.094373325 8527006.859855277 9859742.330517288 8527094.167731905 9860013.404058147 8527098.397872554 9860012.416721346 8527153.523284396 9860185.614196902 8527064.612407098 9859996.015980484 8527011.902628208 9859883.296216026 8526953.537819186 9859721.405307911
8526804.447625166 9859315.199956503 8526853.33914552 9859298.27981895
8526804.447625166 9859315.199956503 8526799.761074604 9859300.58336848
8526301.66201305 9858413.992554123 8526551.529742084 9858461.428827023
8526551.529742084 9858461.428827023 8526578.023780894 9858587.342168039 8526604.217257077 9858665.052018318 8526658.040230874 9858832.320344307 8526806.139681425 9859275.079826923 8526792.770210583 9859279.632065121 8526799.761074604 9859300.58336848
8526853.33914552 9859298.27981895 8526810.34755818 9859161.165149841 8526764.094309753 9859018.047741767 8526615.950331407 9858578.01923799 8526582.376372982 9858484.571264872
8526582.376372982 9858484.571264872 8526591.571362922 9858467.817667691
8526591.571362922 9858467.817667691 8526736.709715018 9858497.0473741 8527011.702253126 9858552.463505577 8527033.554269169 9858578.156339811
8527078.449419804 9858710.186648976 8527105.633639459 9858701.41197123 8527175.887370097 9858911.623389287
8527248.912956057 9859137.499431524 8527253.543846874 9859136.649331901 8527265.043150272 9859169.39195375 8527366.232567403 9859457.555612663 8527370.462708052 9859469.622109318
8527416.170490975 9859597.692807384 8527418.641783668 9859602.135559153
8527418.641783668 9859602.135559153 8527425.98887006 9859626.488471117
8527425.98887006 9859626.488471117 8527430.864663757 9859642.339849265
8527430.864663757 9859642.339849265 8527531.163524963 9859968.343246223 8527518.718005892 9859983.537181832 8527522.413812988 9859995.27547972
8527522.413812988 9859995.27547972 8527531.018809626 9860022.564356292
8527531.018809626 9860022.564356292 8527536.896478739 9860041.186676247
8527536.896478739 9860041.186676247 8527540.369646851 9860052.239416977
8527575.435286453 9860160.710794749 8527540.369646851 9860052.239416977
8526349.017324433 9859585.543815495 8526295.0273714 9859425.442379247 8526303.365201259 9859411.209490601
8526263.390372114 9859294.221185917 8526303.365201259 9859411.209490601
8526257.546098849 9859292.767757097 8526248.673935432 9859290.573902853 8526226.944370829 9859225.800668044
8526184.142026618 9859091.84100208 8526204.825188009 9859159.876284774
8526226.944370829 9859225.800668044 8526204.825188009 9859159.876284774
8526184.142026618 9859091.84100208 8526155.176695114 9859000.74441873
8526157.881758742 9858984.016999986 8526155.176695114 9859000.74441873
8526135.495409142 9858927.308607653 8526157.881758742 9858984.016999986
8526135.495409142 9858927.308607653 8526127.970211565 9858925.471351227 8526117.773346208 9858896.404373817 8526118.029381035 9858884.558244279
8526107.632140597 9858852.612185353 8526118.029381035 9858884.558244279
8526107.632140597 9858852.612185353 8526101.29806157 9858852.776714038 8526067.70183925 9858755.952257037 8526048.877713354 9858698.14889077
8526048.877713354 9858698.14889077 8526013.912261298 9858582.26939573
8526002.29050646 9858545.08745864 8526013.912261298 9858582.26939573
8526301.66201305 9858413.992554123 8526295.439253513 9858375.029244833 8525969.250881592 9858347.362960001 8525943.814377945 9858358.083975056 8526002.29050646 9858545.08745864
"""
}
- Move cursor to last """
- Press enter
Stack overflow exception should occurs.
Test file is attached.
--
Scala IDE:
Build id: 4.0.0-vfinal-20150305-1644-Typesafe
OS:
Windows, Linux
Leave a comment
I can't reproduce this can you please upload the stack trace?
on 2015-04-21 03:45 *
By caiiiycuk294805
(Comment removed)
on 2015-04-21 03:51 *
By caiiiycuk294805
You should move cusor to the end of line where """ is located and press Enter.
...
8526301.66201305 9858413.992554123 8526295.439253513 9858375.029244833 8525969.250881592 9858347.362960001 8525943.814377945 9858358.083975056 8526002.29050646 9858545.08745864
"""_+enter
Ok, I can reproduce it now with a different configuration.
Fixes StackOverflowException in ScalaIndenter
The main problem is an exponential blowup of a regex. Another problem is
that the val `restOfTheLine` doesn't really contain the rest of the line,
but the start of the string literal until the offset, what in this case
is the end of the string literal. Another problem is that the regex is
too complicated.
The easiest way to fix the problem was to simplify the regex and to stop
the regex computation as soon as a newline character occurs, which
happens because `.` doesn't match newline characters.
No tests included because a test suite doesn't exist. The following
should be the behavior (^ is the cursor before/after `<enter>` is pressed):
def f = ""^
//==>
def f = ""
^
and
def f = ^""
//==>
def f =
^""
Fixes #1002433
Branch: master
Commit: scala-ide:35472ae25d
The main problem is an exponential blowup of a regex. Another problem is
that the val `restOfTheLine` doesn't really contain the rest of the line,
but the start of the string literal until the offset, what in this case
is the end of the string literal. Another problem is that the regex is
too complicated.
The easiest way to fix the problem was to simplify the regex and to stop
the regex computation as soon as a newline character occurs, which
happens because `.` doesn't match newline characters.
No tests included because a test suite doesn't exist. The following
should be the behavior (^ is the cursor before/after `<enter>` is pressed):
def f = ""^
//==>
def f = ""
^
and
def f = ^""
//==>
def f =
^""
Fixes #1002433
Branch: master
Commit: scala-ide:35472ae25d
No file chosen
You have an empty file field. Please select or remove it.
Name | Size | ||
---|---|---|---|
Test.scala | 4.23 KB | Added by caiiiycuk294805 on 2015-04-20 - Upload new version | |
so.log | 62.8 KB | Added by caiiiycuk294805 on 2015-04-21 - Upload new version |