https://bugzilla.novell.com/show_bug.cgi?id=666701
https://bugzilla.novell.com/show_bug.cgi?id=666701#c0 Summary: IntentService - RuntimeException Unable to instantiate service... Classification: Mono Product: MonoDroid Version: SVN Platform: Other OS/Version: Other Status: NEW Severity: Major Priority: P5 - None Component: Class Libraries AssignedTo: [email protected] ReportedBy: [email protected] QAContact: [email protected] Found By: --- Blocker: --- User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US) AppleWebKit/534.10 (KHTML, like Gecko) Chrome/8.0.552.237 Safari/534.10 I'm getting a fatal exception trying to use IntentService, no matter what I'm trying... jonp thought it was related to a previous bug Bug #655342 but I don't think this is the same issue, since the 'workaround' does not work in this case. using System; using System.Collections.Generic; using System.Linq; using System.Text; using Android.App; using Android.Content; using Android.OS; using Android.Runtime; using Android.Views; using Android.Widget; namespace MySample.IntentServiceSample { [Service] public class IntentServiceSample : IntentService { public IntentServiceSample() : base("intent-service-sample") //I've tried null, "", and other values { } protected override void OnHandleIntent(Intent intent) { Android.Util.Log.Info("INTENT_SERVICE", "Handled Intent...."); } } } I/ActivityManager( 3188): Displayed activity mysample.intentservice/mysample.intentservicesample.MainActivity: 3935 ms (total 3935 ms) V/InputDevice( 3188): ID[0]=0(0) Dn(0=>1) V/WindowManager( 3188): Dsptch > Window{47f28570 mysample.intentservice/mysample.intentservicesample.MainActivity paused=false} V/InputDevice( 3188): ID[0]=0(0) Up(1=>0) V/WindowManager( 3188): Dsptch > Window{47f28570 mysample.intentservice/mysample.intentservicesample.MainActivity paused=false} D/dalvikvm( 8400): newInstance failed: no <init>() D/dalvikvm( 8400): GC_FOR_MALLOC freed 8195 objects / 401992 bytes in 37ms D/AndroidRuntime( 8400): Shutting down VM W/dalvikvm( 8400): threadid=1: thread exiting with uncaught exception (group=0x4001d7d0) E/AndroidRuntime( 8400): FATAL EXCEPTION: main E/AndroidRuntime( 8400): java.lang.RuntimeException: Unable to instantiate service mysample.intentservicesample.IntentServiceSample: java.lang.InstantiationException: mysample.intentservicesample.IntentServiceSample E/AndroidRuntime( 8400): at android.app.ActivityThread.handleCreateService(ActivityThread.java:2943) E/AndroidRuntime( 8400): at android.app.ActivityThread.access$3300(ActivityThread.java:125) E/AndroidRuntime( 8400): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2087) E/AndroidRuntime( 8400): at android.os.Handler.dispatchMessage(Handler.java:99) E/AndroidRuntime( 8400): at android.os.Looper.loop(Looper.java:123) E/AndroidRuntime( 8400): at android.app.ActivityThread.main(ActivityThread.java:4627) E/AndroidRuntime( 8400): at java.lang.reflect.Method.invokeNative(Native Method) E/AndroidRuntime( 8400): at java.lang.reflect.Method.invoke(Method.java:521) E/AndroidRuntime( 8400): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:858) E/AndroidRuntime( 8400): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:616) E/AndroidRuntime( 8400): at dalvik.system.NativeStart.main(Native Method) E/AndroidRuntime( 8400): Caused by: java.lang.InstantiationException: mysample.intentservicesample.IntentServiceSample E/AndroidRuntime( 8400): at java.lang.Class.newInstanceImpl(Native Method) E/AndroidRuntime( 8400): at java.lang.Class.newInstance(Class.java:1429) E/AndroidRuntime( 8400): at android.app.ActivityThread.handleCreateService(ActivityThread.java:2940) E/AndroidRuntime( 8400): ... 10 more W/ActivityManager( 3188): Force finishing activity mysample.intentservice/mysample.intentservicesample.MainActivity I/( 3188): dumpmesg > /data/log/dumpstate_app_error.log I/dumpstate( 8423): begin W/PowerManagerService( 3188): Timer 0x3->0x3|0x1 D/VoldCmdListener( 2865): asec list I/dumpstate( 8423): done The dumpstate_app_error.log has nothing more useful, it just shows the stacktrace the same as I've pasted above.... Reproducible: Always -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the QA contact for the bug. _______________________________________________ mono-bugs maillist - [email protected] http://lists.ximian.com/mailman/listinfo/mono-bugs
