Home » Eclipse Projects » Remote Application Platform (RAP) » RAP 2.3.0 RC2 Client error Cannot read property 'getFocusedChild' of null
| | | | | | |
Re: RAP 2.3.0 RC2 Client error Cannot read property 'getFocusedChild' of null [message #1385280 is a reply to message #1385260] |
Thu, 05 June 2014 10:57 |
Arnaud MERGEY Messages: 243 Registered: March 2010 Location: France |
Senior Member |
|
|
I have an editor displaying a tree, double click on this tree open another editor containing several widgets, depending of the tree element clicked.
If a tree element has already been opened, the same editor instance is reused but content is recreated, meaning previous widgets are disposed and created again.
The crash occurs when I open an editor for a given tree elements, with combo inside this editor, then switch back to the tree editor, then reopen the same element, so the combo widget is disposed and created again, the crash occurs when the editor containing the combo takes focus.
Debuging the javascript, the error occurs in 72443 of rap-client.js :
var hasFocus = function( control ) {
var root = control.getFocusRoot();
var result = control.getFocused()
|| ( control.contains && control.contains( root.getFocusedChild() ) );
return result;
};
I suspect it allows the rwt.widget.DropDown to hide itself when parent widget has lost focus (in my case Combo).
What I can see with a javascript debugger, is if I have an editor with a combo displayed this hasFocus metchod is called every time I switch from an editor to another (through "interval" event in stacktrace) even editors without Combo, and it seems to be called only when I switch editor. The crash occurs when this event is called on the disposed combo when I reopen the editor that dispose the combo.
It occurs on chrome and firefox last version for both, I have not tested on IE
Hope I am quite clear
[Updated on: Thu, 05 June 2014 11:00] Report message to a moderator
|
|
| |
Re: RAP 2.3.0 RC2 Client error Cannot read property 'getFocusedChild' of null [message #1385301 is a reply to message #1385282] |
Thu, 05 June 2014 13:34 |
Arnaud MERGEY Messages: 243 Registered: March 2010 Location: France |
Senior Member |
|
|
In my scenario I isolate a simpler way to reproduce the crash I just need to open my editor with a Combo. Then when I close it so the Combo is disposed, the next thing I do on the UI crash it with same error
As I cannot reproduce it with simple code, I guess I am doing something wrong in my code, but I am lost as it occurs only if I have a combo widget, as I am doing the same thing whatewer widget I have in the editor
Here the last JSON response sent by the server before an error (after closing the editor with Combo inside)
{"head":{"requestCounter":8},"operations":[["destroy","w162"],["destroy","w161"],["set","w2",{"activeControl":"w2"}],["set","w25",{"children":["w40","w26","w27"]}],["set","w40",{"visibility":true}],["set","w80",{"tabIndex":26}],["set","w50",{"tabIndex":327}],["set","w60",{"tabIndex":328}],["set","w95",{"tabIndex":333}],["set","w96",{"tabIndex":334}],["set","w97",{"tabIndex":335}],["set","w98",{"tabIndex":336}],["set","w99",{"tabIndex":337}],["set","w100",{"tabIndex":338}],["set","w101",{"tabIndex":339}],["set","w109",{"tabIndex":343}],["set","w111",{"tabIndex":643}],["set","w113",{"tabIndex":943}],["set","w115",{"tabIndex":1243}],["set","w119",{"tabIndex":1245}],["set","w125",{"tabIndex":1246}],["set","w27",{"selection":"w39"}],["set","w28",{"bounds":[89,1,1752,27],"clientArea":[0,0,1752,27]}],["set","w1",{"focusControl":"w2"}]]}
[Updated on: Thu, 05 June 2014 13:34] Report message to a moderator
|
|
| |
Re: RAP 2.3.0 RC2 Client error Cannot read property 'getFocusedChild' of null [message #1385326 is a reply to message #1385308] |
Thu, 05 June 2014 16:03 |
Arnaud MERGEY Messages: 243 Registered: March 2010 Location: France |
Senior Member |
|
|
The main issue I think in my case is rwt.widgets.Combo destruct function is not called on javascript client, even on java server side, dispose is called on corresponding org.eclipse.swt.Combo.
And by the way I have same issue (destruct not called) on all of my widgets, but only Combo leads to a crash because of the focus management it is why I wrongly suspected Combo to be responsible of this
Do you have an idea on how it would be possible to have disposed control on server side not destroyed on client side ? What could prevent destruct to be called for disposed server control ?
[Updated on: Thu, 05 June 2014 16:44] Report message to a moderator
|
|
| | |
Goto Forum:
Current Time: Tue Sep 24 17:44:26 GMT 2024
Powered by FUDForum. Page generated in 0.04773 seconds
|