Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 422242

Summary: [Browser] Evaluate error
Product: [RT] RAP Reporter: Cho HyunJong <hangum>
Component: RWTAssignee: Project Inbox <rap-inbox>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: P2    
Version: 2.2   
Target Milestone: 2.2 RC1   
Hardware: PC   
OS: Mac OS X   
Whiteboard:
Attachments:
Description Flags
See View.java none

Description Cho HyunJong CLA 2013-11-21 07:20:59 EST
Created attachment 237613 [details]
See View.java

Browwer.evaluate method has a problem in V2.2.x.

java -> javascript -> java -> javascript is invoked with an error.
in previous version have normal use.

In the attached file View.java 'Call execute' button is pressed i get an error.
2.1.x is normal execution.

Thanks you.
Comment 1 Ivan Furnadjiev CLA 2013-11-21 13:30:47 EST
Checked with RAP 2.1.1 and it's working. Change the priority to P2 as this is a regression.
Comment 2 Ivan Furnadjiev CLA 2013-11-21 14:49:06 EST
The problem is caused by commit b0174a6ca3e3062501d23ec40343c7a6796564ed - problem is solved by reverting it. Browser function does not send synchronous requests anymore.
Comment 3 Ivan Furnadjiev CLA 2013-11-22 04:17:48 EST
The line that cause the issue is:
---
this.processHead( messageObject.head );
--
in MessageProcessor.js#processMessage.
Before, the protocol message "head" was processed first and then operations. Thus, if request need to be send when message is processed the request counter was already set and the synchronous request (browser function call) was sent immediately. Now, "head" is processed after operations and the synchronous request is delayed (Connection.js#_sendTimer is used). As a result, the synchronous request is converted to asynchronous - see Connection.js#_sendTimer interval listener.
Comment 4 Ivan Furnadjiev CLA 2013-11-22 11:34:50 EST
Fixed in master with commit 532f9b4868f803e14f11381bd1d1afcc189dcd8e.
Comment 5 Cho HyunJong CLA 2013-11-23 07:47:32 EST
Thanks so much. good work~
Comment 6 Cho HyunJong CLA 2013-11-23 23:19:34 EST
Show error message.
If you call in two consecutive, it is an error.


Client Error
Details:

Error: Error: Operation "destroy" on target "w494" of type "null" failed:
objectEntry is undefined
Properties: 


  Script: {"head":{"requestCounter":46},"operations":[["destroy","w494"],["destroy","w493"],["set","w20",{"bounds":[0,0,0,0]}],["create","w509","rwt.widgets.GridColumn",{"parent":"w366","text":"EmployeeID","index":0,"width":78,"moveable":true,"alignment":"right"}],["listen","w509",{"Selection":true}],["create","w510","rwt.widgets.GridColumn",{"parent":"w366","text":"TerritoryID","index":1,"left":78,"width":71,"moveable":true}],["listen","w510",{"Selection":true}],["call","w359","evaluate",{"script":"(function(){editorService.setTextFocus()})();"}]]}
  fileName: http://127.0.0.1:10081/rwt-resources/rap-client.js
  lineNumber: 71131
  columnNumber: 4
  Stack: rwt.remote.MessageProcessor._processError@http://127.0.0.1:10081/rwt-resources/rap-client.js:71131
rwt.remote.MessageProcessor.processOperationArray@http://127.0.0.1:10081/rwt-resources/rap-client.js:70973
rwt.remote.MessageProcessor.processMessage@http://127.0.0.1:10081/rwt-resources/rap-client.js:70926
.members._handleSuccess@http://127.0.0.1:10081/rwt-resources/rap-client.js:71605
@http://127.0.0.1:10081/rwt-resources/rap-client.js:36706
rwt.remote.Request.prototype._onReadyStateChange@http://127.0.0.1:10081/rwt-resources/rap-client.js:36757
.statics.bind/wrap@http://127.0.0.1:10081/rwt-resources/rap-client.js:5739

  Debug: on
  Request: {"head":{"requestCounter":45},"operations":[["call","w359","executeFunction",{"name":"editorServiceHandler","arguments":[25,"63-tadpole-del- SELECT EmployeeID, TerritoryID \n FROM dbo.EmployeeTerritories;"]}],["set","w1",{"cursorLocation":[618,85]}]]}
Comment 7 Ralf Sternberg CLA 2013-11-24 11:10:17 EST
I assume comment 6 supposed to reopen the bug instead of setting to INVALID.
Comment 8 Ivan Furnadjiev CLA 2013-11-25 03:23:51 EST
(In reply to comment #6)
> Show error message.
> If you call in two consecutive, it is an error.
> 
> 
> Client Error
> Details:
> 
> Error: Error: Operation "destroy" on target "w494" of type "null" failed:
> objectEntry is undefined
> Properties:
> 
> 
> Script:
> {"head":{"requestCounter":46},"operations":[["destroy","w494"],["destroy","w493"],["set","w20",{"bounds":[0,0,0,0]}],["create","w509","rwt.widgets.GridColumn",{"parent":"w366","text":"EmployeeID","index":0,"width":78,"moveable":true,"alignment":"right"}],["listen","w509",{"Selection":true}],["create","w510","rwt.widgets.GridColumn",{"parent":"w366","text":"TerritoryID","index":1,"left":78,"width":71,"moveable":true}],["listen","w510",{"Selection":true}],["call","w359","evaluate",{"script":"(function(){editorService.setTextFocus()})();"}]]}
> fileName: http://127.0.0.1:10081/rwt-resources/rap-client.js
> lineNumber: 71131
> columnNumber: 4
> Stack:
> rwt.remote.MessageProcessor._processError@http://127.0.0.1:10081/rwt-resources/rap-client.js:71131
> rwt.remote.MessageProcessor.processOperationArray@http://127.0.0.1:10081/rwt-resources/rap-client.js:70973
> rwt.remote.MessageProcessor.processMessage@http://127.0.0.1:10081/rwt-resources/rap-client.js:70926
> .members._handleSuccess@http://127.0.0.1:10081/rwt-resources/rap-client.js:71605
> @http://127.0.0.1:10081/rwt-resources/rap-client.js:36706
> rwt.remote.Request.prototype._onReadyStateChange@http://127.0.0.1:10081/rwt-resources/rap-client.js:36757
> .statics.bind/wrap@http://127.0.0.1:10081/rwt-resources/rap-client.js:5739
> 
> Debug: on
> Request:
> {"head":{"requestCounter":45},"operations":[["call","w359","executeFunction",{"name":"editorServiceHandler","arguments":[25,"63-tadpole-del-
> SELECT EmployeeID, TerritoryID \n FROM
> dbo.EmployeeTerritories;"]}],["set","w1",{"cursorLocation":[618,85]}]]}
Could you provide a snippet to reproduce the issue?
Comment 9 Ivan Furnadjiev CLA 2013-11-25 03:26:58 EST
BTW... I think that this is completely different issue from the one in the description, but I will confirm this when you provide a snippet to reproduce it.
Comment 10 Ivan Furnadjiev CLA 2013-11-25 08:07:37 EST
(In reply to comment #9)
> I think that this is completely different issue from the one in the description...
I will close this bug again. Please open a separate bug for the new issue (comment #6) and provide a snippet to reproduce it there.