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

Bug 368105

Summary: If there is a constant long array containing outside the ASCII code, crashes eclipse.
Product: [Eclipse Project] Platform Reporter: Yuji Yamamoto <yuji.software+eclipse>
Component: SWTAssignee: Platform-SWT-Inbox <platform-swt-inbox>
Status: CLOSED WONTFIX QA Contact:
Severity: critical    
Priority: P3 CC: daniel_megert, eclipse.felipe, remy.suen
Version: 3.8   
Target Milestone: ---   
Hardware: PC   
OS: Windows XP   
Whiteboard: stalebug
Attachments:
Description Flags
Instance count graph none

Description Yuji Yamamoto CLA 2012-01-08 10:01:46 EST
Build Identifier: Version: Indigo Service Release 1 Build id: 20110916-0149

Java source.
Such that the following error, write a constant long array containing outside the ASCII code.
"The code for the static initializer is exceeding the 65535 bytes limit"

Garbled when you scroll the source code in this state.

Hitting the cursor to the error, or when you click on the location garbled, crashes eclipse with message.
"An internal error has occurred."

Reproducible: Always

Steps to Reproduce:
1.Create a new java file.
2.Enter the following sources:
public class MaxConstArrayTest {
    public static String[] MAX_CONST_ARRAY = new String[]{
        "⇔", "⇔", "⇔", "⇔", "⇔", "⇔", …(Followed by about 10,000 times)
    }
}
(sample. https://gist.github.com/1578608)
3.Garbled when you scroll the source code in this state.
4.Hitting the cursor to the error, or when you click on the location garbled, crashes eclipse.
Comment 1 Dani Megert CLA 2012-01-09 05:37:48 EST
I can reproduce on Windows 7. I get 'out of handles'.

Note that you need to switch the encoding to 'UTF-8'.
Comment 2 Dani Megert CLA 2012-01-09 05:38:17 EST
Maybe caused by too excessive StyleRange cloning (see attached picture)?
Comment 3 Dani Megert CLA 2012-01-09 05:38:47 EST
Created attachment 209197 [details]
Instance count graph
Comment 4 Lars Vogel CLA 2019-11-14 03:26:54 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.

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.

If the bug is still relevant, please remove the "stalebug" whiteboard tag.