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

Bug 344516

Summary: GC with Transform crashes when rendering TextLayout with strikeout and selection
Product: [Eclipse Project] Platform Reporter: Hugo Corbucci <nightao>
Component: SWTAssignee: Felipe Heidrich <eclipse.felipe>
Status: RESOLVED FIXED QA Contact:
Severity: critical    
Priority: P3 CC: eclipse.felipe, Silenio_Quarti
Version: 4.1Flags: Silenio_Quarti: review+
Target Milestone: 3.7 RC1   
Hardware: PC   
OS: Windows 7   
Whiteboard:
Attachments:
Description Flags
Snippet to reproduce the bug
none
Patch none

Description Hugo Corbucci CLA 2011-05-02 20:46:44 EDT
Build Identifier: 20110218-0911

On Windows (XP, Vista and 7), when trying to render a TextLayout with strikeout style and a selection on this style, the GC with a transform crashes the JVM with the following error:

#
# A fatal error has been detected by the Java Runtime Environment:
#
#  EXCEPTION_ACCESS_VIOLATION (0xc0000005) at pc=0x09d01f00, pid=3116, tid=2340
#
# JRE version: 6.0_25-b06
# Java VM: Java HotSpot(TM) Client VM (20.0-b11 mixed mode, sharing windows-x86 )
# Problematic frame:
# C  0x09d01f00

Apparently any transform will cause the problem, even if an empty transform. It doesn't happen to bold, italic, underline or any other style.


Reproducible: Always

Steps to Reproduce:
1. Create a TextLayout with some text and a strike out style.
2. On paint, set a transform on the GC.
3. Draw the text layout with selection containing the range which is struck out.
Comment 1 Hugo Corbucci CLA 2011-05-02 20:48:31 EDT
Created attachment 194547 [details]
Snippet to reproduce the bug
Comment 2 Felipe Heidrich CLA 2011-05-04 15:08:56 EDT
Thank you for the test case.
Comment 3 Felipe Heidrich CLA 2011-05-04 15:09:19 EDT
Created attachment 194755 [details]
Patch
Comment 4 Hugo Corbucci CLA 2011-05-04 15:21:54 EDT
(In reply to comment #3)
> Created attachment 194755 [details]
> Patch

Worked perfectly for us. Thank you!
Not changing the status since we're not familiar with the process but it looks RESOLVED to us.
Comment 5 Felipe Heidrich CLA 2011-05-04 16:13:54 EDT
Fixed in HEAD.