-
Notifications
You must be signed in to change notification settings - Fork 84
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
IProgress Callee Registration Fails on Xamarin.Android #268
Comments
I guess that method.ReturnParameter may return null on Xamarin.Android.
Maybe you can verify this.
Thanks
Elad
|
Ok, let's look at mono's InternalParamIsDefined implementation. I guess that when the ParameterInfo is method.ReturnParameter, the parameter.Position is negative/too large, and therefore we get the Elad |
So WampSharp uses |
I created a Xamarin Android Unit test project and linked all existing WampSharp.Tests.Wampv2 tests to it. Result is 13 or 14 failures, Making the suggested changes to 4 methods where
I created an archive with these changes and the Xamarin.Android nunit runner (I included log4net and appenders that append to the nunit log and the android logger). I included the test project in the WampSharpNetStandard.sln for my purposes. If you'd like me to add this to a PR, I'd appreciate guidance as to a proper location, but feel free to take the archive and locate it wherever you desire. I'll attempt to create a simple repro to send to Mono. To be honest, I have no idea where to report these things with Xamarin, as some are Xamarin, some are Mono, and some are Mono-[Platform]. |
Co-Authored-By: Steven Bone <stevenbonepgh@users.noreply.github.com>
I merged your changes, excluding the unit tests. If everything works out, v18.9.1 should be published on NuGet soon. I opened issue #269. Will be done some time in the future. |
Correct, that was the issue. I confirmed that 18.9.1 resolves this issue. Thanks for the assist here. It could be a recent break in Xamarin/Mono, as I also believe that I was working with an earlier version when it was working (the WampSharp version change was likely not the only change between working/nonworking). |
@StevenBonePgh, can you please file a bug to mono? |
When registering a reflection-based callee with an IProgress parameter on Xamarin.Android an index out of range exception is thrown. This worked in 18.3.2, I first noticed it broken in 18.8.2, and it remains broken in 18.8.5. On .NET 4.7.1 and Xamarin.UWP the callee registers just fine. I do not have a Mac to check that platform, sorry.
The interface method likely causing the issue looks like this:
The exception happens when calling
Channel.RealmProxy.Services.RegisterCallee
with the object implementing that interface.I have a CalleeRegistrationInterceptor, and right after it calls GetProcedureUri for the method in question is when the exception is thrown, which is why I suspect the above procedure is the guilty party. There seems to have been a large code churn in the areas in the call stack from when I confirmed it worked, but in a quick glance it was not obvious to me where the issue happens to be. Any ideas? I can try to nail it down further Monday if need be.
Thanks, Elad!
The text was updated successfully, but these errors were encountered: