[Mono-bugs] [Bug 654522] New: Application Initialization Fails When ContentProvider Referenced in AndroidManifest.xml

bugzilla_noreply at novell.com bugzilla_noreply at novell.com
Wed Nov 17 22:56:23 EST 2010



           Summary: Application Initialization Fails When ContentProvider
                    Referenced in AndroidManifest.xml
    Classification: Mono
           Product: MonoDroid
           Version: unspecified
          Platform: All
        OS/Version: Windows 7
            Status: NEW
          Severity: Major
          Priority: P5 - None
         Component: Runtime
        AssignedTo: mkestner at novell.com
        ReportedBy: danomania at gmail.com
         QAContact: mono-bugs at lists.ximian.com
          Found By: ---
           Blocker: ---

Created an attachment (id=400979)
 --> (http://bugzilla.novell.com/attachment.cgi?id=400979)
Sample application that demonstrates bug

User-Agent:       Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US; rv:
Gecko/20101026 Firefox/3.6.12

When a ContentProvider is implemented in an application, initialization fails
when the application is run in an emulator (F5 or Ctrl-F5).

This is the case whether the //application/provider tag in the
AndroidManifest.xml was generated via the ContentProviderAttribute or if it was
added manually.

Reproducible: Always

Steps to Reproduce:
1. Create a new MonoDroid Application
2. Add a new class that inherits ContentProvider to the project
3. Implement the abstract methods for the new class
4. Decorate the class with a ContentProviderAttribute
5. Hit F5 or Ctrl-F5 to run the application in an emulator
3. Notice that it fails with an error with a force close prompt

A sample application is attached that demonstrates the problem (Note that this
is a stripped-down version. In the actual application, the content provider is
fully implemented as ported from a working Eclipse project)

Actual Results:  
The application fails to initialize in the emulator. The Android Device Logging
window provides the following data:

D/AndroidRuntime(  284): >>>>>>>>>>>>>> AndroidRuntime START <<<<<<<<<<<<<<
D/AndroidRuntime(  284): CheckJNI is ON
D/AndroidRuntime(  284): --- registering native functions ---
I/ActivityManager(   60): Starting activity: Intent {
act=android.intent.action.MAIN flg=0x10000000
cmp=com.example.contentprovidersandbox/.Activity1 }
D/AndroidRuntime(  284): Shutting down VM
D/jdwp    (  284): adbd disconnected
I/AndroidRuntime(  284): NOTE: attach of thread 'Binder Thread #3' failed
I/ActivityManager(   60): Start proc com.example.contentprovidersandbox for
activity com.example.contentprovidersandbox/.Activity1: pid=291 uid=10034
I/ARMAssembler(   60): generated scanline__00000077:03545404_00000004_00000000
[ 47 ipp] (67 ins) at [0x2dd400:0x2dd50c] in 5584769 ns
I/ActivityThread(  291): Publishing provider
W/dalvikvm(  291): No implementation found for native
W/dalvikvm(  291): Exception Ljava/lang/UnsatisfiedLinkError; thrown during
W/dalvikvm(  291): Class init failed in newInstance call
D/AndroidRuntime(  291): Shutting down VM
W/dalvikvm(  291): threadid=1: thread exiting with uncaught exception
E/AndroidRuntime(  291): FATAL EXCEPTION: main
E/AndroidRuntime(  291): java.lang.ExceptionInInitializerError
E/AndroidRuntime(  291):     at java.lang.Class.newInstanceImpl(Native Method)
E/AndroidRuntime(  291):     at java.lang.Class.newInstance(Class.java:1429)
E/AndroidRuntime(  291):     at
E/AndroidRuntime(  291):     at
E/AndroidRuntime(  291):     at
E/AndroidRuntime(  291):     at
E/AndroidRuntime(  291):     at
E/AndroidRuntime(  291):     at
E/AndroidRuntime(  291):     at android.os.Looper.loop(Looper.java:123)
E/AndroidRuntime(  291):     at
E/AndroidRuntime(  291):     at java.lang.reflect.Method.invokeNative(Native
E/AndroidRuntime(  291):     at
E/AndroidRuntime(  291):     at
E/AndroidRuntime(  291):     at
E/AndroidRuntime(  291):     at dalvik.system.NativeStart.main(Native Method)
E/AndroidRuntime(  291): Caused by: java.lang.UnsatisfiedLinkError: register
E/AndroidRuntime(  291):     at mono.android.Runtime.register(Native Method)
E/AndroidRuntime(  291):     at
E/AndroidRuntime(  291):     ... 15 more
W/ActivityManager(   60):   Force finishing activity
I/ARMAssembler(   60): generated scanline__00000077:03515104_00000000_00000000
[ 33 ipp] (47 ins) at [0x35d500:0x35d5bc] in 556086 ns
W/ActivityManager(   60): Activity pause timeout for HistoryRecord{44f6f0c0
W/ActivityManager(   60): Activity destroy timeout for HistoryRecord{44f6f0c0
I/Process (  291): Sending signal. PID: 291 SIG: 9
I/ActivityManager(   60): Process com.example.contentprovidersandbox (pid 291)
has died.
W/InputManagerService(   60): Window already focused, ignoring focus gain of:
com.android.internal.view.IInputMethodClient$Stub$Proxy at 44ee8dc8

Expected Results:  
The application should initialize normally.

Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.

More information about the mono-bugs mailing list