Bug 108670 - "Off by one" error on insertion into TextEditor subclass
Summary: "Off by one" error on insertion into TextEditor subclass
Status: RESOLVED INVALID
Alias: None
Product: Platform
Classification: Eclipse Project
Component: Text (show other bugs)
Version: 3.1   Edit
Hardware: PC Linux-GTK
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Platform-Text-Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords: needinfo
Depends on:
Blocks:
 
Reported: 2005-09-02 09:45 EDT by Geoff Longman CLA
Modified: 2007-06-22 10:04 EDT (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Geoff Longman CLA 2005-09-02 09:45:15 EDT
A user has reported the following:

> I don't know if this is the same or I've already reported it, but
> sometimes the .page editor can get into a "confused" state where the
> text insertion point is off by 1. I.e. if the cursor is at "foo|b" and I
> type "x", I get "fox|ob" instead of "foox|b" (or something roughly along
> those lines). Rare. Closing the .page editor and reopening, fixes the
> problem.

User is on Linux/GTK but reports the problem in windows also. No log entries 
and as of yet we have not been able to come up with steps to reproduce. I 
realize that there isn't much to go on here but I hope that by reporting the 
issue someone may have seen it and can provide some more insight.
Comment 1 Dani Megert CLA 2005-09-02 09:50:06 EDT
Sorry, I don't know what the .page editor is. Please provide more details, see also:
http://dev.eclipse.org/viewcvs/index.cgi/%7Echeckout%7E/platform-text-home/development/bug-incomplete.htm
Comment 2 Oyvind Harboe CLA 2005-09-02 09:52:21 EDT
This is also reproduceable under Windows.

These exceptions are almost certainly related. 


Exception visible in stdout (Linux GTK), not in Eclipse Error Log....

:::::16:1:Element type "prop" must be followed by either attribute
specification
s, ">" or "/>".
        at
org.apache.xerces.impl.XMLErrorReporter.reportError(XMLErrorReporter.
java:343)
        at
org.apache.xerces.impl.XMLErrorReporter.reportError(XMLErrorReporter.
java:296)
        at
com.iw.plugins.spindle.core.parser.xml.XMLScanner.reportFatalError(XM
LScanner.java:1379)
        at
com.iw.plugins.spindle.core.parser.xml.XMLDocumentFragmentScannerImpl
.scanStartElement(XMLDocumentFragmentScannerImpl.java:807)
        at
com.iw.plugins.spindle.core.parser.xml.XMLDocumentFragmentScannerImpl
$FragmentContentDispatcher.dispatch(XMLDocumentFragmentScannerImpl.java:1677)
        at
com.iw.plugins.spindle.core.parser.xml.XMLDocumentFragmentScannerImpl
.scanDocument(XMLDocumentFragmentScannerImpl.java:337)
        at
com.iw.plugins.spindle.core.parser.xml.StandardParserConfiguration.pa
rse(StandardParserConfiguration.java:525)
Comment 3 Geoff Longman CLA 2005-09-02 09:52:42 EDT
It's in the subject... a .page editor is a subclass of TextEditor
Comment 4 Geoff Longman CLA 2005-09-02 09:56:08 EDT
(In reply to comment #2)
I admit that the "off by one" is making the file into invalid xml in some cases 
but the exception is thrown after the bad insertion (reconciler) and I don't 
think it will help much in tracking down the root cause.

Comment 5 Dani Megert CLA 2005-09-02 09:59:29 EDT
Does it happen using the standard text editor shipped with Eclipse SDK?
Comment 6 Oyvind Harboe CLA 2005-09-02 10:21:11 EDT
(In reply to comment #5)
> Does it happen using the standard text editor shipped with Eclipse SDK?

I've only seen this when editing .page files w/the Spindle editor.

I'm certain that this is Windows/Linux & JRE independant(happens w/JRE 1.4 & JRE
1.5). 

At this point, just leave the PR as is. I'll try to assemble enough information
to make the PR useful.


Øyvind
Comment 7 Dani Megert CLA 2007-06-22 09:59:26 EDT
Get rid of deprecated state.
Comment 8 Dani Megert CLA 2007-06-22 10:04:39 EDT
.