Project

General

Profile

Bug #10807

COMBO-BOX DELETE-CHARACTER Crash in GUI Mode

Added by Vladimir Tsichevski 9 months ago. Updated 9 months ago.

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:
reviewer:
production:
No
env_name:
topics:

Related issues

Related to User Interface - Bug #10801: COMBO-BOX issues New
Related to User Interface - Bug #10808: COMBO-BOX entry GUI mode: Issues when containing only spaces New

History

#1 Updated by Vladimir Tsichevski 9 months ago

#2 Updated by Vladimir Tsichevski 9 months ago

Scenario

  1. Run the example from #10736-1 in GUI mode.
  2. Insert spaces into the COMBO-BOX entry, optionally move the caret to any position except zero.
  3. 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

Also available in: Atom PDF