Xamarin.ios 设备锁定后调用webservice时发生异常

Xamarin.ios 设备锁定后调用webservice时发生异常,xamarin.ios,Xamarin.ios,我使用返回XML的web服务从web请求内容。 只要设备未锁定,此操作就可以正常工作。如果用户关闭设备或在配置的超时后锁定设备,则Web服务将失败。我在这里附加了stacktrace。 我想知道的是:在我的测试应用程序中,我并没有对webservice(称为ViaSOAP)的结果做任何事情。但它还是崩溃了,试图称之为“mprotect”之类的东西。问题是什么?如果设备被锁定,我如何保持应用程序运行? 我一直认为锁定不同于推到后台-应用程序应该保持活动状态 我发现“错误12”的意思是“内存不足”,

我使用返回XML的web服务从web请求内容。 只要设备未锁定,此操作就可以正常工作。如果用户关闭设备或在配置的超时后锁定设备,则Web服务将失败。我在这里附加了stacktrace。 我想知道的是:在我的测试应用程序中,我并没有对webservice(称为ViaSOAP)的结果做任何事情。但它还是崩溃了,试图称之为“mprotect”之类的东西。问题是什么?如果设备被锁定,我如何保持应用程序运行? 我一直认为锁定不同于推到后台-应用程序应该保持活动状态

我发现“错误12”的意思是“内存不足”,但事实并非如此。如果设备未锁定,测试应用程序将持续数小时。一旦它锁定,它就会执行另一个请求并崩溃。此外,仪器显示了40MB的恒定内存使用量(如卢克的问题:)

M保护在0x5F5500(长度1396736)处失败,错误号为12
Apr 27 20:25:54未知UIKIT应用程序:iostest[0x9bc1][649]:堆栈跟踪:
Apr 27 20:25:54未知UIKIT应用程序:iostest[0x9bc1][649]:at(包装管理为本机)string.internalallocatest(int)
Apr 27 20:25:54未知UIKIT应用程序:iostest[0x9bc1][649]:位于System.Text.StringBuilder.InternalEnsureCapacity(int)
Apr 27 20:25:54未知UIKIT应用程序:iostest[0x9bc1][649]:位于System.Text.StringBuilder.Append(char)
Apr 27 20:25:54未知UIKIT应用程序:iostest[0x9bc1][649]:位于Mono.Xml2.XmlTextReader.ReadText(bool)
Apr 27 20:25:54未知UIKIT应用程序:iostest[0x9bc1][649]:位于Mono.Xml2.XmlTextReader.ReadContent()
Apr 27 20:25:54未知UIKIT应用程序:iostest[0x9bc1][649]:位于Mono.Xml2.XmlTextReader.Read()
Apr 27 20:25:54未知UIKIT应用程序:iostest[0x9bc1][649]:位于System.Xml.XmlTextReader.Read()
Apr 27 20:25:54未知UIKIT应用程序:iostest[0x9bc1][649]:位于System.Xml.XmlReader.ReadElementString()
Apr 27 20:25:54未知UIKIT应用程序:iostest[0x9bc1][649]:位于System.Xml.Serialization.XmlSerializationReaderInterpreter.ReadPrimitiveValue(System.Xml.Serialization.XmlTypeMapElementInfo)
Apr 27 20:25:54未知UIKIT应用程序:iostest[0x9bc1][649]:位于System.Xml.Serialization.XmlSerializationReaderInterpreter.ReadObjectElement(System.Xml.Serialization.XmlTypeMapElementInfo)
Apr 27 20:25:54未知UIKIT应用程序:iostest[0x9bc1][649]:位于System.Xml.Serialization.XmlSerializationReaderInterpreter.ReadMembers(System.Xml.Serialization.ClassMap,object,bool,bool)
Apr 27 20:25:54未知UIKIT应用程序:iostest[0x9bc1][649]:位于System.Xml.Serialization.XmlSerializationReaderInterpreter.ReadMessage(System.Xml.Serialization.XmlMembersMapping)
Apr 27 20:25:54未知UIKIT应用程序:iostest[0x9bc1][649]:位于System.Xml.Serialization.XmlSerializationReaderInterpreter.ReadRoot()
Apr 27 20:25:54未知UIKIT应用程序:iostest[0x9bc1][649]:位于System.Xml.Serialization.XmlSerializer.Deserialize(System.Xml.Serialization.XmlSerializationReader)
Apr 27 20:25:54未知UIKIT应用程序:iostest[0x9bc1][649]:位于System.Xml.Serialization.XmlSerializer.Deserialize(System.Xml.XmlReader)
Apr 27 20:25:54未知UIKIT应用程序:iostest[0x9bc1][649]:位于System.Web.Services.Protocols.WebServiceHelper.ReadSoapMessage(System.Xml.XmlTextReader,System.Xml.Serialization.XMLSerializator,System.Xml.Serialization.XMLSerializator,bool,object&,System.Web.Services.Protocols.SoapHeaderCollection&)
4月27日20:25:54未知UIKIT应用程序:iostest[0x9bc1][649]:位于System.Web.Services.Protocols.WebServiceHelper.ReadSoapMessage(System.Xml.XmlTextReader,System.Web.Services.Protocols.SoapMethodStubInfo,System.Web.Services.Protocols.SoapHeaderDirection,bool,object&,System.Web.Services.Protocols.SoapHeaderCollection&)
Apr 27 20:25:54未知UIKIT应用程序:iostest[0x9bc1][649]:位于System.Web.Services.Protocols.SoapHttpClientProtocol.ReceiverResponse(System.Net.WebResponse,System.Web.Services.Protocols.SoapClientMessage,System.Web.Services.Protocols.SoapExtension[])
Apr 27 20:25:54未知UIKIT应用程序:iostest[0x9bc1][649]:位于System.Web.Services.Protocols.SoapHttpClientProtocol.Invoke(字符串,对象[])
Apr 27 20:25:54未知UIKIT应用程序:iostest[0x9bc1][649]:位于iBrainloop.API210.API210.DMOGetChunked(字符串,int,int,bool,int)
Apr 27 20:25:54未知UIKIT应用程序:iostest[0x9bc1][649]:位于iostest.AppDelegate/c_uanonostorey1.m_u0()
Apr 27 20:25:54未知UIKIT应用程序:iostest[0x9bc1][649]:at(包装器运行时调用)object.runtime\u invoke\u dynamic(intptr、intptr、intptr、intptr)
Apr 27 20:25:54未知UIKIT应用程序:iostest[0x9bc1][649]:本机堆栈跟踪:
Apr 27 20:25:54未知UIKIT应用程序:iostest[0x9bc1][649]:0 iostest 0x006ada34 iostest+6998580
Apr 27 20:25:54未知UIKIT应用程序:iostest[0x9bc1][649]:1 iostest 0x006cc370 iostest+7123824
Apr 27 20:25:54未知UIKIT应用程序:iostest[0x9bc1][649]:2 libsystem_c.dylib 0x336b472f_sigtramp+42
Apr 27 20:25:54未知UIKIT应用程序:iostest[0x9bc1][649]:3 libsystem_c.dylib 0x336a93bb pthread_kill+58
Apr 27 20:25:54未知UIKIT应用程序:iostest[0x9bc1][649]:4 libsystem_c.dylib 0x336A1BF abort+78
Apr 27 20:25:54未知UIKIT应用程序:iostest[0x9bc1][649]:5 iostest 0x007ef40c iostest+8315916
4月27日20:25:54未知UIKIT应用程序:iostest[0x9bc1][649]:6 iostest 0x007e2b34 iostest+8264500
Apr 27 20:25:54未知UIKIT应用程序:iostest[0x9bc1][649]:7 iostest 0x007e281c iostest+8263708
Apr 27 20:25:54未知UIKIT应用程序:iostest[0x9bc1][649]:8 iostest 0x007e9150 iostest+8290640
四月二十七日20:25:54不知道
Mprotect failed at 0x5f55000 (length 1396736) with errno 12
Apr 27 20:25:54 unknown UIKitApplication:iostest[0x9bc1][649] <Notice>: Stacktrace:
Apr 27 20:25:54 unknown UIKitApplication:iostest[0x9bc1][649] <Notice>:   at (wrapper managed-to-native) string.InternalAllocateStr (int) <0xffffffff>
Apr 27 20:25:54 unknown UIKitApplication:iostest[0x9bc1][649] <Notice>:   at System.Text.StringBuilder.InternalEnsureCapacity (int) <0x000bc>
Apr 27 20:25:54 unknown UIKitApplication:iostest[0x9bc1][649] <Notice>:   at System.Text.StringBuilder.Append (char) <0x00047>
Apr 27 20:25:54 unknown UIKitApplication:iostest[0x9bc1][649] <Notice>:   at Mono.Xml2.XmlTextReader.ReadText (bool) <0x00117>
Apr 27 20:25:54 unknown UIKitApplication:iostest[0x9bc1][649] <Notice>:   at Mono.Xml2.XmlTextReader.ReadContent () <0x001fb>
Apr 27 20:25:54 unknown UIKitApplication:iostest[0x9bc1][649] <Notice>:   at Mono.Xml2.XmlTextReader.Read () <0x001a3>
Apr 27 20:25:54 unknown UIKitApplication:iostest[0x9bc1][649] <Notice>:   at System.Xml.XmlTextReader.Read () <0x000d7>
Apr 27 20:25:54 unknown UIKitApplication:iostest[0x9bc1][649] <Notice>:   at System.Xml.XmlReader.ReadElementString () <0x00067>
Apr 27 20:25:54 unknown UIKitApplication:iostest[0x9bc1][649] <Notice>:   at System.Xml.Serialization.XmlSerializationReaderInterpreter.ReadPrimitiveValue (System.Xml.Serialization.XmlTypeMapElementInfo) <0x000b3>
Apr 27 20:25:54 unknown UIKitApplication:iostest[0x9bc1][649] <Notice>:   at System.Xml.Serialization.XmlSerializationReaderInterpreter.ReadObjectElement (System.Xml.Serialization.XmlTypeMapElementInfo) <0x00083>
Apr 27 20:25:54 unknown UIKitApplication:iostest[0x9bc1][649] <Notice>:   at System.Xml.Serialization.XmlSerializationReaderInterpreter.ReadMembers (System.Xml.Serialization.ClassMap,object,bool,bool) <0x0140f>
Apr 27 20:25:54 unknown UIKitApplication:iostest[0x9bc1][649] <Notice>:   at System.Xml.Serialization.XmlSerializationReaderInterpreter.ReadMessage (System.Xml.Serialization.XmlMembersMapping) <0x0037b>
Apr 27 20:25:54 unknown UIKitApplication:iostest[0x9bc1][649] <Notice>:   at System.Xml.Serialization.XmlSerializationReaderInterpreter.ReadRoot () <0x00153>
Apr 27 20:25:54 unknown UIKitApplication:iostest[0x9bc1][649] <Notice>:   at System.Xml.Serialization.XmlSerializer.Deserialize (System.Xml.Serialization.XmlSerializationReader) <0x000cb>
Apr 27 20:25:54 unknown UIKitApplication:iostest[0x9bc1][649] <Notice>:   at System.Xml.Serialization.XmlSerializer.Deserialize (System.Xml.XmlReader) <0x00073>
Apr 27 20:25:54 unknown UIKitApplication:iostest[0x9bc1][649] <Notice>:   at System.Web.Services.Protocols.WebServiceHelper.ReadSoapMessage (System.Xml.XmlTextReader,System.Xml.Serialization.XmlSerializer,System.Xml.Serialization.XmlSerializer,bool,object&,System.Web.Services.Protocols.SoapHeaderCollection&) <0x00277>
Apr 27 20:25:54 unknown UIKitApplication:iostest[0x9bc1][649] <Notice>:   at System.Web.Services.Protocols.WebServiceHelper.ReadSoapMessage (System.Xml.XmlTextReader,System.Web.Services.Protocols.SoapMethodStubInfo,System.Web.Services.Protocols.SoapHeaderDirection,bool,object&,System.Web.Services.Protocols.SoapHeaderCollection&) <0x0007b>
Apr 27 20:25:54 unknown UIKitApplication:iostest[0x9bc1][649] <Notice>:   at System.Web.Services.Protocols.SoapHttpClientProtocol.ReceiveResponse (System.Net.WebResponse,System.Web.Services.Protocols.SoapClientMessage,System.Web.Services.Protocols.SoapExtension[]) <0x003fb>
Apr 27 20:25:54 unknown UIKitApplication:iostest[0x9bc1][649] <Notice>:   at System.Web.Services.Protocols.SoapHttpClientProtocol.Invoke (string,object[]) <0x00353>
Apr 27 20:25:54 unknown UIKitApplication:iostest[0x9bc1][649] <Notice>:   at iBrainloop.API210.API210.DMOGetChunked (string,int,int,bool,int) <0x00157>
Apr 27 20:25:54 unknown UIKitApplication:iostest[0x9bc1][649] <Notice>:   at iOSTest.AppDelegate/<FinishedLaunching>c__AnonStorey1.<>m__0 () <0x00217>
Apr 27 20:25:54 unknown UIKitApplication:iostest[0x9bc1][649] <Notice>:   at (wrapper runtime-invoke) object.runtime_invoke_dynamic (intptr,intptr,intptr,intptr) <0x000c3>
Apr 27 20:25:54 unknown UIKitApplication:iostest[0x9bc1][649] <Notice>: Native stacktrace:
Apr 27 20:25:54 unknown UIKitApplication:iostest[0x9bc1][649] <Notice>:     0   iOSTest                             0x006ada34 iOSTest + 6998580
Apr 27 20:25:54 unknown UIKitApplication:iostest[0x9bc1][649] <Notice>:     1   iOSTest                             0x006cc370 iOSTest + 7123824
Apr 27 20:25:54 unknown UIKitApplication:iostest[0x9bc1][649] <Notice>:     2   libsystem_c.dylib                   0x336b472f _sigtramp + 42
Apr 27 20:25:54 unknown UIKitApplication:iostest[0x9bc1][649] <Notice>:     3   libsystem_c.dylib                   0x336a93bb pthread_kill + 58
Apr 27 20:25:54 unknown UIKitApplication:iostest[0x9bc1][649] <Notice>:     4   libsystem_c.dylib                   0x336a1bff abort + 78
Apr 27 20:25:54 unknown UIKitApplication:iostest[0x9bc1][649] <Notice>:     5   iOSTest                             0x007ef40c iOSTest + 8315916
Apr 27 20:25:54 unknown UIKitApplication:iostest[0x9bc1][649] <Notice>:     6   iOSTest                             0x007e2b34 iOSTest + 8264500
Apr 27 20:25:54 unknown UIKitApplication:iostest[0x9bc1][649] <Notice>:     7   iOSTest                             0x007e281c iOSTest + 8263708
Apr 27 20:25:54 unknown UIKitApplication:iostest[0x9bc1][649] <Notice>:     8   iOSTest                             0x007e9150 iOSTest + 8290640
Apr 27 20:25:54 unknown UIKitApplication:iostest[0x9bc1][649] <Notice>:     9   iOSTest                             0x007e97f4 iOSTest + 8292340
Apr 27 20:25:54 unknown UIKitApplication:iostest[0x9bc1][649] <Notice>:     10  iOSTest                             0x007e9ad4 iOSTest + 8293076
Apr 27 20:25:54 unknown UIKitApplication:iostest[0x9bc1][649] <Notice>:     11  iOSTest                             0x00778324 iOSTest + 7828260
Apr 27 20:25:54 unknown UIKitApplication:iostest[0x9bc1][649] <Notice>:     12  iOSTest                             0x00778794 iOSTest + 7829396
Apr 27 20:25:54 unknown UIKitApplication:iostest[0x9bc1][649] <Notice>:     13  iOSTest                             0x00794d04 iOSTest + 7945476
Apr 27 20:25:54 unknown UIKitApplication:iostest[0x9bc1][649] <Notice>:     14  iOSTest                             0x0037d39c iOSTest + 3654556
Apr 27 20:25:54 unknown UIKitApplication:iostest[0x9bc1][649] <Notice>: =================================================================
Apr 27 20:25:54 unknown UIKitApplication:iostest[0x9bc1][649] <Notice>: Got a SIGABRT while executing native code. This usually indicates
Apr 27 20:25:54 unknown UIKitApplication:iostest[0x9bc1][649] <Notice>: a fatal error in the mono runtime or one of the native libraries 
Apr 27 20:25:54 unknown UIKitApplication:iostest[0x9bc1][649] <Notice>: used by your application.
Apr 27 20:25:54 unknown UIKitApplication:iostest[0x9bc1][649] <Notice>: =================================================================
Apr 27 20:25:54 unknown ReportCrash[651] <Notice>: Formulating crash report for process iOSTest[649]
Apr 27 20:25:54 unknown com.apple.launchd[1] <Warning>: (UIKitApplication:iostest[0x9bc1]) Job appears to have crashed: Abort trap: 6
Apr 27 20:25:54 unknown SpringBoard[479] <Warning>: Application 'iOSTest' exited abnormally with signal 6: Abort trap: 6
Apr 27 20:25:54 unknown ReportCrash[651] <Error>: libMobileGestalt loadBasebandMobileEquipmentInfo: CommCenter error: 1:45
Apr 27 20:25:54 unknown ReportCrash[651] <Error>: libMobileGestalt copyInternationalMobileEquipmentIdentity: Could not get mobile equipment info dictionary
Apr 27 20:25:54 unknown ReportCrash[651] <Error>: libMobileGestalt copyInternationalMobileEquipmentIdentity: Could not get mobile equipment info dictionary
Apr 27 20:25:54 unknown ReportCrash[651] <Error>: Saved crashreport to /var/mobile/Library/Logs/CrashReporter/iOSTest_2011-04-27-202554_iPad-Fuji-ID-0240.plist using uid: 0 gid: 0, synthetic_euid: 501 egid: 0