Community
Participate
Working Groups
Build Identifier: Eclipse carbon 3.5.2 20100218-1602 StyledText crash in TextLayout.getBounds in OS.ATSUGetTextHighlight in Eclipse Carbon. Reproducible: Always Steps to Reproduce: 1.Run the sample st_screenshot_crash in Eclipse carbon 3.5.2 20100218-1602. 2.Select ment File > getText.A black sprite shell will be showed.The sprite shell will move to the cursor's current location every 2.5 seconds, implemented by an UIJob. 3.Open an java file in Eclipse.Move the cursor quickly in the java file editor.Try to select and drag an section of text.Once you have drag an section of text successfully, hold the mouse left button, don't move the mouse, wait 2.5 seconds, the sprite shell will move to the cursor's current location, then release the button and press the left button again to dispose the sprite shell. 4.Input an space in StyledText, it will crashed.
Created attachment 199545 [details] Crash sample application
Created attachment 199546 [details] Stack trace
Java frames: (J=compiled Java code, j=interpreted, Vv=VM code) j org.eclipse.swt.internal.carbon.OS.ATSUGetTextHighlight(IIIIII)I+0 j org.eclipse.swt.graphics.TextLayout.getBounds(II)Lorg/eclipse/swt/graphics/Rectangle;+383 j org.eclipse.swt.custom.StyledText.getBoundsAtOffset(I)Lorg/eclipse/swt/graphics/Rectangle;+63 j org.eclipse.swt.custom.StyledText.showCaret()V+5 j org.eclipse.swt.custom.StyledText.modifyContent(Lorg/eclipse/swt/widgets/Event;Z)V+320 j org.eclipse.swt.custom.StyledText.sendKeyEvent(Lorg/eclipse/swt/widgets/Event;)V+10 j org.eclipse.swt.custom.StyledText.doContent(C)V+257 j org.eclipse.swt.custom.StyledText.handleKey(Lorg/eclipse/swt/widgets/Event;)V+270 j org.eclipse.swt.custom.StyledText.handleKeyDown(Lorg/eclipse/swt/widgets/Event;)V+153 j org.eclipse.swt.custom.StyledText$7.handleEvent(Lorg/eclipse/swt/widgets/Event;)V+104 j org.eclipse.swt.widgets.EventTable.sendEvent(Lorg/eclipse/swt/widgets/Event;)V+214 j org.eclipse.swt.widgets.Widget.sendEvent(Lorg/eclipse/swt/widgets/Event;)V+25 j org.eclipse.swt.widgets.Widget.sendEvent(ILorg/eclipse/swt/widgets/Event;Z)V+73 j org.eclipse.swt.widgets.Widget.sendEvent(ILorg/eclipse/swt/widgets/Event;)V+4 j org.eclipse.swt.widgets.Widget.sendKeyEvent(ILorg/eclipse/swt/widgets/Event;)Z+3 j org.eclipse.swt.widgets.Widget.sendKeyEvent(II)Z+255 j org.eclipse.swt.widgets.Control.kEventUnicodeKeyPressed(III)I+31 j org.eclipse.swt.widgets.Composite.kEventUnicodeKeyPressed(III)I+4 j org.eclipse.swt.widgets.Control.kEventTextInputUnicodeForKeyEvent(III)I+137 j org.eclipse.swt.widgets.Canvas.kEventTextInputUnicodeForKeyEvent(III)I+4 Thread 0 Crashed: Dispatch queue: com.apple.main-thread 0 com.apple.QD 0x912b5ff2 CheckPortPictureRecording + 20 1 com.apple.QD 0x912d613b InternalStdLine + 126 2 com.apple.QD 0x912e0bcd InternalLineTo + 32 3 com.apple.QD 0x912e0c77 LineTo + 63 4 com.apple.QD 0x9130ded6 TTextLineLayout::GetTextHighlight(long, long, unsigned long, unsigned long, OpaqueRgnHandle*) + 704 5 com.apple.QD 0x912fbb8d ATSUGetTextHighlight + 140 6 libswt-pi-carbon-3659.jnilib 0x36f1ae82 Java_org_eclipse_swt_internal_carbon_OS_ATSUGetTextHighlight + 60
I can reproduce this but not reliably (some times it crashes, sometimes it doesn't). But I always get this warning everytime I click on the sprite: Thu Jul 21 14:15:09 myhost.ottawa.ibm.com java[961] <Error>: kCGErrorIllegalArgument: CGSGetWindowBounds: NULL window Thu Jul 21 14:15:09 myhost.ottawa.ibm.com java[961] <Error>: kCGErrorFailure: Set a breakpoint @ CGErrorBreakpoint() to catch errors as they are logged.
Created attachment 200120 [details] fix
Fixed http://git.eclipse.org/c/platform/eclipse.platform.swt.git/commit/?id=497b053864daffc7b924c42f6f8cf339644548f2
Thanks! It has been fixed!