Welcome Guest Search | Active Topics | Sign In | Register

JSObject Through JSExtInvoke - Sometimes Incomplete, Item Method Returns Null Options
JK
Posted: Tuesday, November 15, 2016 1:29:11 PM
Rank: Advanced Member
Groups: Member

Joined: 7/20/2015
Posts: 52
Hi EO Support!

Interesting observation here. I can see that in cases where my javascript uses the JSExtInvoke mechanism from multiple simultaneous threads (e.g. from > 1 ajax callback) sometimes the JSObjects coming over are missing properties. The first time I call the Item method on JSObject it returns the value sent by the javascript, but sometimes the second call returns null. I've confirmed that the javascript is publishing a real value as expected. Important to note that the 2nd property is supposed to be a JSArray. Also of note is that when I set a breakpoint for when this condition occurs, if I try to watch the JSObject's Item method the evaluation times out.

When I cut down on the number of simultaneous JSExtInvoke calls it seems to help mitigate this issue.

Is there a possible thread safety issue in play here with the javascript-to-.Net bridge?

Example of .Net code receiving the JSExtInvokeArgs:
var jsObject = e.Arguments[0] as JSObject;
var property1 = jsObject["contextObjectName"]; //always works
var property2WhichIsAnArray = jsObject["contextPropertyArray"]; // sometimes null even though the javascript object has it. when I try to Watch in the debugger evaluation times out.

example of what the javascript object looks like:
{contextObjectName:"SomeEventOccurred",contextPropertyArray:[{contextPropName:"InfoAboutTheEvent",contextPropValue:{"Property1":"Some Value","Property2":false}}]}
eo_support
Posted: Tuesday, November 15, 2016 2:59:59 PM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,071
Hi,

This looks like an issue on our side. Can you try to isolate the problem into a test project and send the test project to us? See here for more details:

https://www.essentialobjects.com/forum/test_project.aspx

Thanks!
JK
Posted: Monday, November 28, 2016 7:29:59 AM
Rank: Advanced Member
Groups: Member

Joined: 7/20/2015
Posts: 52
Hey Folks,

Just a quick update. I am working to find time to create a sample project (difficult with so many competing priorities!). Also, wanted to inform you that this issue came up when I upgraded to 16.2.23 but does not appear to be present in 16.2.1. For now, I've rolled back to 16.2.1.

JK
JK
Posted: Thursday, December 15, 2016 12:02:50 PM
Rank: Advanced Member
Groups: Member

Joined: 7/20/2015
Posts: 52
Hi All,

I've just sent a sample project. Let me know when you've received it.

JK
eo_support
Posted: Friday, December 16, 2016 12:10:31 PM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,071
Hi,

This is just to let you know that we have found the root of the problem. Since we are at the end of 2016 release cycle, the fix will probably be in the first 2017 build, which should come out in January. The new build is covered by your current license. We will reply again once the new build is posted.

Thanks!
JK
Posted: Friday, December 16, 2016 6:57:47 PM
Rank: Advanced Member
Groups: Member

Joined: 7/20/2015
Posts: 52
Terrific. Thanks and sorry for the long delay between posts. Looking forward to the new build!
eo_support
Posted: Friday, December 16, 2016 7:38:02 PM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,071
You are welcome and your test app was very helpful in reproducing the problem. Please feel free to let us know if you run into any other problems in the future.
eo_support
Posted: Friday, January 13, 2017 3:16:56 PM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,071
Hi,

This is just to let you know that we have posted the first 2017 build and the new should resolve this issue. Please take a look and let us know how it goes.

Thanks!
JK
Posted: Tuesday, January 17, 2017 4:19:43 PM
Rank: Advanced Member
Groups: Member

Joined: 7/20/2015
Posts: 52
Hi All,

I updated to 17.0.31 and ran with the sample project that I sent to you. Now, the navigation task simply hangs when calling WebView's LoadUrl method. Please advise.

Thanks,

JK
eo_support
Posted: Tuesday, January 17, 2017 5:47:42 PM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,071
Hi,

We tested it here with the sample application you sent to us on 12/15 and everything seems to work fine. On which line does it hang?

Thanks!
JK
Posted: Wednesday, January 18, 2017 8:17:53 AM
Rank: Advanced Member
Groups: Member

Joined: 7/20/2015
Posts: 52
Thanks for the quick response.

In my "Navigate" method I've got some code that is waiting for WebView.StatusMessage to change. That is not happening.

So, if I remove that StautsMessage-related code, then it comes to this block of code, and the OnDone handler of the NavigationTask never fires and the page never loads:
var navigationTask = this.webBrowserControl.WebControl.WebView.LoadUrl(url);
navigationTask.WaitOne(30000);
navigationTask.OnDone(...

Let me know if there's any other diagnostics I can provide or if you'd like my updated sample project. Thanks!
eo_support
Posted: Wednesday, January 18, 2017 9:21:12 AM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,071
Hi,

We tested it here and we are not able to see the problem. We use the latest nuget packages and StatusMessage event is correctly fired. Can you try it on another machine and see if it works?

Thanks!
JK
Posted: Wednesday, January 18, 2017 12:11:37 PM
Rank: Advanced Member
Groups: Member

Joined: 7/20/2015
Posts: 52
Same behavior confirmed by another person on another machine.
JK
Posted: Wednesday, January 18, 2017 12:16:54 PM
Rank: Advanced Member
Groups: Member

Joined: 7/20/2015
Posts: 52
As a sanity check, I also tried downgrading to 16.2.72 and that works fine. So it does seem like there is a new behavior introduced as it pertains to the navigation task in 17.0.31
eo_support
Posted: Thursday, January 19, 2017 9:11:18 AM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,071
We are still not able to reproduce the problem. Does TabbedBrowser sample application works on your system?
JK
Posted: Thursday, January 19, 2017 2:30:16 PM
Rank: Advanced Member
Groups: Member

Joined: 7/20/2015
Posts: 52
Hi All,

Installed EO.Total 17.0.31 and TabbedBrowser works fine.

Can you check to see if perhaps you have anything EO-related in the GAC?

I think perhaps a logical next step would be for me to send you my upgraded version of the sample project to see if you can spot anything that I may have missed.

JK
eo_support
Posted: Friday, January 20, 2017 12:05:26 PM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,071
Hi,

Please download build 17.0.40 from our download page and see if it resolves the issue for you. This build fixed an issue that maybe the root of the problem for your case.

Thanks!
JK
Posted: Tuesday, January 24, 2017 4:21:35 PM
Rank: Advanced Member
Groups: Member

Joined: 7/20/2015
Posts: 52
17.0.40 is looking good! Not sure what you changed but glad you did so, as it it loaded right away and the JSExtInvoke fix is right on the money. Thanks!
eo_support
Posted: Tuesday, January 24, 2017 4:28:57 PM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,071
Glad to hear that! Please feel free to let us know if you see any other issues.


You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.