Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 211495

Summary: [implementation] AssertionFailed while editing
Product: [Eclipse Project] Platform Reporter: Frederic Fusier <frederic_fusier>
Component: TextAssignee: Platform-Text-Inbox <platform-text-inbox>
Status: CLOSED WONTFIX QA Contact:
Severity: normal    
Priority: P3 CC: daniel_megert, Olivier_Thomann
Version: 3.4   
Target Milestone: ---   
Hardware: PC   
OS: Windows XP   
Whiteboard: stalebug
Attachments:
Description Flags
Exceptions stack traces
none
Exceptions while deleting in editor
none
Same exception got with I20080427-2000 none

Description Frederic Fusier CLA 2007-11-29 14:31:08 EST
Created attachment 84095 [details]
Exceptions stack traces

Using build I20071127-0800, I got an Error dialog while using Toggle Comment (Ctrl-Shift-C). Looking at the Error log I saw several dumped exceptions, I put in the file attached to this bug.

The reconciler stopped to work (my syntax was no longer colored). So, I closed the file, tried to reopen it and... unfortunately the editor always displayed an AssertionFailed exception preventing me to edit the contents of my file.

Set as major severity because I was obliged to close my eclipse session to be able to open this file again in the editor, but not critical as I was able to save the file and didn't lose my changes.
Comment 1 Frederic Fusier CLA 2007-11-29 17:38:18 EST
Created attachment 84107 [details]
Exceptions while deleting in editor

I got similar exceptions this evening while deleting a character in the editor...
Comment 2 Frederic Fusier CLA 2007-11-29 17:39:45 EST
Change the summary as the Toggle Comment was not the real origin of the problem.
This is definitely annoying to have to restart Eclipse every two hours => increase the severity.
Comment 3 Frederic Fusier CLA 2007-11-29 17:43:35 EST
Note that it was always while editing a Java file, so it may be specific to the Java editor?

Note also that I have several windows opened in my session. Each windows has several editors opened (one have more than 40 editors opened) and the file I was editing was opened in several (at least 2) windows.

HTH
Comment 4 Dani Megert CLA 2007-11-30 02:19:58 EST
- do you have a dual or single core machine?
- do you have standard Eclipse SDK or other things like ATP that could explain why I don't see this?

Steps would help.

Comment 5 Frederic Fusier CLA 2007-11-30 03:01:15 EST
(In reply to comment #4)
> - do you have a dual or single core machine?
dual core

> - do you have standard Eclipse SDK or other things like ATP that could explain
> why I don't see this?
standard Eclipse SDK + ASTview + JElementView + JDT/Core Tools add-ons
 
> Steps would help.
> 
I definitely know, but unfortunately I didn't do anything special. I was just editing files + debug JUnit test and runtime workbench (usual dvpt stuff...)
Comment 6 Frederic Fusier CLA 2007-11-30 03:02:34 EST
I didn't want to insist on the severity, it just kept the previous one after having refreshed the bug... ;-)
Comment 7 Dani Megert CLA 2007-11-30 03:40:53 EST
But this bug is new for you right? We didn't change anything in that area. Can you remember of a setting or plug-in install that you did recently?
Comment 8 Frederic Fusier CLA 2007-11-30 03:59:44 EST
(In reply to comment #7)
> But this bug is new for you right? We didn't change anything in that area. Can
> you remember of a setting or plug-in install that you did recently?
> 
Right, this bug is new for me. I haven't installed any new plug-in since a long while. My add-ons plugins are in a separated directory, so they still are taken into account without any re-install even after a new I-build fresh install...

Do you have several windows in your session? I know this is peculiar configuration not used by every developper...

Comment 9 Dani Megert CLA 2007-11-30 04:05:40 EST
>Do you have several windows in your session?
Yes, I do. Could you go back to a previous build to check whether it's with the build? That would help much.
Comment 10 Dani Megert CLA 2007-12-03 04:20:35 EST
Frederic, in comment 2 you write it happens about every two hours, so when it happens next several times, please try to answer these questions each time:
- which file are you editing (I suspect that it this bug only surfaces with
  some specific file(s))
- is the same file open in another editor somewhere? If so, which editor(s)
  NOTE: also check for compare editors in the Team perspective
- is the file connected to a repository? CVS?

Also, could you go back to a previous install to see whether it's caused by new code or by some changed setup on your side.

If possible: could you start your dev workspace so that you can connect the debugger once the bug happens? We could then look at it together via NetMeeting.
Comment 11 Frederic Fusier CLA 2007-12-03 06:52:05 EST
(In reply to comment #10)
> Frederic, in comment 2 you write it happens about every two hours, so when it
> happens next several times, please try to answer these questions each time:
> - which file are you editing (I suspect that it this bug only surfaces with
>   some specific file(s))
> - is the same file open in another editor somewhere? If so, which editor(s)
>   NOTE: also check for compare editors in the Team perspective
> - is the file connected to a repository? CVS?
> 
Sorry, my comment 2 was a little bit too strong. I was a little bit upset to hit this bug twice in two hours, but in fact it never happened again after... So, it was not so frequent. By the way, I already can answer your questions without having this problem again:
1) it happened twice while editing the same file: MatchLocatorParser.java in /search/org/eclipse/jdt/internal/core/search/matching folder of org.eclipse.jdt.core project,
2) the file was opened twice using the Java editor in two separated windows (Java and Debug perspectives),
3) the file was connected to the org.eclipse.dev CVS repository.

> Also, could you go back to a previous install to see whether it's caused by 
> new code or by some changed setup on your side.
> 
I had not time to do this test. Not sure it would be helpful though as the problem seems unfortunately to happen in a random and seldom manner :-(

> If possible: could you start your dev workspace so that you can connect the
> debugger once the bug happens? We could then look at it together via
> NetMeeting.
> 
I'll do that...
Comment 12 Dani Megert CLA 2007-12-20 03:01:20 EST
I think this is a dup of bug 142715. Please reopen if you see this again using a build > N20071220-0010.

*** This bug has been marked as a duplicate of bug 142715 ***
Comment 13 Dani Megert CLA 2008-01-14 11:46:43 EST
Not a dup.
Comment 14 Frederic Fusier CLA 2008-04-05 16:38:40 EDT
I got exactly the same stack trace exception once again using 3.4M6. I was editing my file and the assertion failure occurred while inserting a piece of code in the middle of my file...
Comment 15 Frederic Fusier CLA 2008-04-10 15:09:47 EDT
I got the same exception again while using I20080408-0800.
This time it was while commenting several lines of code using Ctrl-Shift-C
Comment 16 Frederic Fusier CLA 2008-04-11 11:32:40 EDT
Again with the same build while hitting a breakpoint which opened a file already opened in an other window...
Comment 17 Dani Megert CLA 2008-04-11 11:40:03 EDT
I tried today for quite some time but no luck. Hopefully you can find a reproducible case soon.
Comment 18 Dani Megert CLA 2008-04-24 07:14:39 EDT
We'll try to investigate for 3.4 but a test case would really help.
Comment 19 Dani Megert CLA 2008-04-24 10:47:09 EDT
Do you still see this? If so, can you attach another stack trace? Thanks.
Comment 20 Dani Megert CLA 2008-04-24 10:48:14 EDT
>Do you still see this? If so, can you attach another stack trace? Thanks.
Please try using tomorrows N-build. I ask because I now fixed this one:

org.eclipse.core.runtime.AssertionFailedException: assertion failed: 
        at org.eclipse.core.runtime.Assert.isTrue(Assert.java:109)
        at org.eclipse.core.runtime.Assert.isTrue(Assert.java:95)
        at org.eclipse.jface.text.Position.setLength(Position.java:185)
        at
org.eclipse.jface.text.rules.FastPartitioner.computePartitioning(FastPartitioner.java:634)
        at
org.eclipse.jface.text.AbstractDocument.computePartitioning(AbstractDocument.java:1302)
        at
org.eclipse.jface.text.TextUtilities.computePartitioning(TextUtilities.java:428)
        at
org.eclipse.jdt.internal.ui.text.spelling.JavaSpellingEngine.check(JavaSpellingEngine.java:55)
...
Comment 21 Frederic Fusier CLA 2008-04-29 07:48:44 EDT
Created attachment 97952 [details]
Same exception got with I20080427-2000
Comment 22 Frederic Fusier CLA 2008-04-29 07:50:15 EDT
(In reply to comment #19)
> Do you still see this? If so, can you attach another stack trace? Thanks.
> 
Unfortunately yes, I got it once today with build I20080427-2000 (see the attached stack trace).
Comment 23 Dani Megert CLA 2008-05-13 09:11:20 EDT
There's nothing obvious in the code and you seem to be the only one getting this. Could you run your dev workspace in debug mode and set a (VM) breakpoint to line 634 in FastPartitioner? Maybe we can then debug it together. Otherwise I can't do much. Protecting the code is not a good idea because this most likely hides the real cause for the error.
Comment 24 Dani Megert CLA 2008-05-16 12:20:58 EDT
I would really like to fix this and will set an RC target as soon as I get steps.
Comment 25 Eclipse Webmaster CLA 2019-09-06 16:07:41 EDT
This bug hasn't had any activity in quite some time. Maybe the problem got resolved, was a duplicate of something else, or became less pressing for some reason - or maybe it's still relevant but just hasn't been looked at yet.

If you have further information on the current state of the bug, please add it. The information can be, for example, that the problem still occurs, that you still want the feature, that more information is needed, or that the bug is (for whatever reason) no longer relevant.
Comment 26 Eclipse Genie CLA 2021-11-07 08:14:33 EST
This bug hasn't had any activity in quite some time. Maybe the problem got resolved, was a duplicate of something else, or became less pressing for some reason - or maybe it's still relevant but just hasn't been looked at yet. As such, we're closing this bug.

If you have further information on the current state of the bug, please add it and reopen this bug. The information can be, for example, that the problem still occurs, that you still want the feature, that more information is needed, or that the bug is (for whatever reason) no longer relevant.

--
The automated Eclipse Genie.