Bug 178102 - [Graphics] Content disappears for a single long line (wrapped)
Summary: [Graphics] Content disappears for a single long line (wrapped)
Status: CLOSED WONTFIX
Alias: None
Product: Platform
Classification: Eclipse Project
Component: SWT (show other bugs)
Version: 3.3   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Platform-SWT-Inbox CLA
QA Contact: Felipe Heidrich CLA
URL:
Whiteboard: stalebug
Keywords: triaged
: 287412 (view as bug list)
Depends on:
Blocks:
 
Reported: 2007-03-19 13:27 EDT by Kai-Uwe Maetzel CLA
Modified: 2020-03-31 04:00 EDT (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Kai-Uwe Maetzel CLA 2007-03-19 13:27:28 EDT
3.3 M5
Launch the following snippet.
Double click into the text widget until the text disappears.

----------

package org.eclipse.swt.snippets;

import org.eclipse.swt.*;
import org.eclipse.swt.custom.*;
import org.eclipse.swt.events.*;
import org.eclipse.swt.layout.*;
import org.eclipse.swt.widgets.*;

public class SingleLineBug {
	
	static StyledText styledText;
		
	public static void main(String [] args) {
		final Display display = new Display();
		final Shell shell = new Shell(display);
		shell.setLayout(new GridLayout());
		styledText = new StyledText(shell, SWT.WRAP | SWT.BORDER);
		styledText.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true));
		styledText.setText("Rudi ");
		
		styledText.addMouseListener(new MouseAdapter() {
			@Override
			public void mouseDoubleClick(MouseEvent event) {
				styledText.append(styledText.getText());
				System.out.println(styledText.getCharCount());
			}
		});
					
		shell.setSize(800, 800);
		shell.open();
		while (!shell.isDisposed()) {
			if (!display.readAndDispatch())
				display.sleep();
		}
		display.dispose();
	}
}
Comment 1 Grant Gayed CLA 2007-03-22 13:17:42 EDT
I added "(wrapped)" to the title in case this case is different from the known problems that arise from having an extremely long unwrapped line in StyledText.

FH note that using the comment 0 snippet I did not see the text disappear on win2000, at least until character count 655360 was reached.
Comment 2 Felipe Heidrich CLA 2007-05-15 18:01:34 EDT
It happens to me when charcount is 81920 - the OS call that shapes the glyphs (ScriptShape) fails when the text run is that long. It returns E_INVALIDARG result code. The msdn doc does not mention anything about this problem.
Comment 3 Felipe Heidrich CLA 2009-08-21 15:24:55 EDT
closing as wont fix. bug in windows, no workaround available.
Comment 4 Felipe Heidrich CLA 2009-08-24 09:29:47 EDT
*** Bug 287412 has been marked as a duplicate of this bug. ***
Comment 5 Felipe Heidrich CLA 2009-08-24 09:34:34 EDT
In a second thought, the code in shape can detect the run is too big and split it into smaller manageable runs.
Comment 6 Felipe Heidrich CLA 2009-08-24 09:35:38 EDT
Your bug has been moved to triage, visit http://www.eclipse.org/swt/triage.php for more info.
Comment 7 Leo Ufimtsev CLA 2017-08-03 12:31:10 EDT
This is a one-off bulk update. (The last one in the triage migration).

Moving bugs from swt-triaged@eclipse to platform-swt-inbox@eclipse.org and adding "triaged" keyword as per new triage process:
https://wiki.eclipse.org/SWT/Devel/Triage

See Bug 518478 for details.

Tag for notification/mail filters:
@TriageBulkUpdate
Comment 8 Eclipse Genie CLA 2020-03-31 04:00:35 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. 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.