Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 287412 - StyledText does not display text with some combinations of characters
Summary: StyledText does not display text with some combinations of characters
Status: RESOLVED DUPLICATE of bug 178102
Alias: None
Product: Platform
Classification: Eclipse Project
Component: SWT (show other bugs)
Version: 3.5   Edit
Hardware: PC Windows XP
: P3 major (vote)
Target Milestone: ---   Edit
Assignee: Platform-SWT-Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-08-24 05:19 EDT by Aleksander Madej CLA
Modified: 2009-08-24 09:29 EDT (History)
1 user (show)

See Also:


Attachments
Example SWT application showing the problem (17.19 KB, application/octet-stream)
2009-08-24 05:23 EDT, Aleksander Madej CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Aleksander Madej CLA 2009-08-24 05:19:06 EDT
The issue is SWT related (3.5.0 on Win XP).

Steps to reproduce:

The example application contains two StyledText controls created in the same way. It also generates sample text with specific character combination (letters between ‘a’ and ‘z’ and space ‘ ‘). The first StyledText displays whole generated text successfully. If application adds at least one character to the end of sample text and puts it to the second StyledText via setText() method, no text is displayed.
More over if a user types any character in the first StyledText the whole existing text disappears. But If backspace is pressed just after the added character then whole text will be shown again. 

My little investigation (maybe it could be helpful): 

Under debugger, one can see that the native method:

”int org.eclipse.swt.internal.win32.OS.ScriptShape(int, int, char[], int, int, SCRIPT_ANALYSIS, int, int, int, int[])”

returns error code: -2147024809 (probably E_INVALIDARG) for the problematic text.

The enclosing method:

”boolean org.eclipse.swt.graphics.TextLayout.shape(int, StyleItem, char[], int[], int, SCRIPT_PROPERTIES)”

ignores this error and reports success despite of the error and the fact that glyphCount[0] contains 0 for our long text.
Comment 1 Aleksander Madej CLA 2009-08-24 05:23:26 EDT
Created attachment 145397 [details]
Example SWT application showing the problem
Comment 2 Felipe Heidrich CLA 2009-08-24 09:29:47 EDT

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