Client Error : Cannot read properties of undefined [message #1862501] |
Thu, 07 December 2023 15:28 |
Julien Guigne Messages: 2 Registered: December 2023 |
Junior Member |
|
|
Hello everyone,
We are asking for your help because we are facing a bug whose origin and cause we have no control over.
This is a client-side crash that appears to be related to Combo instantiation.
The oldest occurrences of this problem, on our side, date back to June 2022 (RAP 3.20), and from time to time until today (RAP 3.25).
The application crashes on the browser side, with an error message which is always similar although never exactly the same:
Error: Error: Operation "create" on target "w6866" of type "rwt.widgets.Combo" failed:
Cannot read properties of undefined (reading 'setVisibleItemCount')
Error: Error: Operation "create" on target "w11740" of type "rwt.widgets.Combo" failed:
Cannot read properties of undefined (reading 'setItems')
Note this issue has already been pointed in this topic (2013):
https://www.eclipse.org/forums/index.php/t/587145/
Christian Brugger wrote on Tue, 12 November 2013 09:59Hi again,
I have another assumption, what maybe causes this error.
The system, where the problem occurred several times, is not very powerful, so maybe the performance of the RAP server is quite bad. Also the network connection may be slow from time to time.
Does anyone have some expierience with such kind of "Client errors" occurring on slow systems or with increased network latency?
... When I try to reproduce this error in my development environment (with RAP server on localhost) everything seems to work fine.
Christian
And also this one (2020): https://www.eclipse.org/forums/index.php/m/1830412/
The big difficulty with this problem is that it is not reproducible. It may appear systematically in a client for a few days, then disappear.
Do you have any idea what can cause this error?
Any workaround ?
Regards.
|
|
|
|
|
Re: Client Error : Cannot read properties of undefined [message #1862522 is a reply to message #1862512] |
Fri, 08 December 2023 15:53 |
Mathieu Perroud Messages: 2 Registered: December 2023 |
Junior Member |
|
|
Hi again,
we are starting to make progress !
I managed to reproduce the crash with a potentially wobbly UI (I'll search next after what makes my UI not compliant to the RAP framework).
I used the developper mode (-Dorg.eclipse.rap.rwt.developmentMode=true) to get a readable rap-client.js
With a "pause on caught exceptions" breakpoint, I stopped into the following code.
The crash occurs on last line : parentFocusRoot is null.
I hope it's usefull !
rwt.widgets.DropDown = function( args ) {
this._ = {};
this._.hScroll = !!args.hScroll;
this._.hideTimer = new rwt.client.Timer( 0 );
this._.hideTimer.addEventListener( "interval", checkFocus, this );
this._.parent = args.parent;
this._.appearance = args.appearance;
this._.customVariant = null;
this._.styleMap = null;
this._.popup = createPopup( args.appearance ); // TODO: create on demand
this._.grid = createGrid( this._.popup, !!args.markupEnabled, args.appearance );
inheritParentStyling.call( this );
this._.visibleItemCount = 5;
this._.items = [];
this._.columns = null;
this._.inMouseSelection = false;
this._.visibility = false;
this._.minWidth = 0;
this._.selectionWrapping = true;
this._.events = createEventsMap();
addParentListeners.call( this );
addGridListeners.call( this );
this._.popup.addEventListener( "appear", onAppear, this );
this._.parentFocusRoot = args.parent.getFocusRoot();
this._.parentFocusRoot.addEventListener( "changeFocusedChild", onFocusChange, this );
};
|
|
|
Powered by
FUDForum. Page generated in 0.03565 seconds