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.

Bug 250580 - LazyLines not thread-safe
Summary: LazyLines not thread-safe
Status: NEW
Alias: None
Product: platform
Classification: Unclassified
Component: Text (show other bugs)
Version: 8.0
Hardware: All All
: P3 normal (vote)
Assignee: Miloslav Metelka
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-02-20 14:52 UTC by Exceptions Reporter
Modified: 2015-08-05 11:27 UTC (History)
2 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter: 215558


Attachments
stacktrace (3.21 KB, text/plain)
2015-02-20 14:52 UTC, Exceptions Reporter
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Exceptions Reporter 2015-02-20 14:52:00 UTC
This issue was reported manually by sdedic.
It already has 1 duplicates 


Build: NetBeans IDE 8.0.1 (Build 201408251540)
VM: Java HotSpot(TM) 64-Bit Server VM, 25.20-b23, Java(TM) SE Runtime Environment, 1.8.0_20-b26
OS: Windows Server 2012

User Comments:
GUEST: editing js angular application




Stacktrace: 
java.lang.IndexOutOfBoundsException: Invalid line index=43 >= lineCount=43
   at org.netbeans.modules.editor.lib2.document.LineRootElement.getElement(LineRootElement.java:84)
   at org.openide.text.NbDocument$DocumentRenderer.run(NbDocument.java:923)
   at org.netbeans.editor.BaseDocument.render(BaseDocument.java:1391)
   at org.openide.text.NbDocument$DocumentRenderer.renderToInt(NbDocument.java:898)
   at org.openide.text.NbDocument.findLineOffset(NbDocument.java:201)
   at org.openide.text.DocumentLine$Set.offset(DocumentLine.java:1065)
Comment 1 Exceptions Reporter 2015-02-20 14:52:02 UTC
Created attachment 152117 [details]
stacktrace
Comment 2 Svata Dedic 2015-02-20 14:53:16 UTC
Please see the attached report; it seems that LazyLines iterate through the LineSet without a readlock. In the reported case, it seems the document has changed and even innocent size() method threw a RuntimeException
Comment 3 civime 2015-08-05 02:46:36 UTC
Through our investigation, we found that the following changes may induced this bug: 

rank 	 revision	 suspicious value
1	a6b6e3cf36a4(http://hg.netbeans.org/main/rev/a6b6e3cf36a4)	0.9844677382967728
2	6cd3cdf49d80(http://hg.netbeans.org/main/rev/6cd3cdf49d80)	0.5463809439310986
3	8870deb3cd89(http://hg.netbeans.org/main/rev/8870deb3cd89)	0.3838245706474235
4	ca55c295a311(http://hg.netbeans.org/main/rev/ca55c295a311)	0.36199238551714275
5	ad886f765459(http://hg.netbeans.org/main/rev/ad886f765459)	0.31212840841899364
6	cd9426949d9c(http://hg.netbeans.org/main/rev/cd9426949d9c)	0.2433161938265849
7	da95a1b91da7(http://hg.netbeans.org/main/rev/da95a1b91da7)	0.23348935901299417
8	329719b3c0e9(http://hg.netbeans.org/main/rev/329719b3c0e9)	0.1603540136153525
9	84d003556e22(http://hg.netbeans.org/main/rev/84d003556e22)	0.15495685950116958
10	e33309fea26d(http://hg.netbeans.org/main/rev/e33309fea26d)	0.11353170252036363
11	8edb2f4e6e12(http://hg.netbeans.org/main/rev/8edb2f4e6e12)	0.1063997955630388

Hope it is useful for fixing this bug. If so, please help us conduct this short survey  https://docs.google.com/forms/d/1roQYX1dHezcB97KQ_iTKEtadaVbzK6FpU-6aGxeUo6M :) Thanks very much!
Comment 4 civime 2015-08-05 11:27:21 UTC
(In reply to civime from comment #3)
> Through our investigation, we found that the following changes may induced
> this bug: 
> 
> rank 	 revision	 suspicious value
> 1	a6b6e3cf36a4(http://hg.netbeans.org/main/rev/a6b6e3cf36a4)
> 0.9844677382967728
> 2	6cd3cdf49d80(http://hg.netbeans.org/main/rev/6cd3cdf49d80)
> 0.5463809439310986
> 3	8870deb3cd89(http://hg.netbeans.org/main/rev/8870deb3cd89)
> 0.3838245706474235
> 4	ca55c295a311(http://hg.netbeans.org/main/rev/ca55c295a311)
> 0.36199238551714275
> 5	ad886f765459(http://hg.netbeans.org/main/rev/ad886f765459)
> 0.31212840841899364
> 6	cd9426949d9c(http://hg.netbeans.org/main/rev/cd9426949d9c)
> 0.2433161938265849
> 7	da95a1b91da7(http://hg.netbeans.org/main/rev/da95a1b91da7)
> 0.23348935901299417
> 8	329719b3c0e9(http://hg.netbeans.org/main/rev/329719b3c0e9)
> 0.1603540136153525
> 9	84d003556e22(http://hg.netbeans.org/main/rev/84d003556e22)
> 0.15495685950116958
> 10	e33309fea26d(http://hg.netbeans.org/main/rev/e33309fea26d)
> 0.11353170252036363
> 11	8edb2f4e6e12(http://hg.netbeans.org/main/rev/8edb2f4e6e12)
> 0.1063997955630388
> 
> Hope it is useful for fixing this bug. If so, please help us conduct this
> short survey 
> https://docs.google.com/forms/d/1roQYX1dHezcB97KQ_iTKEtadaVbzK6FpU-6aGxeUo6M
> :) Thanks very much!

The better list should be:
rank 	 revision	 suspicious value
1	6cd3cdf49d80(http://hg.netbeans.org/main/rev/6cd3cdf49d80)	0.5463809439310986
2	ca55c295a311(http://hg.netbeans.org/main/rev/ca55c295a311)	0.36199238551714275
3	cd9426949d9c(http://hg.netbeans.org/main/rev/cd9426949d9c)	0.2433161938265849
4	329719b3c0e9(http://hg.netbeans.org/main/rev/329719b3c0e9)	0.1603540136153525
5	e33309fea26d(http://hg.netbeans.org/main/rev/e33309fea26d)	0.11353170252036363
6	8edb2f4e6e12(http://hg.netbeans.org/main/rev/8edb2f4e6e12)	0.1063997955630388

Thanks very much~