-
Notifications
You must be signed in to change notification settings - Fork 13
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ChildrenRetrievalPolicy does not work correctly sometimes #40
Comments
Apparently, this bug only happens when |
I haven't fully checked your source code yet, but to me it sounds a bit as if you are running into an async 'deadlock' situation, as e.g. described here: It suggeststwo best practices:
As said, I haven't tested myself (due to the lack of an appropriate device with the known behavior), but there are 2 quick slots which you might take a look at: a) when calling b) to try, if there is any deadlock, you might try to call the Don't know if that helps... |
No, I think it's a race condition. If it was a deadlock, using
No, what you see there is an optimization. If an
|
More testing is necessary. References #40
My tests indicate that this should now be fixed. I ran |
My test code still hangs. Git tells me that I am in sync with upstream/master but I see no change in this behaviour. I verified that the changes of the commit that should fix this are actually in my working folder. Still the consumer hangs, both when I try to enumerate a Lawo/Sapphire and a Lawo/Nova73. Interestingly enough, it doesn't fail on providers I made myself based on the lawo/ember-plus/EmberPlus.Net/EmberPlusRouter example project. Those trees are a lot smaller than the ones provided by the hardware, though. |
AFAIU, Sapphire might still have the problem we discussed in #28. For the Nova73, the tree is probably to big to be retrieved in full. Can you attach a log file as you did for #28? |
Here is a log file for the Nova73. This just stops after reading a few elements: I am currently getting a new error message when parsing the Sapphire tree that I didn't get when I tested before: "Unexpected End-of-contents identifier at position 432 for definite length at position 54." Stack trace:
Log file: |
I'm sorry, I should have been more clear. Can please do the exact same tests again, but this time with Glow Analyzer Proxy? The logs written by that tool provide a bit more detail that could be helpful.
How does it stop? Is there an exception? What timeouts did you set? Thanks! |
Ah. I can not test with the glow Analyzer proxy before Monday.
My timeout is set to 10000 but I am not sure if I waited that long to see if I eventually get an exception. I will try that on Monday too. The loop through all children never terminates no exceptions, no error messages. On Monday I can try to narrow it down a bit more.
On 21 apr. 2017, at 15:32, Andreas Huber <[email protected]<mailto:[email protected]>> wrote:
I'm sorry, I should have been more clear. Can please do the exact same tests again, but this time with Glow Analyzer Proxy? The logs written by that tool provide a bit more detail that could be helpful.
This just stops after reading a few elements:
How does it stop? Is there an exception? What timeouts did you set?
Thanks!
-
You are receiving this because you commented.
Reply to this email directly, view it on GitHub<#40 (comment)>, or mute the thread<https://github.com/notifications/unsubscribe-auth/AUMK7cNrMqdGaLS-wFzgKrxpilZdWleYks5ryK_TgaJpZM4MrZOk>.
|
Ok, I tested again. I waited longer than the timeout of 10 seconds and it is still hung after reading the tenth element of the Nova73 tree. I do get the keep-alive messages, just no more data and no error messages. For the Sapphire, I get the new "Unexpected End-of-contents identifier" exception on the same element that it used to get stuck on before. |
Ok, and you're getting this behavior with the Nova73 when you use ChildrenRetrievalPolicy, right? If so, have you tried to use the default overload of Consumer.Create? What Sapphire version are you using? |
With "Consumer consumer = await Consumer.CreateAsync(client)" to connect to the Nova73, I get the following exception: "No enumeration, enumMap, value or type field is available for the parameter with the path /_1/_101/_2/_206/_3e8/_60120001." The Nova73 is currently not my priority, I just used it to have an additional unit to test with. Still, it would be nice if that works too. I might need this some day. Getting the Sapphire to work is critical, though. The Sapphire I am testing with is at OS version 5.0.956, |
Ok, I will ignore the Nova problem for the moment and see whether we can reproduce the Sapphire issue. |
I'm afraid this will take longer than anticipated, I'm currently waiting for DSA to send me the correct version of the firmware, so that I can try to reproduce the problem. |
I can't reproduce this with the crystal unit we have in house (it should perform much the same with regards to Ember+). To test, I've commented out all lines in I'll try to get a hold of a Sapphire unit and run the same code there. I'll keep you posted. |
Strange, I get the very same error when running my code against a Crystal or Sapphire unit. Band 1 of the Equalizer makes it crash. When I try to run the modified Bug40Test against the Crystal or the Sapphire, I get a System.ObjectDisposedException:
Running the test against a provider that I made using the ember-plus library, one that doesn't have anything that looks like that Equalizer node and no enum parameters, makes the test pass. My modified test looks like this:
And in the GetTreeAsync, I simply changed the host and port to point to the Crystal unit. I also changed the "Culture" at the top of this method to get the error messages in English. Crystal version: 5.0.107 |
Could it be that your Crystal has no equalizer configured on any of the sources? The 20170504_133031_UTC.xml.txt file you posted doesn't appear to contain any nodes named "Band 1", "Band 2", etc. |
Strange indeed. I don't really understand why you get this exception. Given the stack trace, line 283 should never be executed. You are using the latest release, right? Against what target are you compiling (desktop .net framework, Windows Store Apps, ..)? |
Most likely. Frankly, I don't have a clue about the crystal. I've just hooked up this unit we happened to have lying around and updated it to the (as of yet unreleased) version 5.0.165. How can I configure an equalizer? |
git tells me that my working directory is up to date with both my own fork and the upstream master. I will try to build from the zip-archive. My current build targets are: I am not sure about configuring the Crystal. For the Sapphire, you run the Zirkon configuration utility, load the project from the unit and look for the source in the tree definition view. I am not sure about what it does, but there is a check box for the sources named "Eq Op Disable", and this is NOT checked for any of the sources in the Sapphire I test with. I tried loading the project from the Crystal into my Zirkon application, but there may be a version mis-match. It won't let me load it. |
Ok, I tested with the source zip-archive of the latest release and get the same error. |
When you run Bug40Test, do you do that with Lawo.EmberPlusSharp.sln loaded, through the Visual Studio Test Explorer (by right-clicking on the test)? |
Yes. |
I'm in the process of getting access to a Sapphire. Sorry, this might take some time :-/. |
It turns out that the EmberException that is thrown from your code (with the message "Unexpected End-of-contents ...") is due to the fact that the Sapphire reports an incorrect length in the Ember+ data. Of course, the exception message set by this library is wrong (fixed in commit associated with #45). I've forwarded my findings regarding this bug to DSA, please follow up with them for more information. What is as of yet unclear, is why you get ObjectDisposedException when you run Bug40Test. Could you please run that test with the Debugger and see whether a EmberException is thrown first? Thanks! |
I apologise for the late response, but I do get weirdness when running Bug40Test in Visual Studio 2015 with ReSharper. Running the test with the standard Test Explorer, it passes. But debugging it from the same Test Explorer gives me a bunch of TaskCanceledException and the debugger never stops. |
Thanks for testing! It's good to hear that it works with the standard test explorer, that's what I'm using. I don't understand why it wouldn't work with ReSharper, however. I no longer have access to a Sapphire, but when I debug Bug40Test (with everything except the I guess DSA did not yet provide you with a fixed firmware? Once they do, please let me know whether your code then works. |
If ChildrenRetrievalPolicy is used as described in #39, the retrieval process sometimes just stops.
The text was updated successfully, but these errors were encountered: