Bug 12524 - Crash when SOAPClient (attached) sends a TCP-package with a set Reset flag
Summary: Crash when SOAPClient (attached) sends a TCP-package with a set Reset flag
Status: NEW
Alias: None
Product: Class Libraries
Classification: Mono
Component: System.Web.Services ()
Version: 2.10.x
Hardware: Macintosh Mac OS
: Normal normal
Target Milestone: Untriaged
Assignee: Bugzilla
URL:
Depends on:
Blocks:
 
Reported: 2013-06-03 14:09 UTC by Pierce Boggan [MSFT]
Modified: 2013-06-25 04:29 UTC (History)
3 users (show)

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


Attachments
Wireshark trace (19.36 KB, application/octet-stream)
2013-06-03 14:10 UTC, Pierce Boggan [MSFT]
Details
Test case from customer (7.69 MB, application/zip)
2013-06-03 14:11 UTC, Pierce Boggan [MSFT]
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 for Bug 12524 on GitHub or Developer Community if you have new information to add and do not yet see a matching new report.

If the latest results still closely match this report, you can use the original description:

  • Export the original title and description: GitHub Markdown or Developer Community HTML
  • Copy the title and description into the new report. Adjust them to be up-to-date if needed.
  • Add your new information.

In special cases on GitHub you might also want the comments: GitHub Markdown with public comments

Related Links:
Status:
NEW

Description Pierce Boggan [MSFT] 2013-06-03 14:09:34 UTC
Situation:
-1 Soapserver (ASP.Net) running in a service.
-1 Mobile app running on a device.
-Mobile app is programmed to queue all SOAP requests and execute them
sequential(event driven for returning data).
- After a while it crashes. (When the reset flag is set)

Problem:
When the SOAPClient sends a TCP-package with a set Reset flag, the client
crashes in a part I can't edit..

Exception:
$exception {System.Xml.XmlException: 'VehicleStartStop' is expected Line
1, position 7005.
at Mono.Xml2.XmlTextReader.Expect (System.String expected) [0x00000] in
<filename unknown>:0
at Mono.Xml2.XmlTextReader.ReadEndTag () [0x00000] in <filename
unknown>:0
at Mono.Xml2.XmlTextReader.ReadContent () [0x00000] in <filename
unknown>:0
at Mono.Xml2.XmlTextReader.Read () [0x00000] in <filename unknown>:0
at System.Xml.XmlTextReader.Read () [0x00000] in <filename unknown>:0
at System.Xml.XmlSimpleDictionaryReader.Read () [0x00000] in <filename
unknown>:0
at System.Xml.XmlReader.ReadContentString (Boolean isText) [0x00000] in
<filename unknown>:0
at System.Xml.XmlReader.ReadContentString () [0x00000] in <filename
unknown>:0
at System.Xml.XmlReader.ReadContentAsString () [0x00000] in <filename
unknown>:0
at System.Xml.XmlDictionaryReader.ReadContentAsString (Int32
maxStringContentLength) [0x00000] in <filename unknown>:0
at System.Xml.XmlDictionaryReader.ReadContentAsString () [0x00000] in
<filename unknown>:0
at System.Xml.XmlDictionaryReader.ReadElementContentAsString () [0x00000]
in <filename unknown>:0
at
System.Runtime.Serialization.XmlFormatterDeserializer.DeserializePrimitive
(System.Type type, System.Xml.XmlReader reader, System.Xml.XmlQualifiedName
qname) [0x00000] in <filename unknown>:0
at System.Runtime.Serialization.XmlFormatterDeserializer.Deserialize
(System.Type type, System.Xml.XmlReader reader) [0x00000] in <filename
unknown>:0
at System.Runtime.Serialization.SerializationMap.DeserializeContent
(System.Xml.XmlReader reader,
System.Runtime.Serialization.XmlFormatterDeserializer deserializer,
System.String id, Boolean empty) [0x00000] in <filename unknown>:0
at System.Runtime.Serialization.SerializationMap.DeserializeContent
(System.Xml.XmlReader reader,
System.Runtime.Serialization.XmlFormatterDeserializer deserializer,
System.String id) [0x00000] in <filename unknown>:0
at System.Runtime.Serialization.SerializationMap.DeserializeObject
(System.Xml.XmlReader reader,
System.Runtime.Serialization.XmlFormatterDeserializer deserializer)
[0x00000] in <filename unknown>:0
at System.Runtime.Serialization.XmlFormatterDeserializer.DeserializeByMap
(System.Xml.XmlQualifiedName name, System.Type type, System.Xml.XmlReader
reader) [0x00000] in <filename unknown>:0
at System.Runtime.Serialization.XmlFormatterDeserializer.Deserialize
(System.Type type, System.Xml.XmlReader reader) [0x00000] in <filename
unknown>:0
at System.Runtime.Serialization.CollectionTypeMap.DeserializeContent
(System.Xml.XmlReader reader,
System.Runtime.Serialization.XmlFormatterDeserializer deserializer,
System.String id) [0x00000] in <filename unknown>:0
at System.Runtime.Serialization.SerializationMap.DeserializeObject
(System.Xml.XmlReader reader,
System.Runtime.Serialization.XmlFormatterDeserializer deserializer)
[0x00000] in <filename unknown>:0
at System.Runtime.Serialization.XmlFormatterDeserializer.DeserializeByMap
(System.Xml.XmlQualifiedName name, System.Type type, System.Xml.XmlReader
reader) [0x00000] in <filename unknown>:0
at System.Runtime.Serialization.XmlFormatterDeserializer.Deserialize
(System.Type type, System.Xml.XmlReader reader) [0x00000] in <filename
unknown>:0
at System.Runtime.Serialization.SerializationMap.DeserializeContent
(System.Xml.XmlReader reader,
System.Runtime.Serialization.XmlFormatterDeserializer deserializer,
System.String id, Boolean empty) [0x00000] in <filename unknown>:0
at System.Runtime.Serialization.SerializationMap.DeserializeContent
(System.Xml.XmlReader reader,
System.Runtime.Serialization.XmlFormatterDeserializer deserializer,
System.String id) [0x00000] in <filename unknown>:0
at System.Runtime.Serialization.SerializationMap.DeserializeObject
(System.Xml.XmlReader reader,
System.Runtime.Serialization.XmlFormatterDeserializer deserializer)
[0x00000] in <filename unknown>:0
at System.Runtime.Serialization.XmlFormatterDeserializer.DeserializeByMap
(System.Xml.XmlQualifiedName name, System.Type type, System.Xml.XmlReader
reader) [0x00000] in <filename unknown>:0
at System.Runtime.Serialization.XmlFormatterDeserializer.Deserialize
(System.Type type, System.Xml.XmlReader reader) [0x00000] in <filename
unknown>:0
at System.Runtime.Serialization.SerializationMap.DeserializeContent
(System.Xml.XmlReader reader,
System.Runtime.Serialization.XmlFormatterDeserializer deserializer,
System.String id, Boolean empty) [0x00000] in <filename unknown>:0
at System.Runtime.Serialization.SerializationMap.DeserializeContent
(System.Xml.XmlReader reader,
System.Runtime.Serialization.XmlFormatterDeserializer deserializer,
System.String id) [0x00000] in <filename unknown>:0
at System.Runtime.Serialization.SerializationMap.DeserializeObject
(System.Xml.XmlReader reader,
System.Runtime.Serialization.XmlFormatterDeserializer deserializer)
[0x00000] in <filename unknown>:0
at System.Runtime.Serialization.XmlFormatterDeserializer.DeserializeByMap
(System.Xml.XmlQualifiedName name, System.Type type, System.Xml.XmlReader
reader) [0x00000] in <filename unknown>:0
at System.Runtime.Serialization.XmlFormatterDeserializer.Deserialize
(System.Type type, System.Xml.XmlReader reader) [0x00000] in <filename
unknown>:0
at System.Runtime.Serialization.XmlFormatterDeserializer.Deserialize
(System.Xml.XmlReader reader, System.Type declaredType,
System.Runtime.Serialization.KnownTypeCollection knownTypes,
IDataContractSurrogate surrogate,
System.Runtime.Serialization.DataContractResolver resolver,
System.Runtime.Serialization.DataContractResolver defaultResolver,
System.String name, System.String ns, Boolean verifyObjectName) [0x00000]
in <filename unknown>:0
at System.Runtime.Serialization.DataContractSerializer.ReadObject
(System.Xml.XmlDictionaryReader reader, Boolean verifyObjectName) [0x00000]
in <filename unknown>:0
at System.Runtime.Serialization.XmlObjectSerializer.ReadObject
(System.Xml.XmlDictionaryReader reader) [0x00000] in <filename unknown>:0
at
System.ServiceModel.Dispatcher.DataContractMessagesFormatter.ReadMessagePart
(System.ServiceModel.Description.MessagePartDescription part,
System.Xml.XmlDictionaryReader r) [0x00000] in <filename unknown>:0
at
System.ServiceModel.Dispatcher.DataContractMessagesFormatter.MessageToParts
(System.ServiceModel.Description.MessageDescription md,
System.ServiceModel.Channels.Message message) [0x00000] in <filename
unknown>:0
at System.ServiceModel.Dispatcher.BaseMessagesFormatter.DeserializeReply
(System.ServiceModel.Channels.Message message, System.Object[] parameters)
[0x00000] in <filename unknown>:0
at System.ServiceModel.Dispatcher.OperationFormatter.DeserializeReply
(System.ServiceModel.Channels.Message message, System.Object[] parameters)
[0x00000] in <filename unknown>:0
at System.ServiceModel.MonoInternal.ClientRuntimeChannel.Request
(System.ServiceModel.Description.OperationDescription od, System.Object[]
parameters) [0x00000] in <filename unknown>:0
at System.ServiceModel.MonoInternal.ClientRuntimeChannel.DoProcess
(System.Reflection.MethodBase method, System.String operationName,
System.Object[] parameters) [0x00000] in <filename unknown>:0
at System.ServiceModel.MonoInternal.ClientRuntimeChannel.Process
(System.Reflection.MethodBase method, System.String operationName,
System.Object[] parameters) [0x00000] in <filename unknown>:0
} System.Xml.XmlException


Version Information:
=== Xamarin Studio ===

Version 4.0.1 (build 9)
Installation UUID: f317d7e0-af7e-44bc-9eb1-06486c5e9e3a
Runtime:
Mono 2.10.11 (mono-2-10/2baeee2)
GTK 2.24.14
GTK# (2.12.0.0)
Package version: 210110000

=== Apple Developer Tools ===

Xcode 4.6 (2066)
Build 4H127

=== Xamarin.Mac ===

Xamarin.Mac: Not Installed

=== Xamarin.iOS ===

Version: 6.2.0.65 (Business Edition)

=== Xamarin.Android ===

Version: 4.6.0 (Starter Edition)
Android SDK: /Users/Bart/Library/Developer/Xamarin/android-sdk-mac_x86
Supported Android versions:
2.1 (API level 7)
2.2 (API level 8)
2.3 (API level 10)
3.1 (API level 12)
4.0 (API level 14)
Java SDK: /usr

=== Build Information ===

Git revision: Release ID: 400010009
4d204dd3370ed4de8ae6194b08208bcf11129eca
Build date: 2013-03-05 17:24:34+0000
Xamarin addins: 181e75e43f263f1c0783b9f7e32234cac6850998

=== Operating System ===

Mac OS X 10.8.3
Darwin NBK-NL-MAC.local 12.3.0 Darwin Kernel Version 12.3.0
Sun Jan 6 22:37:10 PST 2013
root:xnu-2050.22.13~1/RELEASE_X86_64 x86_64
Comment 2 Pierce Boggan [MSFT] 2013-06-03 14:10:29 UTC
Created attachment 4057 [details]
Wireshark trace
Comment 3 Pierce Boggan [MSFT] 2013-06-03 14:11:09 UTC
Created attachment 4058 [details]
Test case from customer
Comment 4 Pierce Boggan [MSFT] 2013-06-06 12:47:20 UTC
Exception is thrown with Android 2.3.3, but not 4.1.2 (crashes, but no exception)
Comment 5 Jonathan Pryor 2013-06-19 16:22:55 UTC
@Pierce:

Q1: Does this happen if you use desktop mono instead of Xamarin.Android?
Q2: How's Android 4.1.2 crash?
Q3: Can you please try with the Xamarin.Android 4.7.10 alpha?

Regardless, this appears to be WCF-related, and thus is prioritized accordingly.
Comment 6 Jeroen 2013-06-20 03:08:12 UTC
Q1: How to use desktop mono instead of Xamarin.Android?
Q2: The gui thread is aborted and the activity is closed without exception.
Q3: I'll try the alpha.
Comment 7 Jeroen 2013-06-20 03:42:30 UTC
After testing with the Alpha the following results show:

The activity doesn't crash anymore.
The debugging process crashes.
And propably the cookiecontainer is emptied which stores my sessionid for authentication.
Comment 8 Jonathan Pryor 2013-06-20 10:35:41 UTC
> Q2: The gui thread is aborted and the activity is closed without exception.

This would be due to the unhandled XmlException, which will abort the process.

> The activity doesn't crash anymore [with 4.7.10].

That's interesting. Is the XmlException still generated?

If the XmlException isn't generated, then it would appear that this bug is fixed in 4.7.10.

> The debugging process crashes.

You mean Visual Studio/Xamarin Studio crashes? That would be odd.

> Q1: How to use desktop mono instead of Xamarin.Android?

TestAppAndroid/TestAppAndroid/TestSoap.cs is generated code, from "Microsoft.Silverlight.ServiceReference", presumably SLsvcutil.exe. However you created that code, re-create it using svcutil.exe instead. That will give you "desktop-profile" WCF code.

Once you have "desktop-profile" WCF code, you can write a Console-based app which exercises the code, e.g. copy most of MainActivity.cs!OnCreate() into a Main() method.

(Basically you're removing the Silverlight-based dependencies and moving back to "normal" desktop dependencies.)

The result should be a command-line based app which pokes your SOAP service. Presumably it'll work Just Fine under .NET. ;-)

You can then install Mono on your desktop machine, and try running your app with `mono app.exe`:

http://www.go-mono.com/mono-downloads/download.html

Installing and running on Mono may be a bit much, but "rewriting" the app in terms of a desktop .NET app should be fairly straightforward.
Comment 9 Jeroen 2013-06-21 03:13:19 UTC
Q2: Android 4.1.2 didn't show an exception before, the activity did close on both tested android versions I tested. I hadn't got the oppertunity to test it with Android 2.3.3 which threw the xml exception.

The debugging process crashed in xamarin, the moment the reset flag was received. There is no error shown, the stop sign changes in the play sign though.

I'll try it out with desktop mono
Comment 10 Jeroen 2013-06-25 04:29:24 UTC
I tried it with desktop mono, it still generates a XMLException when the reset flag is set. Now the exception is catchable which wasn't with silverlight. With this I can create stable software.

With kind regards

Jereon van Eijk