[Mono-bugs] [Bug 650956] New: Application crash on Webservice request.

bugzilla_noreply at novell.com bugzilla_noreply at novell.com
Wed Nov 3 08:58:53 EDT 2010


https://bugzilla.novell.com/show_bug.cgi?id=650956

https://bugzilla.novell.com/show_bug.cgi?id=650956#c0


           Summary: Application crash on Webservice request.
    Classification: Mono
           Product: MonoDroid
           Version: SVN
          Platform: PC
        OS/Version: Windows 7
            Status: NEW
          Severity: Critical
          Priority: P5 - None
         Component: Runtime
        AssignedTo: mkestner at novell.com
        ReportedBy: willemm at infosupport.com
         QAContact: mono-bugs at lists.ximian.com
          Found By: ---
           Blocker: ---


User-Agent:       Mozilla/5.0 (compatible; MSIE 9.0; Windows NT 6.1; WOW64;
Trident/5.0)

I'm trying to invoke a basic SOAP http service using a legacy .NET 2.0 web
service reference generated proxy.

I can invoke the service, but when the response comes back in the async
callback, the application crashes. The following log entries are generated
during the crash.

D/dalvikvm( 1104): GREF has increased to 201
D/dalvikvm(  119): GC_EXPLICIT freed 994 objects / 50768 bytes in 97ms
D/dalvikvm(  301): GC_EXPLICIT freed 27 objects / 1360 bytes in 85ms
V/WaarIsIe( 1104): Service URI for domain service:
http://10.0.2.2:1082/Services/MobileBackofficeApplication-Web-AuthenticationDomainService.svc/Soap
V/WhereIsItActivity( 1104): Invoking authentication service
W/ActivityManager(   60): Launch timeout has expired, giving up wake lock!
W/ActivityManager(   60): Activity idle timeout for HistoryRecord{43f81718
WaarIsIe.WaarIsIe/waarIsIe.WhereIsItActivity}
E/mono    ( 1104): [0x6963c0:] EXCEPTION handling:
System.Net.Sockets.SocketException: An address incompatible with the requested
protocol was used
F/Mono.Android( 1104): Unable to get JNI Environment pointer!
D/Zygote  (   33): Process 1104 exited cleanly (255)
I/ActivityManager(   60): Process WaarIsIe.WaarIsIe (pid 1104) has died.
I/WindowManager(   60): WIN DEATH: Window{43ffd5b8
WaarIsIe.WaarIsIe/waarIsIe.WhereIsItActivity paused=false}
I/UsageStats(   60): Unexpected resume of com.android.launcher while already
resumed in WaarIsIe.WaarIsIe
W/InputManagerService(   60): Got RemoteException sending setActive(false)
notification to pid 1104 uid 10033

Reproducible: Always

Steps to Reproduce:
1. Add a webservice reference
2. Use an async call to invoke the webservice
3. Invoke the End... method on the proxy inside the callback method specified
in the initial call to the webservice.
Actual Results:  
Application crash

Expected Results:  
Got a response from the webservice.

The following code is causing the issues:

/// <summary>
/// Loads the assets from the webserver
/// </summary>
private void LoadAssets()
{
    if (!_settings.IsValid())
    {
        Log.V(typeof(WhereIsItActivity).Name, "Settings are invalid. Skipping
service call");
        return;
    }

    // Get the authentication service proxy and link a new cookie container to
it.
    // This cookie container will contain the authentication cookie gotten from
the logon call.
    var authenticationService =
ServiceFactory.GetAuthenticationDomainService(this.BaseContext); //
Instantiates the service proxy with a valid URI.
    authenticationService.CookieContainer = new CookieContainer();

    try
    {
        Log.V(typeof(WhereIsItActivity).Name, "Invoking authentication
service");

        // Perform the logon call
        authenticationService.BeginLogin(_settings.UserName,
_settings.Password, false, false,
            null, OnAuthenticationCompleted, authenticationService);
    }
    catch (Java.Lang.Exception ex)
    {
        //TODO:
    }
}   

private void OnAuthenticationCompleted(IAsyncResult ar)
{
    try
    {
        ServiceAgents.Authentication.AuthenticationDomainService
authenticationService = 
           
(ServiceAgents.Authentication.AuthenticationDomainService)ar.AsyncState;

        var result = authenticationService.EndLogin(ar);

        Log.V(typeof(WhereIsItActivity).Name, "Got response from the
authentication service");

        // Check if the user was succesfully logged on.
        if ((result.RootResults != null && result.RootResults.Length == 0) ||
result.RootResults == null)
        {
            DisplayAuthenticationError();
        }

        // Construct the domain service proxy and keep the cookie container
with
        // the authentication cookie gotten from the logon call.
        var domainService =
ServiceFactory.GetWaarIsIeDomainService(this.BaseContext);
        domainService.CookieContainer = authenticationService.CookieContainer;

        Log.V(typeof(WhereIsItActivity).Name, "Invoking WaarIsI domain
service");

        domainService.BeginGetAssets(OnGetAssetsCompleted, domainService);
    }
    catch (Java.Lang.Exception ex)
    {
        //TODO:
    }
}

-- 
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