Project

General

Profile

Bug #3373

incremental scroll in non-full Browse page

Added by Ovidiu Maxiniuc over 6 years ago. Updated over 6 years ago.

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

100%

billable:
No
vendor_id:
GCD
case_num:
version:

History

#1 Updated by Ovidiu Maxiniuc over 6 years ago

I found the following stack trace in client log:

java.lang.IllegalStateException: There is no point to use incremental scroll for scrolling forward if the page is not full.
    at com.goldencode.p2j.ui.client.Browse.incrementalScroll(Browse.java:763)
    at com.goldencode.p2j.ui.client.Browse.incrementalScroll(Browse.java:730)
    at com.goldencode.p2j.ui.client.Browse.onKeyPressed(Browse.java:3673)
    at com.goldencode.p2j.ui.client.gui.BrowseGuiImpl.onKeyPressed(BrowseGuiImpl.java:3524)
    at com.goldencode.p2j.ui.client.Browse.processEvent(Browse.java:3863)
    at com.goldencode.p2j.ui.client.gui.BrowseGuiImpl.processEvent(BrowseGuiImpl.java:3561)
    at com.goldencode.p2j.ui.client.widget.TitledWindow.processEvent(TitledWindow.java:249)
    at com.goldencode.p2j.ui.client.gui.WindowGuiImpl.processEvent(WindowGuiImpl.java:1365)
    at com.goldencode.p2j.ui.chui.ThinClient.processEventsWorker(ThinClient.java:16667)
    at com.goldencode.p2j.ui.chui.ThinClient.pop(ThinClient.java:15453)
    at com.goldencode.p2j.ui.chui.ThinClient.eventBracket(ThinClient.java:15436)
    at com.goldencode.p2j.ui.chui.ThinClient.eventDrawingBracket(ThinClient.java:15360)
    at com.goldencode.p2j.ui.chui.ThinClient.applyWorker(ThinClient.java:15121)
    at com.goldencode.p2j.ui.chui.ThinClient.apply(ThinClient.java:3648)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:498)
    at com.goldencode.p2j.util.MethodInvoker.invoke(MethodInvoker.java:124)
    at com.goldencode.p2j.net.Dispatcher.processInbound(Dispatcher.java:757)
    at com.goldencode.p2j.net.Conversation.block(Conversation.java:412)
    at com.goldencode.p2j.net.Conversation.waitMessage(Conversation.java:348)
    at com.goldencode.p2j.net.Queue.transactImpl(Queue.java:1170)
    at com.goldencode.p2j.net.Queue.transact(Queue.java:641)
    at com.goldencode.p2j.net.BaseSession.transact(BaseSession.java:271)
    at com.goldencode.p2j.net.HighLevelObject.transact(HighLevelObject.java:211)
    at com.goldencode.p2j.net.RemoteObject$RemoteAccess.invokeCore(RemoteObject.java:1473)
    at com.goldencode.p2j.net.InvocationStub.invoke(InvocationStub.java:145)
    at com.sun.proxy.$Proxy2.trigger(Unknown Source)
    at com.goldencode.p2j.ui.chui.ThinClient.trigger(ThinClient.java:12846)
    at com.goldencode.p2j.ui.chui.ThinClient.invokeTriggers(ThinClient.java:18334)
    at com.goldencode.p2j.ui.chui.ThinClient.invokeTriggers(ThinClient.java:18065)
    at com.goldencode.p2j.ui.chui.ThinClient.processProgressEvent(ThinClient.java:17177)
    at com.goldencode.p2j.ui.chui.ThinClient.processEventsWorker(ThinClient.java:16454)
    at com.goldencode.p2j.ui.chui.ThinClient.pop(ThinClient.java:15453)
    at com.goldencode.p2j.ui.chui.ThinClient.eventBracket(ThinClient.java:15436)
    at com.goldencode.p2j.ui.chui.ThinClient.eventDrawingBracket(ThinClient.java:15360)
    at com.goldencode.p2j.ui.chui.ThinClient.applyWorker(ThinClient.java:15121)
    at com.goldencode.p2j.ui.chui.ThinClient.waitForWorker(ThinClient.java:12193)
    at com.goldencode.p2j.ui.chui.ThinClient.waitForWorker(ThinClient.java:11677)
    at com.goldencode.p2j.ui.chui.ThinClient.waitFor(ThinClient.java:11620)
    at com.goldencode.p2j.ui.chui.ThinClient.waitFor(ThinClient.java:11574)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:498)
    at com.goldencode.p2j.util.MethodInvoker.invoke(MethodInvoker.java:124)
    at com.goldencode.p2j.net.Dispatcher.processInbound(Dispatcher.java:757)
    at com.goldencode.p2j.net.Conversation.block(Conversation.java:412)
    at com.goldencode.p2j.net.Conversation.waitMessage(Conversation.java:348)
    at com.goldencode.p2j.net.Queue.transactImpl(Queue.java:1170)
    at com.goldencode.p2j.net.Queue.transact(Queue.java:641)
    at com.goldencode.p2j.net.BaseSession.transact(BaseSession.java:271)
    at com.goldencode.p2j.net.HighLevelObject.transact(HighLevelObject.java:211)
    at com.goldencode.p2j.net.RemoteObject$RemoteAccess.invokeCore(RemoteObject.java:1473)
    at com.goldencode.p2j.net.InvocationStub.invoke(InvocationStub.java:145)
    at com.sun.proxy.$Proxy4.standardEntry(Unknown Source)
    at com.goldencode.p2j.main.ClientCore.start(ClientCore.java:361)
    at com.goldencode.p2j.main.ClientCore.start(ClientCore.java:158)
    at com.goldencode.p2j.main.ClientDriver.start(ClientDriver.java:250)
    at com.goldencode.p2j.main.CommonDriver.process(CommonDriver.java:444)
    at com.goldencode.p2j.main.ClientDriver.process(ClientDriver.java:144)
    at com.goldencode.p2j.main.ClientDriver.main(ClientDriver.java:313)

This is a non-fatal event. There are no clues in the UI that something wrong happened, the client apparently continues to process messages from server. I am not able to pinpoint the exact cause and create a list of steps how to duplicate this.

#2 Updated by Ovidiu Maxiniuc over 6 years ago

The call to incrementalScroll is caused by an

APPLY "END":U TO BROWSE my-browse.

with my-browse having a 0 DOWN and populated with only one row.

Throwing the exception is not fatal because the Exception is caught in processEventsWorker and just printed to System.err

I think throwing the exception in Browse:763 is not correct. The message should probably be logged as Warning instead.

#3 Updated by Stanislav Lomany over 6 years ago

That is the event which represents a programming error. The text can be changed to "Incremental scroll cannot be used for scrolling forward if the page is not full." However browse can continue its work without abending. The error probably should be raised using recordOrShowError.

#4 Updated by Stanislav Lomany over 6 years ago

Let me know if I should fix it (before/after deadline?).

#5 Updated by Greg Shah over 6 years ago

Is there an error in the 4GL?

#6 Updated by Stanislav Lomany over 6 years ago

No, it's internal P2J error.

#7 Updated by Greg Shah over 6 years ago

No, it's internal P2J error.

recordOrShowError() is only for "real" 4GL errors.

Is this a P2J bug?

#8 Updated by Stanislav Lomany over 6 years ago

Yes.

#9 Updated by Greg Shah over 6 years ago

How much work is it to fix?

#10 Updated by Stanislav Lomany over 6 years ago

I'm not sure.
Ovidiu, how did you managed to create a 0 DOWN browse? (normally you can't create a browse with less than 2 DOWN)
Is there a testcase?

#11 Updated by Ovidiu Maxiniuc over 6 years ago

Stanislav Lomany wrote:

I'm not sure.
Ovidiu, how did you managed to create a 0 DOWN browse? (normally you can't create a browse with less than 2 DOWN)
Is there a testcase?

I am sending the instructions by mail because of sensitive information.

#12 Updated by Stanislav Lomany over 6 years ago

The issue occurs because the browse is not yet initialized at the point when "END" event is applied. So we must figure out the point where it is initialized in the original app.

How much work is it to fix?

I guess around a full day.

#13 Updated by Ovidiu Maxiniuc over 6 years ago

  • Status changed from New to WIP
  • Assignee set to Stanislav Lomany

Stanislav,

I understand you are working on this issue so I am assigning it to you.

#14 Updated by Stanislav Lomany over 6 years ago

Greg, I'll fix it, but considering the amount of work for #3261 I'm not sure if I should fix it before or after Nov 30.

#15 Updated by Greg Shah over 6 years ago

Ovidiu: Does this affect a user or is it just a report in the log?

#16 Updated by Ovidiu Maxiniuc over 6 years ago

I noticed that in the log, but throwing exceptions in this manner is dangerous. This time the incrementalScroll() was called from a event loop that caught it and logged it. If called from another place the client will crash. I thing we should log the event instead (UnimplementedFeature.TODO) as a reminder and return false because no rows were obtained from the server.

#17 Updated by Greg Shah over 6 years ago

Agreed.

Stanislav: Please put that change in 3369a. Then you can fix this issue later.

#19 Updated by Stanislav Lomany over 6 years ago

I thing we should log the event instead (UnimplementedFeature.TODO) as a reminder and return false because no rows were obtained from the server.

It's a client-side error. Should I log it at server side (BTW how can I do that?) ?

#20 Updated by Greg Shah over 6 years ago

It is OK to call UnimplementedFeature on the client. It will be logged there and that is OK.

Since 3369a is merged to trunk, at this point I hope you can just fix this issue properly.

#21 Updated by Stanislav Lomany over 6 years ago

  • Status changed from WIP to Review

#22 Updated by Greg Shah over 6 years ago

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

Fixed in branch 3394a revision 11298 which will be merged to trunk shortly.

#23 Updated by Greg Shah over 6 years ago

The changes are included in task branch 3394a which has been merged to trunk as revision 11214.

Also available in: Atom PDF