Bug #10807
COMBO-BOX DELETE-CHARACTER Crash in GUI Mode
Status:
New
Priority:
Normal
Assignee:
-
Target version:
-
Start date:
Due date:
% Done:
0%
billable:
No
vendor_id:
GCD
case_num:
version_reported:
16250
version_resolved:
Related issues
History
#1 Updated by Vladimir Tsichevski 9 months ago
- Related to Bug #10801: COMBO-BOX issues added
#2 Updated by Vladimir Tsichevski 9 months ago
Scenario
- Run the example from #10736-1 in GUI mode.
- Insert spaces into the COMBO-BOX entry, optionally move the caret to any position except zero.
- Press
DELETE-CHARACTER.
The client crashes or restarts.
Root Cause
The issue occurs in FillInGuiImpl.java, near line 1925:
final int offset = getCursorOffset();
...
if (key == Keyboard.KA_DELETE_CHARACTER)
{
String txt = getText(true);
txt = txt.substring(0, offset);
When the entry is empty, getText(true) returns an empty string (length 0), but getCursorOffset() returns a positive value. This causes a StringIndexOutOfBoundsException during substring extraction.
#3 Updated by Vladimir Tsichevski 9 months ago
- Related to Bug #10808: COMBO-BOX entry GUI mode: Issues when containing only spaces added