Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 369680 - IllegalStateException: PhpReconcilingStrategy#lineEndTable
Summary: IllegalStateException: PhpReconcilingStrategy#lineEndTable
Status: CLOSED FIXED
Alias: None
Product: z_Archived
Classification: Eclipse Foundation
Component: PDT (show other bugs)
Version: unspecified   Edit
Hardware: PC Windows 7
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: PHP UI CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-01-25 10:40 EST by Natalia Bartol CLA
Modified: 2020-05-14 11:35 EDT (History)
4 users (show)

See Also:


Attachments
BadLocationException caught in Util.lineEndTable - patch (1.02 KB, patch)
2012-01-25 10:49 EST, Natalia Bartol CLA
jacek.pospychala: iplog+
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Natalia Bartol CLA 2012-01-25 10:40:46 EST
Build Identifier: 

When main thread modifies file content parallel to DirtyRegionProcessor.BackgroundThread BadLocationException may be thrown in PhpReconcilingStrategy#lineEndTable:

java.lang.IllegalStateException: PhpReconcilingStrategy#lineEndTable(document
	at org.eclipse.php.internal.core.ast.util.Util.lineEndTable(Util.java:3272)
	at org.eclipse.php.internal.ui.viewsupport.SelectionListenerWithASTManager$PartListenerGroup.calculateASTandInform(SelectionListenerWithASTManager.java:184)
	at org.eclipse.php.internal.ui.viewsupport.SelectionListenerWithASTManager$PartListenerGroup$3.run(SelectionListenerWithASTManager.java:157)
	at org.eclipse.core.internal.jobs.Worker.run(Worker.java:54)

Reproducible: Sometimes

Steps to Reproduce:
1. Add and quickly remove few lines from the end of document. If DirtyRegionProcessor.BackgroundThread is still processing first modification (added lines) then exception is thrown.
Comment 1 Natalia Bartol CLA 2012-01-25 10:49:11 EST
Created attachment 210056 [details]
BadLocationException caught in Util.lineEndTable - patch

I think it's enough to catch BadLocationException and simply return the result as is instead of throwing IllegalStateException. As we know where this BadLocationException comes from and that nothing really unusual happened (concurrent thread access) there is no need to report this issue.  Reconciling process has already been triggered anew by the next modification. Clean error log will give users and developers a peace of mind.
Comment 2 Roy Ganor CLA 2012-01-26 06:44:53 EST
thanks!
Comment 3 Kalin CLA 2012-07-06 10:30:52 EDT
No longer reproduced.
Closing...

Kalin Yanev
kalin.a@zend.com
Comment 4 Curtis Windatt CLA 2013-06-11 12:09:08 EDT
*** Bug 410502 has been marked as a duplicate of this bug. ***