Bug 26678 - After updating to XA 4.20 the call to ODataservice never returns
Summary: After updating to XA 4.20 the call to ODataservice never returns
Alias: None
Product: Android
Classification: Xamarin
Component: General ()
Version: 4.20.0
Hardware: PC Mac OS
: Normal normal
Target Milestone: ---
Assignee: Jonathan Pryor
Depends on:
Reported: 2015-02-03 05:12 UTC by Prashant Cholachagudda
Modified: 2016-11-11 09:56 UTC (History)
3 users (show)

Is this bug a regression?: ---
Last known good build:

Testcase (446.68 KB, application/zip)
2015-02-03 05:12 UTC, Prashant Cholachagudda

Notice (2018-05-24): bugzilla.xamarin.com is now in read-only mode.

Please join us on Visual Studio Developer Community and in the Xamarin and Mono organizations on GitHub to continue tracking issues. Bugzilla will remain available for reference in read-only mode. We will continue to work on open Bugzilla bugs, copy them to the new locations as needed for follow-up, and add the new items under Related Links.

Our sincere thanks to everyone who has contributed on this bug tracker over the years. Thanks also for your understanding as we make these adjustments and improvements for the future.

Please create a new report for Bug 26678 on Developer Community or GitHub if you have new information to add and do not yet see a matching new report.

If the latest results still closely match this report, you can use the original description:

  • Export the original title and description: Developer Community HTML or GitHub Markdown
  • Copy the title and description into the new report. Adjust them to be up-to-date if needed.
  • Add your new information.

In special cases on GitHub you might also want the comments: GitHub Markdown with public comments

Related Links:

Description Prashant Cholachagudda 2015-02-03 05:12:00 UTC
Created attachment 9618 [details]

Since updating to the latest Xamarin install call to ODataservice returns from the data service nor does it timeout.

If we reference the same Data service DLL (PCL Class Library) from within a Windows Phone project it all works fine. I have attached a small project with the data service DLL referenced by both an Xamarin Android and Windows Phone project demonstrating the problem

In the Android App a test method called Testing() is called in the Activity Create to test the issue.
Comment 2 asimk 2015-02-05 12:46:54 UTC
We have checked this issue with the help of testcase given in bug description and observed that when we run the android app then it is working fine, ODataservice returns from the data service and save the changes successfully and with windows phone app we are getting exception 'An unhandled exception of type 'System.AccessViolationException' occurred in DataTestWinPhoneApp.DLL' on line below in method 'Testing()' in App.xaml.cs


Screencast : http://www.screencast.com/t/JVPXQITe

Could you please have a look on the screencast and let us know if we missed anything.

Envoronment Info:

Microsoft Visual Studio Professional 2013
Version 12.0.31101.00 Update 4
Microsoft .NET Framework
Version 4.5.51641

Xamarin (39a70ae)
Comment 3 David Ingrey 2015-02-05 13:10:25 UTC
Use this for the testing method on Windows Phone

private async void Testing()
            DateTime tradingDate = new DateTime(2015, 1, 20);

            IThreading test = new WindowsPhoneDispatcherHelper();

            IDataSource dataService = new AsyncODataSource("", new NetworkConnection(), new WindowsPhoneDispatcherHelper());
            //var result = await dataService.LoadOrder(254, 100031, tradingDate, false);
            //var result = await dataService.LoadOrder(255, 100031, tradingDate, false);
            var result = await dataService.LoadOrder(256, 100031, tradingDate, false);
            //var result = await dataService.LoadOrder(257, 100031, tradingDate, false);
            //var result = await dataService.LoadOrder(258, 100031, tradingDate, false);
            //var result = await dataService.LoadOrder(259, 100031, tradingDate, false);
            //var result = await dataService.LoadOrder(260, 100031, tradingDate, false);
            //var result = await dataService.LoadOrder(261, 100031, tradingDate, false);

            test.CheckBeginInvokeOnUI(async () =>
                    if (!result.HasError)
                        var saveResult = await dataService.SubmitChanges();
Comment 4 David Ingrey 2015-02-05 13:51:53 UTC
Also I noticed in the ScreenCast that you say the saved worked for Android. If you look closely you will see it processed the await on the submitchanges but the call never returns (This is the issue) there is a break point after the submitchanges.

You will see in the code for the data service it write Save Started to the Output  window but it will also write Save Finished once the async call is returned.