|
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}}]}
|
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,229
|
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.aspxThanks!
|
|
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
|
|
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
|
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,229
|
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!
|
|
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!
|
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,229
|
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.
|
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,229
|
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!
|
|
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
|
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,229
|
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!
|
|
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!
|
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,229
|
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!
|
|
Rank: Advanced Member Groups: Member
Joined: 7/20/2015 Posts: 52
|
Same behavior confirmed by another person on another machine.
|
|
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
|
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,229
|
We are still not able to reproduce the problem. Does TabbedBrowser sample application works on your system?
|
|
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
|
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,229
|
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!
|
|
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!
|
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,229
|
Glad to hear that! Please feel free to let us know if you see any other issues.
|
|