Project

General

Profile

Bug #11498

NPE during browse ADD-LIKE-COLUMN()

Added by Razvan-Nicolae Chichirau about 2 months ago. Updated 18 days ago.

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

100%

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

History

#1 Updated by Razvan-Nicolae Chichirau about 2 months ago

Testcase:

def temp-table tt field id as int field id2 as int.
def query q for tt scrolling.
def var hBrowse as handle.
create browse hBrowse assign query = query q:handle down = 5.

hBrowse:add-like-column("tt.id2").

Stack trace:

Caused by: java.lang.NullPointerException: Cannot invoke "com.goldencode.p2j.ui.GenericFrame.getFrameId()" because "frame" is null
    at com.goldencode.p2j.ui.GenericWidget.setFrame(GenericWidget.java:703)
    at com.goldencode.p2j.ui.BrowseWidget.addColumnWidget(BrowseWidget.java:9081)
    at com.goldencode.p2j.ui.BrowseWidget.addLikeColumn(BrowseWidget.java:3798)
    at com.goldencode.p2j.ui.BrowseWidget.addLikeColumn(BrowseWidget.java:3625)
    at com.goldencode.p2j.ui.BrowseWidget.addLikeColumn(BrowseWidget.java:3598)
    at com.goldencode.p2j.ui.BrowseWidget.addLikeColumn(BrowseWidget.java:3892)
    at com.goldencode.p2j.ui.BrowseWidget.addLikeColumn(BrowseWidget.java:3909)
    at com.goldencode.dataset.Start.lambda$execute$0(Start.java:38)

Spotted while running the browse suite from the testcases project where 114 .cls test files fail to run because of this issue.

#2 Updated by Razvan-Nicolae Chichirau about 2 months ago

  • Status changed from WIP to Review
  • % Done changed from 0 to 100
  • reviewer Stanislav Lomany added

Stanislav: Please review 11498a/rev. 16592. The changes are meant to protect mostly the browse (but also the other widgets) from NullPointerException when executing methods without a frame attached which can be possible with dynamic widgets.

For the TAB-POSITION, PREV-TAB-ITEM and NEXT-TAB-ITEM changes, please check this testcase:

The same result is for the PREV-TAB-ITEM and NEXT-TAB-ITEM.

Also, please note there is a regression in trunk regarding INSERT-ROW():

def temp-table tt field id as int.
def query q for tt scrolling.
def browse br query q display id enable id with 5 down.

def var i as int.
do i = 1 to 10:
    create tt.
    tt.id = i.
end.

def frame f br.
open query q for each tt.
enable all with frame f.

br:select-row(1).
br:insert-row("after").

wait-for window-close of current-window.

, which is executing the following in Browse.insertRow(boolean):
tc.invokeAfterTrigger(() ->
{
   if (insertingRow)
   {
      insertRowSecondPart();
   }
});

, but there is no active trigger being executed, so FWD throws IllegalStateException.

#3 Updated by Stanislav Lomany about 2 months ago

11498a/rev. 16592

The changes are good.

so FWD throws IllegalStateException.

I committed the fix for it as 11498a rev. 16593. Please do a quick review and switch the Status field.

#4 Updated by Razvan-Nicolae Chichirau about 2 months ago

  • Status changed from Review to Internal Test

Changes in rev. 16593 are OK.

#5 Updated by Razvan-Nicolae Chichirau 25 days ago

Testing that passed:
  • ChUI regression tests
  • Hotel GUI + 2 customer app general smoke-testing
  • Unit-tests from a customer app
  • Whole UI suite from testcases. Some statistics for 797 class files:
    Tests started Tests successful Tests failed
    Trunk / rev. 16608 3585 2234 1351
    11498a 4061 2590 1471

A large number of .cls files were previously skipped entirely because the setup phase encountered a NullPointerException. With 11498a, some of these exceptions were fixed, allowing the corresponding unit tests to execute successfully.

If this is enough, 11498a should be merged.

#6 Updated by Razvan-Nicolae Chichirau 18 days ago

Are there any concerns left regarding the testing phase?

#7 Updated by Radu Apetrii 18 days ago

  • Status changed from Internal Test to Merge Pending

From my point of view, no issues. 11498a can be merged now.

#8 Updated by Razvan-Nicolae Chichirau 18 days ago

  • Status changed from Merge Pending to Test

Branch 11498a was merged into trunk as rev. 16635 and archived.

Also available in: Atom PDF