Community
Participate
Working Groups
We've got following bug reported multiple times by users of SmartGit 6.5 which uses SWT 4.4.0: java.lang.IllegalArgumentException at org.eclipse.swt.SWT.error(SWT.java:4422) at org.eclipse.swt.SWT.error(SWT.java:4356) at org.eclipse.swt.SWT.error(SWT.java:4327) at org.eclipse.swt.graphics.TextLayout._getOffset(TextLayout.java:2095) at org.eclipse.swt.graphics.TextLayout.getPreviousOffset(TextLayout.java:2354) at org.eclipse.swt.custom.StyledText.getBoundsAtOffset(StyledText.java:3650) at org.eclipse.swt.custom.StyledText.setCaretLocation(StyledText.java:8509) at org.eclipse.swt.custom.StyledText.setCaretLocation(StyledText.java:8500) at org.eclipse.swt.custom.StyledText.updateSelection(StyledText.java:10342) at org.eclipse.swt.custom.StyledText.handleTextChanged(StyledText.java:6253) at org.eclipse.swt.custom.StyledText$6.textChanged(StyledText.java:5643) at org.eclipse.swt.custom.StyledTextListener.handleEvent(StyledTextListener.java:71) at org.eclipse.swt.custom.DefaultContent.sendTextEvent(DefaultContent.java:797) at org.eclipse.swt.custom.DefaultContent.replaceTextRange(DefaultContent.java:790) at org.eclipse.swt.custom.StyledText.handleCompositionChanged(StyledText.java:5827) at org.eclipse.swt.custom.StyledText$8.handleEvent(StyledText.java:5689) at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84) at org.eclipse.swt.widgets.Display.sendEvent(Display.java:4353) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1061) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1085) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1070) at org.eclipse.swt.widgets.IME.WM_IME_COMPOSITION(IME.java:387) at org.eclipse.swt.widgets.Canvas.WM_IME_COMPOSITION(Canvas.java:366) at org.eclipse.swt.widgets.Control.windowProc(Control.java:4636) at org.eclipse.swt.widgets.Canvas.windowProc(Canvas.java:339) at org.eclipse.swt.widgets.Display.windowProc(Display.java:5023) at org.eclipse.swt.internal.win32.OS.DispatchMessageW(Native Method) at org.eclipse.swt.internal.win32.OS.DispatchMessage(OS.java:2549) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3759) Unfortunately, I have no snippet or steps to reproduce.
A similar exception has slightly different line numbers at the StyledText.handleCompositionChanged and IME.WM_IME_COMPOSITION lines: java.lang.IllegalArgumentException at org.eclipse.swt.SWT.error(SWT.java:4422) at org.eclipse.swt.SWT.error(SWT.java:4356) at org.eclipse.swt.SWT.error(SWT.java:4327) at org.eclipse.swt.graphics.TextLayout._getOffset(TextLayout.java:2095) at org.eclipse.swt.graphics.TextLayout.getPreviousOffset(TextLayout.java:2354) at org.eclipse.swt.custom.StyledText.getBoundsAtOffset(StyledText.java:3650) at org.eclipse.swt.custom.StyledText.setCaretLocation(StyledText.java:8509) at org.eclipse.swt.custom.StyledText.setCaretLocation(StyledText.java:8500) at org.eclipse.swt.custom.StyledText.updateSelection(StyledText.java:10342) at org.eclipse.swt.custom.StyledText.handleTextChanged(StyledText.java:6253) at org.eclipse.swt.custom.StyledText$6.textChanged(StyledText.java:5643) at org.eclipse.swt.custom.StyledTextListener.handleEvent(StyledTextListener.java:71) at org.eclipse.swt.custom.DefaultContent.sendTextEvent(DefaultContent.java:797) at org.eclipse.swt.custom.DefaultContent.replaceTextRange(DefaultContent.java:790) at org.eclipse.swt.custom.StyledText.handleCompositionChanged(StyledText.java:5832) at org.eclipse.swt.custom.StyledText$8.handleEvent(StyledText.java:5689) at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84) at org.eclipse.swt.widgets.Display.sendEvent(Display.java:4353) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1061) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1085) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1070) at org.eclipse.swt.widgets.IME.WM_IME_COMPOSITION(IME.java:505) at org.eclipse.swt.widgets.Canvas.WM_IME_COMPOSITION(Canvas.java:366) at org.eclipse.swt.widgets.Control.windowProc(Control.java:4636) at org.eclipse.swt.widgets.Canvas.windowProc(Canvas.java:339) at org.eclipse.swt.widgets.Display.windowProc(Display.java:5023) at org.eclipse.swt.internal.win32.OS.DispatchMessageW(Native Method) at org.eclipse.swt.internal.win32.OS.DispatchMessage(OS.java:2549) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3759)
This error is one of the most reported bugs for SmartGit (78 crash logs, 20 more detailled reports). Hence, I'm increasing the importance.
That is a stacktrace using SWT 4.5M7: java.lang.IllegalArgumentException at org.eclipse.swt.SWT.error(SWT.java:4472) at org.eclipse.swt.SWT.error(SWT.java:4406) at org.eclipse.swt.SWT.error(SWT.java:4377) at org.eclipse.swt.graphics.TextLayout._getOffset(TextLayout.java:2095) at org.eclipse.swt.graphics.TextLayout.getPreviousOffset(TextLayout.java:2354) at org.eclipse.swt.custom.StyledText.getBoundsAtOffset(StyledText.java:3669) at org.eclipse.swt.custom.StyledText.setCaretLocation(StyledText.java:8554) at org.eclipse.swt.custom.StyledText.setCaretLocation(StyledText.java:8545) at org.eclipse.swt.custom.StyledText.updateSelection(StyledText.java:10404) at org.eclipse.swt.custom.StyledText.handleTextChanged(StyledText.java:6262) at org.eclipse.swt.custom.StyledText$6.textChanged(StyledText.java:5662) at org.eclipse.swt.custom.StyledTextListener.handleEvent(StyledTextListener.java:71) at org.eclipse.swt.custom.DefaultContent.sendTextEvent(DefaultContent.java:796) at org.eclipse.swt.custom.DefaultContent.replaceTextRange(DefaultContent.java:789) at org.eclipse.swt.custom.StyledText.handleCompositionChanged(StyledText.java:5851) at org.eclipse.swt.custom.StyledText$8.handleEvent(StyledText.java:5708) at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84) at org.eclipse.swt.widgets.Display.sendEvent(Display.java:4362) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1061) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1085) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1070) at org.eclipse.swt.widgets.IME.WM_IME_COMPOSITION(IME.java:508) at org.eclipse.swt.widgets.Canvas.WM_IME_COMPOSITION(Canvas.java:366) at org.eclipse.swt.widgets.Control.windowProc(Control.java:4680) at org.eclipse.swt.widgets.Canvas.windowProc(Canvas.java:339) at org.eclipse.swt.widgets.Display.windowProc(Display.java:5050) at org.eclipse.swt.internal.win32.OS.DispatchMessageW(Native Method) at org.eclipse.swt.internal.win32.OS.DispatchMessage(OS.java:2549) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3767) at com.syntevo.q.gui.QSwt.dispatchEvents(SourceFile:305) at com.syntevo.smartgit.SaApplicationStarter.openGui(SourceFile:323) at com.syntevo.smartgit.SaApplicationStarter.parse(SourceFile:210) at com.syntevo.sc.application.ScParsingApplicationStarter.start(SourceFile:62) at SmartGit.main(SourceFile:11)
Hard to fix without any reproducible scenario but one possible harmless fix that might help is to change line 3666 in StyledText.java from int offsetInLine = offset - lineOffset; to int offsetInLine = Math.max (0, offset - lineOffset); Thomas, do you think it is possible to test this change in SmartGit's SWT bundle and confirm before we actually integrate it in a release?
Unfortunately, no user has provided reproducible steps. I want to avoid building SWT myself.
Current SWT error stack-trace doesn't print the 'offset' value, we don't know if it's going negative or greater than text array length. Detailed the SWT error with 'offset' value in TextLayout._getOffset(), vai below git commit: http://git.eclipse.org/c/platform/eclipse.platform.swt.git/commit/?id=aa5e1f529d6cb38f7ba5b2ed1cb51812ef434823 Thomas: Please share/attach stack-trace(s) with offset information.
Slightly different stack-trace: https://dev.eclipse.org/recommenders/committers/confess/#/problems/55d5737be4b0f0b83a6e67b8/details java.lang.IllegalArgumentException: Index out of bounds at org.eclipse.swt.SWT.error(SWT.java:4458) at org.eclipse.swt.SWT.error(SWT.java:4392) at org.eclipse.swt.SWT.error(SWT.java:4363) at org.eclipse.swt.graphics.TextLayout._getOffset(TextLayout.java:2095) at org.eclipse.swt.graphics.TextLayout.getPreviousOffset(TextLayout.java:2354) at org.eclipse.swt.custom.StyledText.getPointAtOffset(StyledText.java:5474) at org.eclipse.swt.custom.StyledText.setCaretLocation(StyledText.java:8556) at org.eclipse.swt.custom.StyledText.scrollHorizontal(StyledText.java:8039) at org.eclipse.swt.custom.StyledText.claimRightFreeSpace(StyledText.java:1682) at org.eclipse.swt.custom.StyledText.handleResize(StyledText.java:6218) at org.eclipse.swt.custom.StyledText$7.handleEvent(StyledText.java:5694) at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
(In reply to Niraj Modi from comment #6) > Current SWT error stack-trace doesn't print the 'offset' value, we don't > know if it's going negative or greater than text array length. > Detailed the SWT error with 'offset' value in TextLayout._getOffset(), vai > below git commit: > http://git.eclipse.org/c/platform/eclipse.platform.swt.git/commit/ > ?id=aa5e1f529d6cb38f7ba5b2ed1cb51812ef434823 > > Thomas: Please share/attach stack-trace(s) with offset information. Going by the code it highly possible that below method call which is common across all stack-trace, is getting called with negative 'offset' value only and same gets passed to TextLayout._getOffset() and is leading to this problem: org.eclipse.swt.graphics.TextLayout.getPreviousOffset(int offset, int movement) Working on a fix by adding a lower-cap of 0 to 'offset' value(as suggested in comment 4 by Arun) at below method calls in StyledText class: - StyledText.getBoundsAtOffset() - StyledText.getPointAtOffset()
New Gerrit change created: https://git.eclipse.org/r/55623
Gerrit change https://git.eclipse.org/r/55623 was merged to [master]. Commit: http://git.eclipse.org/c/platform/eclipse.platform.swt.git/commit/?id=4d17d52f0802226ccdd0515785bd9de04fbce5d1
Resolving.
*** Bug 476929 has been marked as a duplicate of this bug. ***
(In reply to Eclipse Genie from comment #10) > Gerrit change https://git.eclipse.org/r/55623 was merged to [master]. > Commit: > http://git.eclipse.org/c/platform/eclipse.platform.swt.git/commit/ > ?id=4d17d52f0802226ccdd0515785bd9de04fbce5d1 Above fix in StyledText#getPointAtOffset(int offset) method will also take care of below IllegalArgumentException reported in below Auto-Error-Reports: https://dev.eclipse.org/recommenders/committers/confess/#/problems/55cb45d5e4b0176300a79da8/details https://dev.eclipse.org/recommenders/committers/confess/#/problems/54c4f0f0bee810030da08992/details https://dev.eclipse.org/recommenders/committers/confess/#/problems/55cf2b78e4b0f0b83a6dd925/details https://dev.eclipse.org/recommenders/committers/confess/#/problems/55d37486e4b0f0b83a6e3266/details
(In reply to Thomas Singer from comment #5) > Unfortunately, no user has provided reproducible steps. I want to avoid > building SWT myself. Hi Thomas, Going by various stack-traces available, we have made required changes. Can you try 4.6 M2 build & see if it fixes the problem in your product ?
I've built our new SWT jars from the latest code and released them with the latest preview build. It will take some time to verify that the problem has been solved by not occurring exceptions.
We are still getting reports with SWT 4.610: java.lang.IllegalArgumentException at org.eclipse.swt.SWT.error(SWT.java:4484) at org.eclipse.swt.graphics.TextLayout._getOffset(TextLayout.java:2102) at org.eclipse.swt.graphics.TextLayout.getPreviousOffset(TextLayout.java:2361) at org.eclipse.swt.custom.StyledText.getBoundsAtOffset(StyledText.java:3670) at org.eclipse.swt.custom.StyledText.setCaretLocation(StyledText.java:8555) at org.eclipse.swt.custom.StyledText.setCaretLocation(StyledText.java:8546) at org.eclipse.swt.custom.StyledText.updateSelection(StyledText.java:10405) at org.eclipse.swt.custom.StyledText.handleTextChanged(StyledText.java:6263) at org.eclipse.swt.custom.StyledText$6.textChanged(StyledText.java:5663) at org.eclipse.swt.custom.StyledTextListener.handleEvent(StyledTextListener.java:71) at org.eclipse.swt.custom.DefaultContent.sendTextEvent(DefaultContent.java:797) at org.eclipse.swt.custom.DefaultContent.replaceTextRange(DefaultContent.java:790) at org.eclipse.swt.custom.StyledText.handleCompositionChanged(StyledText.java:5847) at org.eclipse.swt.custom.StyledText$8.handleEvent(StyledText.java:5709) at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:85) at org.eclipse.swt.widgets.Display.sendEvent(Display.java:4373) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1113) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1137) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1122) at org.eclipse.swt.widgets.IME.WM_IME_COMPOSITION(IME.java:389) at org.eclipse.swt.widgets.Canvas.WM_IME_COMPOSITION(Canvas.java:373) at org.eclipse.swt.widgets.Control.windowProc(Control.java:4710) at org.eclipse.swt.widgets.Canvas.windowProc(Canvas.java:344) at org.eclipse.swt.widgets.Display.windowProc(Display.java:5061) at org.eclipse.swt.internal.win32.OS.DispatchMessageW(Native Method) at org.eclipse.swt.internal.win32.OS.DispatchMessage(OS.java:2552) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3777) ... Unfortunately, no user has yet provided exact steps how to reproduce.
(In reply to Thomas Singer from comment #16) > We are still getting reports with SWT 4.610: > > java.lang.IllegalArgumentException > at org.eclipse.swt.SWT.error(SWT.java:4484) > at org.eclipse.swt.graphics.TextLayout._getOffset(TextLayout.java:2102) > at > org.eclipse.swt.graphics.TextLayout.getPreviousOffset(TextLayout.java:2361) > at org.eclipse.swt.custom.StyledText.getBoundsAtOffset(StyledText.java:3670) > at > ... Hi Thomas, Fix in comment 10 already has a check in StyledText.getBoundsAtOffset() which should have avoided above stack-trace for negative offsets. Can you please confirm if this stack-trace occurred with my fix and has over-shot value which is non-negative ? Also I have already updated the logging mechanism(commit in comment 6) to print the offset in the log which should look something like below(for offset value -1): java.lang.IllegalArgumentException: Index out of bounds [offset value: -1] at org.eclipse.swt.SWT.error(SWT.java:4514) at org.eclipse.swt.graphics.TextLayout._getOffset(TextLayout.java:2144) at org.eclipse.swt.graphics.TextLayout.getPreviousOffset(TextLayout.java:2410) at org.eclipse.swt.custom.StyledText.getBoundsAtOffset(StyledText.java:3700) > Unfortunately, no user has yet provided exact steps how to reproduce. Keep looking for so that we could fix the root cause and not the symptoms.
(In reply to Niraj Modi from comment #17) > Also I have already updated the logging mechanism(commit in comment 6) to > print the offset in the log which should look something like below(for > offset value -1): > java.lang.IllegalArgumentException: Index out of bounds [offset value: -1] > at org.eclipse.swt.SWT.error(SWT.java:4514) > at org.eclipse.swt.graphics.TextLayout._getOffset(TextLayout.java:2144) > at > org.eclipse.swt.graphics.TextLayout.getPreviousOffset(TextLayout.java:2410) > at org.eclipse.swt.custom.StyledText.getBoundsAtOffset(StyledText.java:3700) Unfortunately, nearly all of our exceptions we get from users don't contain a message because of potential sensitive data being sent. The full data only is available if the user accepts to send the full log.
Luckily a few users have reported full logs. The exception message looks like: java.lang.IllegalArgumentException: Index out of bounds [offset value: 8] at org.eclipse.swt.SWT.error(SWT.java:4484) at org.eclipse.swt.graphics.TextLayout._getOffset(TextLayout.java:2102) at org.eclipse.swt.graphics.TextLayout.getPreviousOffset(TextLayout.java:2361) or java.lang.IllegalArgumentException: Index out of bounds [offset value: 15] at org.eclipse.swt.SWT.error(SWT.java:4484) at org.eclipse.swt.graphics.TextLayout._getOffset(TextLayout.java:2102) at org.eclipse.swt.graphics.TextLayout.getPreviousOffset(TextLayout.java:2361)
Could it be related to bug 481814?
(In reply to Thomas Singer from comment #20) > Could it be related to bug 481814? No, this looks like a different issue. (In reply to Thomas Singer from comment #19) > Luckily a few users have reported full logs. The exception message looks > like: > > java.lang.IllegalArgumentException: Index out of bounds [offset value: 8] > at org.eclipse.swt.SWT.error(SWT.java:4484) > at org.eclipse.swt.graphics.TextLayout._getOffset(TextLayout.java:2102) > at > org.eclipse.swt.graphics.TextLayout.getPreviousOffset(TextLayout.java:2361) > > or > > java.lang.IllegalArgumentException: Index out of bounds [offset value: 15] > at org.eclipse.swt.SWT.error(SWT.java:4484) > at org.eclipse.swt.graphics.TextLayout._getOffset(TextLayout.java:2102) > at > org.eclipse.swt.graphics.TextLayout.getPreviousOffset(TextLayout.java:2361) Hi Thomas, There is no clean solution for above, only thing we can do is add appropriate checks in code to avoid these scenario(s) If possible please share full stack-traces of above instances(which different origin in StyledText code), so we know what all places in StyledText code need to handled. Targeting for Neon RC1
Here are some stacktraces from different users against SWT 4.610: java.lang.IllegalArgumentException: Index out of bounds [offset value: 20] at org.eclipse.swt.SWT.error(SWT.java:4484) at org.eclipse.swt.graphics.TextLayout._getOffset(TextLayout.java:2102) at org.eclipse.swt.graphics.TextLayout.getPreviousOffset(TextLayout.java:2361) at org.eclipse.swt.custom.StyledText.getBoundsAtOffset(StyledText.java:3670) at org.eclipse.swt.custom.StyledText.setCaretLocation(StyledText.java:8555) at org.eclipse.swt.custom.StyledText.setCaretLocation(StyledText.java:8546) at org.eclipse.swt.custom.StyledText.updateSelection(StyledText.java:10405) at org.eclipse.swt.custom.StyledText.handleTextChanged(StyledText.java:6263) at org.eclipse.swt.custom.StyledText$6.textChanged(StyledText.java:5663) at org.eclipse.swt.custom.StyledTextListener.handleEvent(StyledTextListener.java:71) at org.eclipse.swt.custom.DefaultContent.sendTextEvent(DefaultContent.java:797) at org.eclipse.swt.custom.DefaultContent.replaceTextRange(DefaultContent.java:790) at org.eclipse.swt.custom.StyledText.handleCompositionChanged(StyledText.java:5852) at org.eclipse.swt.custom.StyledText$8.handleEvent(StyledText.java:5709) at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:85) at org.eclipse.swt.widgets.Display.sendEvent(Display.java:4373) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1113) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1137) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1122) at org.eclipse.swt.widgets.IME.WM_IME_COMPOSITION(IME.java:510) at org.eclipse.swt.widgets.Canvas.WM_IME_COMPOSITION(Canvas.java:373) at org.eclipse.swt.widgets.Control.windowProc(Control.java:4710) at org.eclipse.swt.widgets.Canvas.windowProc(Canvas.java:344) at org.eclipse.swt.widgets.Display.windowProc(Display.java:5061) at org.eclipse.swt.internal.win32.OS.DispatchMessageW(Native Method) at org.eclipse.swt.internal.win32.OS.DispatchMessage(OS.java:2552) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3777) java.lang.IllegalArgumentException: Index out of bounds [offset value: 16] at org.eclipse.swt.SWT.error(SWT.java:4484) at org.eclipse.swt.graphics.TextLayout._getOffset(TextLayout.java:2102) at org.eclipse.swt.graphics.TextLayout.getPreviousOffset(TextLayout.java:2361) at org.eclipse.swt.custom.StyledText.getBoundsAtOffset(StyledText.java:3670) at org.eclipse.swt.custom.StyledText.setCaretLocation(StyledText.java:8555) at org.eclipse.swt.custom.StyledText.setCaretLocation(StyledText.java:8546) at org.eclipse.swt.custom.StyledText.updateSelection(StyledText.java:10405) at org.eclipse.swt.custom.StyledText.handleTextChanged(StyledText.java:6263) at org.eclipse.swt.custom.StyledText$6.textChanged(StyledText.java:5663) at org.eclipse.swt.custom.StyledTextListener.handleEvent(StyledTextListener.java:71) at org.eclipse.swt.custom.DefaultContent.sendTextEvent(DefaultContent.java:797) at org.eclipse.swt.custom.DefaultContent.replaceTextRange(DefaultContent.java:790) at org.eclipse.swt.custom.StyledText.handleCompositionChanged(StyledText.java:5847) at org.eclipse.swt.custom.StyledText$8.handleEvent(StyledText.java:5709) at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:85) at org.eclipse.swt.widgets.Display.sendEvent(Display.java:4373) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1113) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1137) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1122) at org.eclipse.swt.widgets.IME.WM_IME_COMPOSITION(IME.java:389) at org.eclipse.swt.widgets.Canvas.WM_IME_COMPOSITION(Canvas.java:373) at org.eclipse.swt.widgets.Control.windowProc(Control.java:4710) at org.eclipse.swt.widgets.Canvas.windowProc(Canvas.java:344) at org.eclipse.swt.widgets.Display.windowProc(Display.java:5061) at org.eclipse.swt.internal.win32.OS.DispatchMessageW(Native Method) at org.eclipse.swt.internal.win32.OS.DispatchMessage(OS.java:2552) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3777) java.lang.IllegalArgumentException: Index out of bounds [offset value: 12] at org.eclipse.swt.SWT.error(SWT.java:4484) at org.eclipse.swt.graphics.TextLayout._getOffset(TextLayout.java:2102) at org.eclipse.swt.graphics.TextLayout.getPreviousOffset(TextLayout.java:2361) at org.eclipse.swt.custom.StyledText.getBoundsAtOffset(StyledText.java:3670) at org.eclipse.swt.custom.StyledText.setCaretLocation(StyledText.java:8555) at org.eclipse.swt.custom.StyledText.setCaretLocation(StyledText.java:8546) at org.eclipse.swt.custom.StyledText.updateSelection(StyledText.java:10405) at org.eclipse.swt.custom.StyledText.handleTextChanged(StyledText.java:6263) at org.eclipse.swt.custom.StyledText$6.textChanged(StyledText.java:5663) at org.eclipse.swt.custom.StyledTextListener.handleEvent(StyledTextListener.java:71) at org.eclipse.swt.custom.DefaultContent.sendTextEvent(DefaultContent.java:797) at org.eclipse.swt.custom.DefaultContent.replaceTextRange(DefaultContent.java:790) at org.eclipse.swt.custom.StyledText.handleCompositionChanged(StyledText.java:5847) at org.eclipse.swt.custom.StyledText$8.handleEvent(StyledText.java:5709) at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:85) at org.eclipse.swt.widgets.Display.sendEvent(Display.java:4373) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1113) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1137) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1122) at org.eclipse.swt.widgets.IME.WM_IME_COMPOSITION(IME.java:510) at org.eclipse.swt.widgets.Canvas.WM_IME_COMPOSITION(Canvas.java:373) at org.eclipse.swt.widgets.Control.windowProc(Control.java:4710) at org.eclipse.swt.widgets.Canvas.windowProc(Canvas.java:344) at org.eclipse.swt.widgets.Display.windowProc(Display.java:5061) at org.eclipse.swt.internal.win32.OS.DispatchMessageW(Native Method) at org.eclipse.swt.internal.win32.OS.DispatchMessage(OS.java:2552) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3777) java.lang.IllegalArgumentException: Index out of bounds [offset value: 24] at org.eclipse.swt.SWT.error(SWT.java:4484) at org.eclipse.swt.graphics.TextLayout._getOffset(TextLayout.java:2102) at org.eclipse.swt.graphics.TextLayout.getPreviousOffset(TextLayout.java:2361) at org.eclipse.swt.custom.StyledText.getBoundsAtOffset(StyledText.java:3670) at org.eclipse.swt.custom.StyledText.setCaretLocation(StyledText.java:8555) at org.eclipse.swt.custom.StyledText.setCaretLocation(StyledText.java:8546) at org.eclipse.swt.custom.StyledText.updateSelection(StyledText.java:10405) at org.eclipse.swt.custom.StyledText.handleTextChanged(StyledText.java:6263) at org.eclipse.swt.custom.StyledText$6.textChanged(StyledText.java:5663) at org.eclipse.swt.custom.StyledTextListener.handleEvent(StyledTextListener.java:71) at org.eclipse.swt.custom.DefaultContent.sendTextEvent(DefaultContent.java:797) at org.eclipse.swt.custom.DefaultContent.replaceTextRange(DefaultContent.java:790) at org.eclipse.swt.custom.StyledText.handleCompositionChanged(StyledText.java:5852) at org.eclipse.swt.custom.StyledText$8.handleEvent(StyledText.java:5709) at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:85) at org.eclipse.swt.widgets.Display.sendEvent(Display.java:4373) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1113) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1137) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1122) at org.eclipse.swt.widgets.IME.WM_IME_COMPOSITION(IME.java:510) at org.eclipse.swt.widgets.Canvas.WM_IME_COMPOSITION(Canvas.java:373) at org.eclipse.swt.widgets.Control.windowProc(Control.java:4710) at org.eclipse.swt.widgets.Canvas.windowProc(Canvas.java:344) at org.eclipse.swt.widgets.Display.windowProc(Display.java:5061) at org.eclipse.swt.internal.win32.OS.DispatchMessageW(Native Method) at org.eclipse.swt.internal.win32.OS.DispatchMessage(OS.java:2552) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3777)
(In reply to Thomas Singer from comment #22) > Here are some stacktraces from different users against SWT 4.610: > Thanks for sharing these stacktraces, all of these can be handled at one common point in the code i.e. before call to TextLayout.getPreviousOffset() method in StyledText.getBoundsAtOffset() method. Will share a gerrit on this shortly.
New Gerrit change created: https://git.eclipse.org/r/71904
(In reply to Eclipse Genie from comment #24) > New Gerrit change created: https://git.eclipse.org/r/71904 Hi Arun, Neon RC1 bug, for your review.
Gerrit change https://git.eclipse.org/r/71904 was merged to [master]. Commit: http://git.eclipse.org/c/platform/eclipse.platform.swt.git/commit/?id=53a1a379664b562e9aecebb64a52f95d96029227
Marking as Resolved. Thomas, can you please propagate this latest fix to your customers and verify that the problem is fixed as we're unable to reproduce the real issue at our end? Thanks!
*** Bug 283286 has been marked as a duplicate of this bug. ***