Bug 11068 - Release build crash on Webservice call
Summary: Release build crash on Webservice call
Status: RESOLVED FIXED
Alias: None
Product: Android
Classification: Xamarin
Component: Debugger ()
Version: 4.8.x
Hardware: PC Mac OS
: Normal normal
Target Milestone: ---
Assignee: Martin Baulig
URL:
Depends on:
Blocks:
 
Reported: 2013-03-12 08:12 UTC by Prashant Cholachagudda
Modified: 2016-11-11 09:40 UTC (History)
3 users (show)

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

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 on Developer Community or GitHub with your current version information, steps to reproduce, and relevant error messages or log files if you are hitting an issue that looks similar to this resolved bug and you do not yet see a matching new report.

Related Links:
Status:
RESOLVED FIXED

Description Prashant Cholachagudda 2013-03-12 08:12:10 UTC
From Desk case:26482
The release version of attached sample app fails on web service callback.
It crashes only on *Windows* machine!

Logcat stacktrace:
02-25 11:15:30.824: I/MonoDroid(4518): UNHANDLED EXCEPTION: System.NullReferenceException: Object reference not set to an instance of an object
02-25 11:15:30.824: I/MonoDroid(4518): at MobSales.Droid.Views.Fragments.Dialogs.LoginDialog.<_service_AuthenticateSalespersonAndGetListCompleted>b__17 () <0x00104>
02-25 11:15:30.824: I/MonoDroid(4518): at Java.Lang.Thread/RunnableImplementor.Run () <0x0003f>
02-25 11:15:30.824: I/MonoDroid(4518): at Java.Lang.IRunnableInvoker.n_Run (intptr,intptr) <0x00037>
02-25 11:15:30.824: I/MonoDroid(4518): at (wrapper dynamic-method) object.227e27a0-a9f1-46a0-a9ab-7d81311fb281 (intptr,intptr) <0x0003b>
02-25 11:15:31.004: I/mono(4518): [ERROR] FATAL UNHANDLED EXCEPTION: Java.Lang.Throwable: Exception of type 'Java.Lang.Throwable' was thrown.
02-25 11:15:31.004: I/mono(4518): at Android.Runtime.JNIEnv.NewString (string) <0x000a0>
02-25 11:15:31.004: I/mono(4518): at Android.Util.Log.Info (string,string) <0x00073>
02-25 11:15:31.004: I/mono(4518): at Android.Runtime.AndroidEnvironment.UnhandledException (System.Exception) <0x00037>
02-25 11:15:31.004: I/mono(4518): at (wrapper dynamic-method) object.227e27a0-a9f1-46a0-a9ab-7d81311fb281 (intptr,intptr) <0x0008f>
02-25 11:15:31.004: I/mono(4518): at (wrapper native-to-managed) object.227e27a0-a9f1-46a0-a9ab-7d81311fb281 (intptr,intptr) <0x0003b>
Comment 2 Prashant Cholachagudda 2013-03-13 07:49:09 UTC
If we do the synchronization twice or more, you get a NullReference at Android.Runtime.JNIEnv.CallBooleanMethod (intptr,intptr).

Following is the stacktrace:
03-13 07:47:02.778 I/mono ( 1083): Stacktrace:
03-13 07:47:02.778 I/mono ( 1083):
03-13 07:47:02.778 I/mono ( 1083): at Android.Runtime.JNIEnv.CallBooleanMethod (intptr,intptr) [0x00000] in /Users/builder/data/lanes/monodroid-mac-monodroid-4.2.7-branch/0e9eea34/source/monodroid/src/Mono.Android/src/Runtime/JNIEnv.g.cs:152
03-13 07:47:02.785 I/mono ( 1083): at Android.App.ProgressDialog.get_Indeterminate () [0x0003e] in /Users/builder/data/lanes/monodroid-mac-monodroid-4.2.7-branch/0e9eea34/source/monodroid/src/Mono.Android/platforms/android-12/src/generated/Android.App.ProgressDialog.cs:102
03-13 07:47:02.785 I/mono ( 1083): at MobSales.Droid.Dashboard.SynchronizeSynchCompleted (object,MobSales.Core.ServiceAccessLayer.Events.SynchronizationProgressEventArgs) [0x0002e] in d:\Projects\MobileSales\MobileSales\MobSales.Droid\Dashboard.cs:275
03-13 07:47:02.785 I/mono ( 1083): at MobSales.Core.ServiceAccessLayer.Synchronize.ServiceGetRecentBuyedItemsListCompleted (object,MobSales.Core.ServiceAccessLayer.Events.GetRecentBuyedtemsEventArgs) [0x000ff] in d:\Projects\MobileSales\MobileSales\MobSales.Core\ServiceAccessLayer\Synchronize.cs:225
03-13 07:47:02.785 I/mono ( 1083): at (wrapper delegate-invoke) <Module>.invoke_void__this___object_GetRecentBuyedtemsEventArgs (object,MobSales.Core.ServiceAccessLayer.Events.GetRecentBuyedtemsEventArgs) <IL 0x00059, 0xffffffff>
03-13 07:47:02.785 I/mono ( 1083): at MobSales.Core.ServiceAccessLayer.NavServices.Instance_GetItemCatalogCompleted (object,MobSales.Core.web_service.GetItemCatalogCompletedEventArgs) [0x0003c] in d:\Projects\MobileSales\MobileSales\MobSales.Core\ServiceAccessLayer\NavServices.cs:3337
03-13 07:47:02.785 I/mono ( 1083): at MobSales.Core.web_service.MobileSalesService.OnGetItemCatalogOperationCompleted (object) [0x00016] in d:\Projects\MobileSales\MobileSales\MobSales.Core\Web References\web_service\Reference.cs:411
03-13 07:47:02.785 I/mono ( 1083): at Android.App.SyncContext/<Send>c__AnonStorey2F.<>m__1A () [0x00000] in /Users/builder/data/lanes/monodroid-mac-monodroid-4.2.7-branch/0e9eea34/source/monodroid/src/Mono.Android/src/Android.App/SyncContext.cs:37
03-13 07:47:02.785 I/mono ( 1083): at Java.Lang.Thread/RunnableImplementor.Run () [0x0000b] in /Users/builder/data/lanes/monodroid-mac-monodroid-4.2.7-branch/0e9eea34/source/monodroid/src/Mono.Android/src/Java.Lang/Thread.cs:32
03-13 07:47:02.785 I/mono ( 1083): at Java.Lang.IRunnableInvoker.n_Run (intptr,intptr) [0x00008] in /Users/builder/data/lanes/monodroid-mac-monodroid-4.2.7-branch/0e9eea34/source/monodroid/src/Mono.Android/platforms/android-12/src/generated/Java.Lang.IRunnable.cs:69
03-13 07:47:02.785 I/mono ( 1083): at (wrapper dynamic-method) object.7386212a-2cd6-4d6d-9d69-1922e1992cda (intptr,intptr) <IL 0x0000c, 0x0002b>
03-13 07:47:02.785 I/mono ( 1083): at (wrapper native-to-managed) object.7386212a-2cd6-4d6d-9d69-1922e1992cda (intptr,intptr) <IL 0x0001e, 0xffffffff>
Thread finished:

It get’s thrown on the line 320 of Dashboard.cs file in the sample
This happens in the latest version and also in the 4.2.7
Comment 3 Prashant Cholachagudda 2013-03-14 08:41:30 UTC
From Martin:

If compiled the debug version without Shared Runtime, the same problem appear as in the Release Build. 

It is a problem with collections coming from the WS to the device. If I debug it, I can see, that the IsSalesPersonCompletedEventArgs are filled like this:

e.result[0] = 13
e.result[1] = null <-- the Salespersons should be saved in here
Comment 4 Martin Baulig 2016-11-11 09:40:33 UTC
Closing ancient bugs, please reopen if you're still having this problem.