Bug 13963 - AIDL bound services error when service and client are run under separate PIDs
Summary: AIDL bound services error when service and client are run under separate PIDs
Status: VERIFIED FIXED
Alias: None
Product: Android
Classification: Xamarin
Component: General ()
Version: 4.8.x
Hardware: PC Mac OS
: --- normal
Target Milestone: ---
Assignee: Atsushi Eno
URL:
Depends on:
Blocks:
 
Reported: 2013-08-14 00:08 UTC by Brendan Zagaeski (Xamarin Team, assistant)
Modified: 2014-07-04 08:35 UTC (History)
5 users (show)

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


Attachments
Test case (57.19 KB, application/zip)
2013-08-14 00:08 UTC, Brendan Zagaeski (Xamarin Team, assistant)
Details
Java translation of the service (99.99 KB, application/zip)
2013-08-14 00:09 UTC, Brendan Zagaeski (Xamarin Team, assistant)
Details
Sample solution (872.26 KB, application/octet-stream)
2014-03-17 05:07 UTC, Waldemar Zubik
Details


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:
VERIFIED FIXED

Description Brendan Zagaeski (Xamarin Team, assistant) 2013-08-14 00:08:07 UTC
Created attachment 4624 [details]
Test case

Summary:
Services generated by the `AndroidInterfaceDescription` build action do not work with Clients running under a separate PID. Replacing the faulty service with a Java version solves the problem, so perhaps the code generated for the C# service is missing some important little piece? The C# *client* works perfectly well with the Java service, so the problem seems to be specific to the service code.


Steps to reproduce:
1. Open the AIDLDemo (https://github.com/xamarin/monodroid-samples/tree/master/AIDLDemo).
2. Replace `[Service]` with `[Service (Process = ":serviceProcess")]` in `AdditionCervice.cs`. (attached as "Test case")
3. Run the example in debug mode (to catch the exception).
4. Press the "Home" button, then select the app again from the app list. This seems to help the service connect (at least on the emulator). It's also helpful to add a tracepoint or a `Log.Debug()` in `OnServiceConnected()` to see when the service connects.
5. After the service is connected, fill in the two number fields in the app, and press the "=" button.


Result:
Xamarin Studio breaks on `__reply.ReadException ();` with an exception code equal to the return value as an integer (?). For example, in the full stacktrace below, the return value for 13 + 7 was 20.


Additional observations:
If you split the Client and Service into separate APKs, you get the same problem, even if you set the `Process` for the [Service] and the Process for the [Activity] to the same value. I suspect this is because when both are running, they still have different PIDs (at least, they always had different PIDs in my trials).

Not surprisingly, using a separate Java client with the C# service causes this same error too.

I tried copying the AndroidManifest.xml verbatim from the working Java service to the C# service (and commenting out the corresponding attributes), but that didn't help. I also tried matching the package name between the C# and Java versions.



## Example stack trace

Java.Lang.RuntimeException: Unknown exception code: 20 msg null
  at Android.Runtime.JNIEnv.CallVoidMethod (intptr,intptr) [0x00022] in /Users/builder/data/lanes/monodroid-mlion-monodroid-4.8.0-branch/b76e8ec4/source/monodroid/src/Mono.Android/src/Runtime/JNIEnv.g.cs:356
  at Android.OS.Parcel.ReadException () [0x0002d] in /Users/builder/data/lanes/monodroid-mlion-monodroid-4.8.0-branch/b76e8ec4/source/monodroid/src/Mono.Android/platforms/android-10/src/generated/Android.OS.Parcel.cs:440
  at Com.Xamarin.Aidldemo.IAdditionServiceStub/Proxy.Add (int,int) [0x0003a] in /Users/USER/Projects/monodroid-samples/AIDLDemo/AIDLDemo/obj/Debug/aidl/IAdditionService.cs:91
  at Xamarin.AidlDemo.Activity1.<OnStart>m__0 (object,System.EventArgs) [0x00053] in /Users/USER/Projects/monodroid-samples/AIDLDemo/AIDLDemo/Activity1.cs:39
  at at (wrapper delegate-invoke) <Module>.invoke_void__this___object_EventArgs (object,System.EventArgs) <IL 0x00027, 0x00042>
  at Android.Views.View/IOnClickListenerImplementor.OnClick (Android.Views.View) [0x0000d] in /Users/builder/data/lanes/monodroid-mlion-monodroid-4.8.0-branch/b76e8ec4/source/monodroid/src/Mono.Android/platforms/android-10/src/generated/Android.Views.View.cs:879
  at Android.Views.View/IOnClickListenerInvoker.n_OnClick_Landroid_view_View_ (intptr,intptr,intptr) [0x00010] in /Users/builder/data/lanes/monodroid-mlion-monodroid-4.8.0-branch/b76e8ec4/source/monodroid/src/Mono.Android/platforms/android-10/src/generated/Android.Views.View.cs:849
  at at (wrapper dynamic-method) object.213ce912-64e3-488d-9423-ec6ae20333de (intptr,intptr,intptr) <IL 0x00017, 0x0001f>
  at 
  at --- End of managed exception stack trace ---
  at java.lang.RuntimeException: Unknown exception code: 20 msg null
  at 	at android.os.Parcel.readException(Parcel.java:1337)
  at 	at android.os.Parcel.readException(Parcel.java:1281)
  at 	at mono.android.view.View_OnClickListenerImplementor.n_onClick(Native Method)
  at 	at mono.android.view.View_OnClickListenerImplementor.onClick(View_OnClickListenerImplementor.java:29)
  at 	at android.view.View.performClick(View.java:3511)
  at 	at android.view.View$PerformClick.run(View.java:14105)
  at 	at android.os.Handler.handleCallback(Handler.java:605)
  at 	at android.os.Handler.dispatchMessage(Handler.java:92)
  at 	at android.os.Looper.loop(Looper.java:137)
  at 	at android.app.ActivityThread.main(ActivityThread.java:4424)
  at 	at java.lang.reflect.Method.invokeNative(Native Method)
  at 	at java.lang.reflect.Method.invoke(Method.java:511)
  at 	at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:784)
  at 	at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:551)
  at 	at dalvik.system.NativeStart.main(Native Method)
  at
Comment 1 Brendan Zagaeski (Xamarin Team, assistant) 2013-08-14 00:09:19 UTC
Created attachment 4625 [details]
Java translation of the service
Comment 2 Waldemar Zubik 2014-03-14 04:56:33 UTC
Seen the same issue on 4.12 Xamarin.
Comment 3 Waldemar Zubik 2014-03-14 10:30:39 UTC
I've made some investigation to that.
public int Test ()
{
global::Android.OS.Parcel __data = global::Android.OS.Parcel.Obtain ();
global::Android.OS.Parcel __reply = global::Android.OS.Parcel.Obtain ();
int __result = default (int);
try {
__data.WriteInterfaceToken (descriptor);
remote.Transact (IMediaPlayerStub.TransactionTest, __data, __reply, 0);
__reply.ReadException ();
__result = __reply.ReadInt ();
} finally {
__reply.Recycle ();
__data.Recycle ();
}
return __result;
}

Let's take the example above. 
As You can see ReadException method is invoked before ReadInt.
If I switch the order between them then the result is ok and everything works fine (I've just put a breakpoint in Read Exception and invoked ReadInt, while I can't accually change the order because this file is automatically genereted by compiler).
That might be a clue to what is the reason of exception.
Comment 4 Atsushi Eno 2014-03-17 03:58:48 UTC
> The C# *client* works perfectly well with the Java service, so the problem seems to be specific to the service code.

Do you mean the attached service sample on comment #1 works with the client? But that Java sample does not have android:process=":serviceProcess" in its <service> element in AndroidManifest.xml.
Comment 5 Waldemar Zubik 2014-03-17 04:34:35 UTC
No, not this one from comment1. I created a one for my tests. But it was working only in specific terms mentioned in comment 3 (so I thaught it's working always). 
Even AIDL C# demo works in scenario mentioned in comment 3. 
Basically if You try to read value before exception it works fine.
Comment 6 Atsushi Eno 2014-03-17 04:51:10 UTC
Let me make things clear.

- I'm commenting on the original report, only about the quoted part.
- The report says the problem occurs when the Service attribute has Process property value explicitly specified.
  - Which actually adds "android:process" attribute on the relevant <service> element in the AndroidManifest.xml
- The report claims that a corresponding Java service works, but I don't think it actually is under the same situation because it does not have "android:process" attribute above.

The comment #3 (thanks by the way for investigation) may be actually explaining the same issue from different aspect, or could be different issue. So far, it rather sounds like inconsistency between Java and Xamarin AIDL processing difference. That is different from "it doesn't work if the process ID is different" (as the bug description says) issue.
Comment 7 Waldemar Zubik 2014-03-17 05:07:09 UTC
Created attachment 6331 [details]
Sample solution

I haven't checked the attachment from comment1. 
But what I can observe is that:

1. AIDL works fine if service and client are both the same process (no tag in android manifest)
2. If the service is running on a separate process, by adding android:process attribute then the above exception occured for both Java service or C# Xamarin service until You do what it's descrpibed in comment3.

In my opinion both scenarios are the same issue, but I might be wrong.
I'm adding my example c# solution to this issue (If You need any info You can reach my email too).
Thanks in advance for Your help.
Comment 8 Atsushi Eno 2014-03-18 12:13:21 UTC
I'm still investigating the issue, but just want to post some information here.

This is what aidl in Android SDK tool does to generate java proxy code:
https://github.com/android/platform_frameworks_base/blob/master/tools/aidl/generate_java_binder.cpp#L462

This first try to read Exception, then read the output parameters. This matches how our C# client is generated and works.
Comment 9 Waldemar Zubik 2014-03-18 13:00:31 UTC
Yes that is true. Maybe there is an issue in mono?
Comment 10 Atsushi Eno 2014-03-20 04:51:23 UTC
So far my conclusion (if I can say; so far it is rather an assumption) is that it is not likely AIDL issue. I observed similar issue when I modified our monodroid-samples/ServiceSamples/DemoService to add Process property to have isolated process name:

hhttps://github.com/xamarin/monodroid-samples/blob/master/ServiceSamples/DemoService/DemoService/DemoService.cs#L11

With Process=":process" here in this property, the service does not respond to the client request.

We have observed similar problem in the past when we investigated instrumentation-driven Activity launch, which fails to initialize the monodroid runtime. It "looks" like the same or similar issue.

(Though in this case the Zygote process should be different, so I'm actually not that sure if the source of the problem is identical.)

This requires some app-bootstrap investigation that we haven't been successful in the past...
Comment 11 Jonathan Pryor 2014-03-27 00:19:12 UTC
I am confused. If I take Attachment #6331 [details], launch it, and tap the button, my `adb logcat` contains:

> E/mono    ( 4242): Unhandled Exception:
> E/mono    ( 4242): System.NotImplementedException: Don't need that in case service is a separate process
> E/mono    ( 4242):   at Zibi.Player.Droid.ClientSpecific.ServiceBinder.Stop () [0x00000] in <filename unknown>:0 
> E/mono    ( 4242):   at Zibi.Player.Droid.IMediaPlayerStub.OnTransact (Int32 code, Android.OS.Parcel data, Android.OS.Parcel reply, Int32 flags) [0x00000] in <filename unknown>:0 
> E/mono    ( 4242):   at Android.OS.Binder.n_OnTransact_ILandroid_os_Parcel_Landroid_os_Parcel_I (IntPtr jnienv, IntPtr native__this, Int32 code, IntPtr native_data, IntPtr native_reply, Int32 flags) [0x00000] in <filename unknown>:0 
> E/mono    ( 4242):   at (wrapper dynamic-method) object:0fc5858a-8cea-45aa-9732-ce9eb1a719ea (intptr,intptr,int,intptr,intptr,int)

Note the message:

> Don't need that in case service is a separate process

This is coming from CrossPlatformPlayer/Zibi.Player.Droid/ClientSpecific/ServiceBinder.cs lines 29 and 34.

I don't think it should be throwing an exception. I think it should be delegating to the Service:

https://gist.github.com/jonpryor/1e756e710a5c01d1f6a9

THAT SAID, it instead results in an exception:

> UNHANDLED EXCEPTION: Java.Lang.RuntimeException: Exception of type 'Java.Lang.RuntimeException' was thrown.
> at Android.Runtime.JNIEnv.CallVoidMethod (intptr,intptr) <0x00128>
> at Android.OS.Parcel.ReadException () <0x0006f>
> at Zibi.Player.Droid.IMediaPlayerStub/Proxy.Stop () <0x0008f>
> at Zibi.Player.Droid.Activity1.button_Click (object,System.EventArgs) <0x0003b>
> at Android.Views.View/IOnClickListenerImplementor.OnClick (Android.Views.View) <0x00047>
> at Android.Views.View/IOnClickListenerInvoker.n_OnClick_Landroid_view_View_ (intptr,intptr,intptr) <0x0005f>
> at (wrapper dynamic-method) object.5c137633-fcdd-42ce-b62a-a3db4db3ba9d (intptr,intptr,intptr) <0x00043>
> 
>   --- End of managed exception stack trace ---
> java.lang.RuntimeException: Unknown exception code: 10 msg null
>     at android.os.Parcel.readException(Parcel.java:1477)
>     at android.os.Parcel.readException(Parcel.java:1419)
>     at mono.android.view.View_OnClickListenerImplementor.n_onClick(Native Method)
>     at mono.android.view.View_OnClickListenerImplementor.onClick(View_OnClickListenerImplementor.java:29)
>     at android.view.View.performClick(View.java:4438)
>     at android.view.View$PerformClick.run(View.java:18422)
>     at android.os.Handler.handleCallback(Handler.java:733)
>     at android.os.Handler.dispatchMessage(Handler.java:95)
>     at android.os.Looper.loop(Looper.java:136)
>     at android.app.ActivityThread.main(ActivityThread.java:5017)
>     at java.lang.reflect.Method.invoke(Native Method)
>     at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:779)
>     at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:595)

@eno: I  don't think that this is a app bootstrap issue, as the service process _is_ starting:

> I/ActivityManager(  757): Start proc zibi.player.droid for activity zibi.player.droid/.Activity1: pid=6113 uid=10014 gids={50014, 3003, 1028, 1015}
# This launches the main Activity in pid 6113

> I/ActivityManager(  757): Start proc .zibi.player.service for service zibi.player.droid/.services.MediaPlaybackService: pid=6152 uid=10014 gids={50014, 3003, 1028, 1015}
# This launches the Service in pid 6152
...
> D/Mono    ( 6152): Found as 'gettid'.

The service process finishes starting up (no aborts, etc.), and is still running. It's the Activity/calling process which gets the exception...

> I/art     (  181): Process 6113 exited cleanly (1)

...and the Service is still running:

$ adb shell ps | grep 6152
u0_a14    6152  181   489156 45176 ffffffff 00000000 S .zibi.player.service
Comment 12 Jonathan Pryor 2014-03-27 00:33:54 UTC
@eno wrote:

> I observed similar issue when I modified our monodroid-samples/ServiceSamples/DemoService 
> to add Process property to have isolated process name:

I believe that DemoService is note comparable.

Please see RemoteService.java, an ApiDemo sample for AIDL:

http://grepcode.com/file/repository.grepcode.com/java/ext/com.google.android/android-apps/4.0.3_r1/com/example/android/apis/app/RemoteService.java

Note that RemoteService.onBind() returns an IRemoteService.Stub instance, whereas DemoServiceBinder inherits Binder, not DemoServiceStub:

http://grepcode.com/file/repository.grepcode.com/java/ext/com.google.android/android-apps/4.0.3_r1/com/example/android/apis/app/RemoteService.java#100
http://grepcode.com/file/repository.grepcode.com/java/ext/com.google.android/android-apps/4.0.3_r1/com/example/android/apis/app/RemoteService.java#116
https://github.com/xamarin/monodroid-samples/blob/master/ServiceSamples/DemoService/DemoService/DemoService.cs#L85

For that matter, ServiceSamples doesn't provide any .aidl samples! These aren't directly comparable.

If I instead use AIDLSample, and apply a patch to enable multiprocess support:

https://github.com/xamarin/monodroid-samples/tree/master/AIDLDemo/AIDLDemo
https://gist.github.com/jonpryor/10abb7a6893e7419f994

AIDLSample crashes in an ~identical manner:

> D/AdditionServiceBinder(10324): AdditionService.Add(4, 5)
> I/MonoDroid(10305): UNHANDLED EXCEPTION: Java.Lang.RuntimeException: Exception of type 'Java.Lang.RuntimeException' was thrown.
> I/MonoDroid(10305): at Android.Runtime.JNIEnv.CallVoidMethod (intptr,intptr) <0x00128>
> I/MonoDroid(10305): at Android.OS.Parcel.ReadException () <0x0006f>
> I/MonoDroid(10305): at Com.Xamarin.Aidldemo.IAdditionServiceStub/Proxy.Add (int,int) <0x000bf>
> I/MonoDroid(10305): at Xamarin.AidlDemo.Activity1.<OnStart>m__0 (object,System.EventArgs) <0x000c3>
> I/MonoDroid(10305): at Android.Views.View/IOnClickListenerImplementor.OnClick (Android.Views.View) <0x00047>
> I/MonoDroid(10305): at Android.Views.View/IOnClickListenerInvoker.n_OnClick_Landroid_view_View_ (intptr,intptr,intptr) <0x0005f>
> I/MonoDroid(10305): at (wrapper dynamic-method) object.98b53921-e118-4f76-b96e-e304868de1fd (intptr,intptr,intptr) <0x00043>
> I/MonoDroid(10305): 
> I/MonoDroid(10305):   --- End of managed exception stack trace ---
> I/MonoDroid(10305): java.lang.RuntimeException: Unknown exception code: 9 msg null
> I/MonoDroid(10305):     at android.os.Parcel.readException(Parcel.java:1477)
> I/MonoDroid(10305):     at android.os.Parcel.readException(Parcel.java:1419)
> I/MonoDroid(10305):     at mono.android.view.View_OnClickListenerImplementor.n_onClick(Native Method)
> I/MonoDroid(10305):     at mono.android.view.View_OnClickListenerImplementor.onClick(View_OnClickListenerImplementor.java:29)
> I/MonoDroid(10305):     at android.view.View.performClick(View.java:4438)
> I/MonoDroid(10305):     at android.view.View$PerformClick.run(View.java:18422)
> I/MonoDroid(10305):     at android.os.Handler.handleCallback(Handler.java:733)
> I/MonoDroid(10305):     at android.os.Handler.dispatchMessage(Handler.java:95)
> I/MonoDroid(10305):     at android.os.Looper.loop(Looper.java:136)
> I/MonoDroid(10305):     at android.app.ActivityThread.main(ActivityThread.java:5017)
> I/MonoDroid(10305):     at java.lang.reflect.Method.invoke(Native Method)
> I/MonoDroid(10305):     at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:779)
> I/MonoDroid(10305):     at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:595)

In particular, note that the first message is coming from pid 10324 (the Service process) while the crash is coming from pid 10305 (the client app).

Something funky is going on with message serialization, such that Parcel.readException() is getting an unknown message blob.

Perhaps our AIDL proxies/stubs are no longer generating what the Java AIDL proxies/stubs do?
Comment 13 Jonathan Pryor 2014-03-27 00:43:04 UTC
> Perhaps our AIDL proxies/stubs are no longer generating what the Java AIDL
> proxies/stubs do?

On that angle, I've built the Android SDK android-18/legacy/ApiDemos sample, and even though the interfaces aren't _directly_ comparable, I do notice an interesting difference:

// generated IMediaPlayer.cs, from Attachment #6331 [details]:
> protected override bool OnTransact (int code, global::Android.OS.Parcel data, global::Android.OS.Parcel reply, int flags)
> {
>   switch (code) {
>   case global::Android.OS.BinderConsts.InterfaceTransaction:
>     reply.WriteString (descriptor);
>     return true;
>
>   case TransactionStop: {
>     data.EnforceInterface (descriptor);
>     var result = this.Stop ();
>     reply.WriteString (result);
>     return true;
>     }
>
>   case TransactionTest: {
>     data.EnforceInterface (descriptor);
>     var result = this.Test ();
>     reply.WriteInt (result);
>     return true;
>     }
>
>   }
>   return base.OnTransact (code, data, reply, flags);
> }

vs. gen/com/example/android/apis/app/IRemoteService.java:

> @Override public boolean onTransact(int code, android.os.Parcel data, android.os.Parcel reply, int flags) throws android.os.RemoteException
> {
>   switch (code)
>   {
>   case INTERFACE_TRANSACTION:
>     {
>     reply.writeString(DESCRIPTOR);
>     return true;
>     }
>   case TRANSACTION_registerCallback:
>     {
>     data.enforceInterface(DESCRIPTOR);
>     com.example.android.apis.app.IRemoteServiceCallback _arg0;
>     _arg0 = com.example.android.apis.app.IRemoteServiceCallback.Stub.asInterface(data.readStrongBinder());
>     this.registerCallback(_arg0);
>     reply.writeNoException();
>     return true;
>     }
>   case TRANSACTION_unregisterCallback:
>     {
>     data.enforceInterface(DESCRIPTOR);
>     com.example.android.apis.app.IRemoteServiceCallback _arg0;
>     _arg0 = com.example.android.apis.app.IRemoteServiceCallback.Stub.asInterface(data.readStrongBinder());
>     this.unregisterCallback(_arg0);
>     reply.writeNoException();
>     return true;
>     }
>   }
>   return super.onTransact(code, data, reply, flags);
> }

One interesting difference is that the Java code is calling `reply.writeNoException()`, while the C# code is NOT. I wonder if this difference could be responsible for the observed behavior.
Comment 14 Waldemar Zubik 2014-03-27 05:40:56 UTC
That might be a reason why the solution is not working.
If we're not writing an info about exception to Parcel object on service process side, then we shouldn't be able to obtain it on client process side.

I'm going to do some investigation on that. 
I'll try to put a breakpoint before readException method and will inject an info about exception using writeNoException method. 

I don't think there is a difference between adding an exception info on client or service side. Parcel is serialized and deserialized during communication process so it should look exactly the same on both sides.

If this will work then Your idea would be a potential solution for that issue.
Comment 15 Waldemar Zubik 2014-03-27 06:37:28 UTC
I made some tests to Parcel object.

1.
I put a breakpoint after remote.Transact method and I've recreated a __reply object as described below:
__reply = global::Android.OS.Parcel.Obtain ();
__reply.WriteNoException();
__reply.WriteInt(34);

After this I was able to execute the rest of code with success and I was getting result of 34.
__reply.ReadException ();
__result = __reply.ReadInt ();

On the other hand if I miss to invoke WirteNoException method in above test I'm getting the same exception as the one thrown in real scenario.

2.
What wasn't working is when I was trying to call WriteNoException on existing __reply object that was returned from transact method.
I think this solution wasn't working becasue information about exception should be placed in front of result data. I think this is connected with description summary of that method
"Special function for writing information at the front of the Parcel indicating that no exception occurred."



I'm trying to match those test with below stack trace and think that the exception occurs becasue we're trying to read exception info which is null because we didn't provide any by avoiding to call writenoexception

> I/MonoDroid(10305): java.lang.RuntimeException: Unknown exception code: 9 msg null
> I/MonoDroid(10305):     at android.os.Parcel.readException(Parcel.java:1477)
> I/MonoDroid(10305):     at android.os.Parcel.readException(Parcel.java:1419)
> I/MonoDroid(10305):     at mono.android.view.View_OnClickListenerImplementor.n_onClick(Native Method)
> I/MonoDroid(10305):     at mono.android.view.View_OnClickListenerImplementor.onClick(View_OnClickListenerImplementor.java:29)
> I/MonoDroid(10305):     at android.view.View.performClick(View.java:4438)
> I/MonoDroid(10305):     at android.view.View$PerformClick.run(View.java:18422)
> I/MonoDroid(10305):     at android.os.Handler.handleCallback(Handler.java:733)
> I/MonoDroid(10305):     at android.os.Handler.dispatchMessage(Handler.java:95)
> I/MonoDroid(10305):     at android.os.Looper.loop(Looper.java:136)
> I/MonoDroid(10305):     at android.app.ActivityThread.main(ActivityThread.java:5017)
> I/MonoDroid(10305):     at java.lang.reflect.Method.invoke(Native Method)
> I/MonoDroid(10305):     at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:779)
> I/MonoDroid(10305):     at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:595)
Comment 16 Atsushi Eno 2014-03-27 15:32:58 UTC
jonp: you are indeed confused on the entire point of comment #10: monodroid-samples/SampleServices does NOT involve any *.aidl AND the same problem on process:* occurs. That's why I wrote AIDL support is not involved.

SamplesServices and AIDLDemo are not simply comparable, yes, and has no impact on the fact above.
Comment 17 Jonathan Pryor 2014-04-11 12:10:55 UTC
Fixed in monodroid/7bd41d8b
Comment 18 Saurabh 2014-07-04 08:35:51 UTC
I have checked this issue  with following builds:

X.S 5.2 (Build 179)
X.Android 4.14.0-45

I have debug the application after changing [Service] with [Service (Process = ":serviceProcess")] in
AdditionCervice.cs now application working properly and I am successfully able to calculate numbers.

Hence closing this issue.