Project

General

Profile

Bug #11592

In-browse toggle-box MODIFIED flag is not set on mouse click

Added by Stanislav Lomany 19 days ago. Updated 13 days ago.

Status:
Internal Test
Priority:
High
Target version:
-
Start date:
Due date:
% Done:

0%

billable:
No
vendor_id:
GCD
case_num:
version_reported:
version_resolved:
reviewer:
production:
No
env_name:
topics:

History

#2 Updated by Stanislav Lomany 19 days ago

The issue is described in #11545-13.

Created task branch 11592a from FWD trunk revision 16634.

#3 Updated by Stanislav Lomany 18 days ago

  • Status changed from WIP to Review

Hynek, please review 11592a rev 16635.

#4 Updated by Hynek Cihlar 15 days ago

Code review 11592a revisions 16634..16635

I didn't test, but worth to check:

  • [MAJOR] functional BrowseGuiImpl.rowClickSecondPart: The deferred toggle block can dereference a null editor. When currColumn toggleColumn, switchToggle stays true and getActiveToggleBox() (which is return (ToggleBox) activeEditor) is called with no isEditorActive()/null guard, so toggle.getValue() throws an NPE if the editor was torn down. Concrete trigger: user first-clicks a toggle-box cell in a not-currently-edited row; startEdit() returns true (editor active), the else if (toggleClicked) branch records toggleColumn = currColumn, then the guard at line 5770 fires invokeRowEntryTrigger(oldFocusId) — a synchronous ROW-ENTRY dispatch via ThinClient.invokeTriggers. If the application ROW-ENTRY trigger ends browse editing without changing the column (e.g. APPLY "ENTRY" TO a widget outside the browse), finishStopEdit() sets activeEditor = null but leaves currColumn unchanged. Control then reaches the deferred block with currColumn toggleColumn, the inner if is skipped, and getActiveToggleBox() returns null → NPE. Because the NPE is not a BrowseException, the method's catch does not swallow it and the click handler crashes. This window is new: the pre-change code flipped the toggle in the else if branch before the triggers ran, when activeEditor was freshly non-null. Note the asymmetry — the currColumn != toggleColumn path re-guards via switchToggle = startEdit(), and every other getActiveToggleBox() call site in Browse/BrowseGuiImpl is guarded by isEditorToggleBox()/isEditorActive(), but the equal-column path here is not. Fix: gate the equal-column flip on isEditorActive() (or null-check getActiveToggleBox()) as well. [verdict: CONFIRMED]

#5 Updated by Stanislav Lomany 14 days ago

Hynek, I've added a guard condition in 11592a rev 16636, please review.

#6 Updated by Hynek Cihlar 13 days ago

Stanislav Lomany wrote:

Hynek, I've added a guard condition in 11592a rev 16636, please review.

Code review. It looks good.

#7 Updated by Alexandru Lungu 13 days ago

  • Status changed from Review to Internal Test

Also available in: Atom PDF