Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Remote Application Platform (RAP) » Client Error : Cannot read properties of undefined(A client error occuring randomly on Combo creation)
Client Error : Cannot read properties of undefined [message #1862501] Thu, 07 December 2023 15:28 Go to next message
Julien Guigne is currently offline Julien GuigneFriend
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')


index.php/fa/43784/0/

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:59
Hi 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. Confused

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 #1862510 is a reply to message #1862501] Fri, 08 December 2023 07:53 Go to previous messageGo to next message
Ivan Furnadjiev is currently offline Ivan FurnadjievFriend
Messages: 2426
Registered: July 2009
Location: Sofia, Bulgaria
Senior Member
Hi,

does it happen in all browsers - Chrome, Firefox, Edge Chrome? Maybe a new version of the browser introduced some problems. Do you have some custom JavaScript code?
Unfortunately, without a way to reproduce the issue I can't help much.

Best regards,
Ivan
Re: Client Error : Cannot read properties of undefined [message #1862512 is a reply to message #1862510] Fri, 08 December 2023 09:57 Go to previous messageGo to next message
Mathieu Perroud is currently offline Mathieu PerroudFriend
Messages: 2
Registered: December 2023
Junior Member
Hi,
as this is a race condition, highlighted by a slow server or network, it is near impossible to provide a workflow.
We get the problem ramdomly : opening a window leads us to a client crash : js code try to access a widget not defined yet.

We encountered the issue with Firefox and Chrome, on Windows and Ubuntu.

In addition, we are asking why the issue happens only with Combo ?
(We have dozens of case with several customer installations, only combo).
Sorry for the naive comment, but isn't there a protection missing in the code ?
Re: Client Error : Cannot read properties of undefined [message #1862522 is a reply to message #1862512] Fri, 08 December 2023 15:53 Go to previous message
Mathieu Perroud is currently offline Mathieu PerroudFriend
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 );
  };
Previous Topic:Strange behaviour for ComboBox and TabFolder
Next Topic:Fun bug
Goto Forum:
  


Current Time: Fri Jun 14 05:01:04 GMT 2024

Powered by FUDForum. Page generated in 0.04977 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top