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.
Summary: | java.util.ConcurrentModificationException: Caller uses obsolete token sequence which is no longer valid. Underlying token hierarchy has been modified: modCount=10 != upToDateModCount=13 Please report | ||
---|---|---|---|
Product: | contrib | Reporter: | Jan Lahoda <jlahoda> |
Component: | Code | Assignee: | Michel Graciano <hmichel> |
Status: | RESOLVED FIXED | ||
Severity: | blocker | ||
Priority: | P3 | ||
Version: | 6.x | ||
Hardware: | All | ||
OS: | All | ||
URL: | http://statistics.netbeans.org/exceptions/detail.do?id=155923 | ||
Issue Type: | DEFECT | Exception Reporter: | 155923 |
Attachments: | stacktrace |
Description
Jan Lahoda
2009-08-15 19:11:23 UTC
Created attachment 86272 [details]
stacktrace
Do you have any details about what was you doing (removing several lines or typing) and which project was you editing (maybe an nb module)? Thanks for your report Which plugin version are you using? AFAIK you probably are running the latest version. Should be fixed. main/contrib: #15434:a56da5322d8e I did some editing. Most likely some more complex operation, like indent/un-indent, which are internally split into several operations. apisupport project, but that should not matter, IMO. The used version of the module can be found in the log, which is available in the exceptions report: http://statistics.netbeans.org/exceptions/messageslog?id=244091 The version is: org.netbeans.modules.showtodos [2.4.0.1 nbms-and-javadoc-3567-on-090721] Sorry, but I do not think that the fix is fully correct - the problem is that the TokenSequence is used outside read (or write) lock on the Document. Calling isValid() will make the exception less probable, but not impossible. Would be better to do the operations under the document read lock [Document.reander()] (possibly locking it each time the finder finds something and checking isValid() once immediately after read-locking the document). Might be also possible to do the work in parsing.api's task, using the copy of the document text provided by the parsing.api and carefully handling cancel, in order to prevent highlighting incorrect parts of the document. Thanks for the tips. I will try to rewrite it with mentioned API asap. BTW, if you can point me to some module that uses parsing api's task? Thanks again for your help. |