Project

General

Profile

Bug #4942

Embbeded web client doesn't work for Hotel GUI

Added by Adrian Lungu over 3 years ago. Updated over 3 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Target version:
-
Start date:
Due date:
% Done:

100%

billable:
No
vendor_id:
GCD
case_num:

History

#1 Updated by Adrian Lungu over 3 years ago

I checked some older revisions of 3821c in order to find which one triggered the bug. I should note that the latest 3821c revision (11670) is not yet fixing the bug. There a two relevant revisions:

  1. From rev. 11588, the legacy frames are not responding. Although the widgets are visible, any keyboard or mouse actions (with some exceptions like scroll bar usage) are not handled.
  2. From rev. 11619, the legacy frames are not displayed at all.

Both revisions are referring to the same optimization: packing multiple booleans into one single integer, in order to optimize externalization. I don't understand yet why this should be a problem for the embedded web client. Investigating.

#2 Updated by Adrian Lungu over 3 years ago

I added the fix from rev. 11619 straight to the 11588 revision and tested. It seems like the embedded web client starts working. This means that there is another relevant revision which caused the embedded web client not to work (somewhere between 11588 and 11619). I will continue searching for the responsible revision.

#3 Updated by Adrian Lungu over 3 years ago

I could restrict the searching scope somewhere around 11600..11608 revisions. The most of the intermediary revisions don't work with the embedded web client (NPE, errors or stuck on loading). Revision 11601 is the last revision working correctly and 11608 is the first revision which works afterworks (however incorrectly). Most of the revisions in between are related to the batching of widget configurations.

Curiously, having enabled or disabled the batching parameter will result in the same behavior. This means that there is another factor that may have caused this bug or the fact that disabling the batching is not sound. Investigating further.

#4 Updated by Adrian Lungu over 3 years ago

The root of the bug is related to FWD's specific disable-redraw. Commenting out the disable-row statements from fwd-embedded-driver.p (4 statements grouped in two blocks) will allow the embedded web client to work properly. This may be related to the changes on GenericWidget.setAttr. Debugging disable-redraw statement.

The first disable-redraw block is rather consistent. The second one is shorter and I think is incorrect:

hwin:disable-redraw = true.

tbhandle = get-toolbar-frame(phandle, hwin, hframe).

/* do this before anything else */
create fwd-embedded-window.
fwd-embedded-window.pname = pfile.
fwd-embedded-window.phandle = phandle.
fwd-embedded-window.menubar = hwin:menubar.
fwd-embedded-window.toolbar = tbhandle.
fwd-embedded-window.isAdm2 = (admVersion >= "ADM2.2").
fwd-embedded-window.pages = false.

run initEmbeddedWindow(hwin).
hwin:disable-redraw = true. // the redraw should have been enabled

The correction on the second block is not enough.

#5 Updated by Greg Shah over 3 years ago

Hynek/Constantin: Please review.

#6 Updated by Adrian Lungu over 3 years ago

The bug was fixed in 3821c. rev. 11675. GenericWidget.pushWidgetAttr is overridden in several other widgets (children classes), but the aborting condition in GenericWidget.setAttr is unique: deleted || frame == null || frame.isInsideSetup(). However, WindowWidget.pushWidgetAttr for example is aborted by a shorter condition: deleted. The committed revision makes sure that the condition used is dependent upon the current widget.

Currently, the embedded web client is working with 3821c. rev. 11675 and hotel_gui rev. 222.

#7 Updated by Adrian Lungu over 3 years ago

  • Status changed from WIP to Review
  • % Done changed from 0 to 100

#8 Updated by Adrian Lungu over 3 years ago

Please review only #4942-6 (3821c/11675), as the previous comments are just part of the bug hunting process.

#9 Updated by Greg Shah over 3 years ago

  • Status changed from Review to Closed

Nice!

#10 Updated by Constantin Asofiei over 3 years ago

Adrian Lungu wrote:

The bug was fixed in 3821c. rev. 11675. GenericWidget.pushWidgetAttr is overridden in several other widgets (children classes), but the aborting condition in GenericWidget.setAttr is unique: deleted || frame == null || frame.isInsideSetup(). However, WindowWidget.pushWidgetAttr for example is aborted by a shorter condition: deleted. The committed revision makes sure that the condition used is dependent upon the current widget.

Currently, the embedded web client is working with 3821c. rev. 11675 and hotel_gui rev. 222.

I'm OK with the changes.

Also available in: Atom PDF