Home » Eclipse Projects » Remote Application Platform (RAP) » Client Error "a is undefined" on asynchronous UI update
Client Error "a is undefined" on asynchronous UI update [message #1176406] |
Fri, 08 November 2013 10:08 |
Christian Brugger Messages: 10 Registered: November 2013 |
Junior Member |
|
|
Hi all,
we faced a problem regarding asynchronous ui update calls using display.asyncExec in RAP 2.1.0
Here's a little Snippet, I hope this can demonstrate the problem:
...
public MyComposite() {
super(...);
this.label = new Label(...);
}
public void handleEvent() {
getDisplay().asyncExec(new Runnable() {
@Override
public void run() {
updateUi();
}
});
}
private void updateUi() {
this.label.setImage(this.image);
}
...
handleEvent is called from another thread, so it may be called almost concurrently to the creation of the Label.
When this happens a "Client Error" appears, because obviously the widget is still undefined in the JavaScript context, although the corresponding Java Object already exists.
Client Error
Details:
Error: Error: Operation "set" on target "w1750" of type "null" failed:
a is undefined
Properties:
image = rwt-resources/generated/47476ff0.png,15,15
Script: {"head":{"requestCounter":79},"operations":[["set","w1750",{"image":["rwt-resources/generated/47476ff0.png",15,15]}], ....
May this be a Bug in the RAP framework or is there any known solution to this?
Thank you!
Christian
|
|
|
Re: Client Error "a is undefined" on asynchronous UI update [message #1176706 is a reply to message #1176406] |
Fri, 08 November 2013 13:55 |
Ivan Furnadjiev Messages: 2429 Registered: July 2009 Location: Sofia, Bulgaria |
Senior Member |
|
|
Hi Christian,
usually such kind of JavaScript errors are bugs in the framework. Please
open a bugzilla and attach a complete self-running snippet to
demonstrate the issue.
Thanks,
Ivan
On 11/8/2013 3:46 PM, Christian Brugger wrote:
> Hi all,
>
> we faced a problem regarding asynchronous ui update calls using
> display.asyncExec in RAP 2.1.0
>
> Here's a little Snippet, I hope this can demonstrate the problem:
>
>
> ..
>
> public MyComposite() {
> super(...);
>
> this.label = new Label(...); }
>
> public void handleEvent() {
> getDisplay().asyncExec(new Runnable() {
> @Override
> public void run() {
> updateUi();
> }
> });
> }
>
> private void updateUi() {
> this.label.setImage(this.image);
> }
>
> ..
>
>
> handleEvent is called from another thread, so it may be called almost
> concurrently to the creation of the Label.
>
> When this happens a "Client Error" appears, because obviously the
> widget is still undefined in the JavaScript context, although the
> corresponding Java Object already exists.
>
>
> Client Error
> Details:
>
> Error: Error: Operation "set" on target "w1750" of type "null" failed:
> a is undefined
> Properties:
> image = rwt-resources/generated/47476ff0.png,15,15
>
>
> Script:
> {"head":{"requestCounter":79},"operations":[["set","w1750",{"image":["rwt-resources/generated/47476ff0.png",15,15]}],
> ....
>
>
> May this be a Bug in the RAP framework or is there any known solution
> to this?
>
> Thank you!
> Christian
--
Ivan Furnadjiev
Twitter: @EclipseRAP
Blog: http://eclipsesource.com/blogs/
Professional services for RAP and RCP?
http://eclipsesource.com/services/rap/
|
|
| | |
Re: Client Error "a is undefined" on asynchronous UI update [message #1182654 is a reply to message #1182627] |
Tue, 12 November 2013 10:18 |
Ivan Furnadjiev Messages: 2429 Registered: July 2009 Location: Sofia, Bulgaria |
Senior Member |
|
|
Hi Christian,
is this error reproducible with all browsers - IE08-IE11, Firefox,
Chrome, Opera 17?
Best,
Ivan
On 11/12/2013 11:59 AM, Christian Brugger wrote:
> 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. :?
> Christian
--
Ivan Furnadjiev
Twitter: @EclipseRAP
Blog: http://eclipsesource.com/blogs/
Professional services for RAP and RCP?
http://eclipsesource.com/services/rap/
|
|
| | |
Goto Forum:
Current Time: Wed Jan 15 11:48:37 GMT 2025
Powered by FUDForum. Page generated in 0.09431 seconds
|