Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 359449 - "zero width space" (aka UTF8:"E2 80 8B") character in code editor makes eclipse throw an AIOOBE
Summary: "zero width space" (aka UTF8:"E2 80 8B") character in code editor makes eclip...
Status: CLOSED DUPLICATE of bug 358970
Alias: None
Product: Platform
Classification: Eclipse Project
Component: SWT (show other bugs)
Version: 3.8   Edit
Hardware: PC Linux
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Platform-SWT-Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-09-29 12:04 EDT by Tanguy CLA
Modified: 2011-10-03 11:00 EDT (History)
2 users (show)

See Also:


Attachments
Stack trace of AIOOBE (7.35 KB, text/plain)
2011-09-30 08:12 EDT, Tanguy CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Tanguy CLA 2011-09-29 12:04:33 EDT
Build Identifier: 20110301-1815

If you have a "zero width space" inside a source file, eclipse starts behaving weirdly as soon as the region containing that character is selected :
* the lines around it are greyed
* the cursor start behaving as if in insert mode but doesn't replace anything, in fact edition works well, the visual feedback doesn't.
* the editor complains with the following message : ""Paste" did not complete normally.  Please see the log for more information. java.lang.ArrayIndexOutOfBoundsException"

Reproducible: Always

Steps to Reproduce:
1. Open eclipse, open a file with a code editor (anything but the Text Editor)
2. go to http://en.wikipedia.org/wiki/Zero-width_space and paste one of the lines containing a zero width space character. Alternatively there should be some of them here after : Antidisestablishmentarianism​Antidisestablishmentarianism​Antidisestablishmentarianism​
3. eclipse should be complaining
Comment 1 Dani Megert CLA 2011-09-29 12:21:06 EDT
Could you quickly attach a test file? That would make it easier to reproduce.
Comment 2 Dani Megert CLA 2011-09-30 07:12:28 EDT
I cannot reproduce this in the Java editor using Juno M2. Please provide more detailed steps and an example file if you can reproduce in the Java editor.
Comment 3 Dani Megert CLA 2011-09-30 07:21:24 EDT
OK, quickly also tried this on my Linux box and there the widget starts to behave ugly, but I could not trigger the AIOOB. If you have steps to reproduce those then please tell us and attach the stack trace here.

I can also reproduce the strange behavior in the text editor: there e.g. pressing End does not reveal the caret.
Comment 4 Tanguy CLA 2011-09-30 08:12:48 EDT
Created attachment 204373 [details]
Stack trace of AIOOBE

Adding stack trace as requested.
Comment 5 Felipe Heidrich CLA 2011-10-03 11:00:08 EDT

*** This bug has been marked as a duplicate of bug 358970 ***