iPhone应用程序崩溃与Mprotect失败错误(MonoTouch) [英] iPhone application crashes with Mprotect failed error (MonoTouch)

查看:179
本文介绍了iPhone应用程序崩溃与Mprotect失败错误(MonoTouch)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用MonoTouch开发的iPhone应用程序有问题。

我正在开发一个联系WCF服务的应用程序,当WCF服务回复时,我用返回的数据更新UITableView,完成后,它会发送一个新的WCF异步调用,当它回复时,它会再次更新表,依此类推。

I have a problem with my iPhone application developed with MonoTouch.
I am developing an application that contacts a WCF Service, and when the WCF Service answer back, I update an UITableView with the returned data, when this is done it sends a new WCF async call, and when it answer back it updates the table again and so on.

问题在于,当它在不同的时间内完成此操作时,它会因Mprotect失败错误12而崩溃。这只会在应用程序直接运行时发生手机而不是模拟器。

The problem is that when it has done this in a variable amount of time, it crashes with an Mprotect failed error 12. This only happens when the application is running directly on the phone and not in the simulator.

我试图在发布表更新的地方发表评论,并在向WCF服务发送下一个异步请求之前创建一个Thread.Sleep(1000),但是仍然是相同的错误,但可以运行更长时间失败。

I have tried to out comment where the update of the table happens, and making a Thread.Sleep(1000) before sending the next Async request to the WCF Service, but still the same error, but can run longer with out failing.

我通过代理文件联系WCF服务,该文件由SlSvcUtil.exe / noConfig生成 http://mydomain/myservice.svc

I contact the WCF Service through the "proxy" files, generated by SlSvcUtil.exe /noConfig http://mydomain/myservice.svc

我的问题是,可以通过某种方式避免此错误,也可以使用解决方法?这是我的错,还是一个错误?这实际上是因为我将在最后的学校项目中使用该应用程序,所以如果我可以修复它可能会很好。

My question is that can this error be avoid in a way or maybe with a workaround? Is it my fault, or is it a bug? It is actually because I shall use the application in my final school project, so it could be nice if I could fix it.

我发布了控制台输出,以及崩溃报告中的一部分,但是如果您需要更多信息请告诉我,我会发布它。我不是专业人士使用Mono或MonoTouch环境,这是我的第一次,所以详细的回复会很好。

I post the console output, and a part from the crash report, but if you need more info please tell me, and I will post it. I am not a pro to use Mono or the MonoTouch environment it is my first time, so detailed responses would be nice.

控制台输出:

Mon Dec 27 20:37:17 tests-iPhone UIKitApplication:dk.test.iphone[0x1c3c][625] <Notice>: Mprotect failed at 0xa09a000 (length 1052672) with errno 12

Mon Dec 27 20:37:17 tests-iPhone UIKitApplication:dk.test.iphone[0x1c3c][625] <Notice>: Stacktrace:

Mon Dec 27 20:37:17 tests-iPhone UIKitApplication:dk.test.iphone[0x1c3c][625] <Notice>:   at (wrapper managed-to-native) MonoTouch.UIKit.UIApplication.UIApplicationMain (int,string[],intptr,intptr) <0xffffffff>

Mon Dec 27 20:37:17 tests-iPhone UIKitApplication:dk.test.iphone[0x1c3c][625] <Notice>:   at MonoTouch.UIKit.UIApplication.Main (string[],string,string) <0x000e0>

Mon Dec 27 20:37:17 tests-iPhone UIKitApplication:dk.test.iphone[0x1c3c][625] <Notice>:   at MonoTouch.UIKit.UIApplication.Main (string[]) <0x00023>

Mon Dec 27 20:37:17 tests-iPhone UIKitApplication:dk.test.iphone[0x1c3c][625] <Notice>:   at iPhoneStdView.Application.Main (string[]) <0x0001b>

Mon Dec 27 20:37:17 tests-iPhone UIKitApplication:dk.test.iphone[0x1c3c][625] <Notice>:   at (wrapper runtime-invoke) object.runtime_invoke_dynamic (intptr,intptr,intptr,intptr) <0x000c3>

Mon Dec 27 20:37:17 tests-iPhone UIKitApplication:dk.test.iphone[0x1c3c][625] <Notice>: Native stacktrace:

Mon Dec 27 20:37:18 tests-iPhone ReportCrash[635] <Notice>: Formulating crash report for process iPhoneNoNavigation[625]

Mon Dec 27 20:37:18 tests-iPhone com.apple.launchd[1] (UIKitApplication:dk.test.iphone[0x1c3c][625]) <Warning>: (UIKitApplication:dk.test.iphone[0x1c3c]) Job appears to have crashed: Abort trap

Mon Dec 27 20:37:18 tests-iPhone SpringBoard[27] <Warning>: Application 'iPhoneStdView' exited abnormally with signal 6: Abort trap

崩溃报告:

Thread 0 Crashed:
0   dyld                            0x2fe08110 0x2fe00000 + 33040
1   libSystem.B.dylib               0x3020259e 0x301ff000 + 13726
2   libSystem.B.dylib               0x302531da 0x301ff000 + 344538
3   iPhoneNoNavigation              0x0051975c 0x1000 + 5343068
4   iPhoneNoNavigation              0x00538080 0x1000 + 5468288
5   libSystem.B.dylib               0x302765cc 0x301ff000 + 488908
6   libSystem.B.dylib               0x30201d64 0x301ff000 + 11620
7   CoreFoundation                  0x3081fc38 0x307f8000 + 162872
8   CoreFoundation                  0x3081f4c2 0x307f8000 + 160962
9   CoreFoundation                  0x3081f270 0x307f8000 + 160368
10  CoreFoundation                  0x3081f178 0x307f8000 + 160120
11  GraphicsServices                0x31e445ec 0x31e40000 + 17900
12  GraphicsServices                0x31e44698 0x31e40000 + 18072
13  UIKit                           0x31e5111c 0x31e4d000 + 16668
14  UIKit                           0x31e4f128 0x31e4d000 + 8488
15  iPhoneNoNavigation              0x0006e754 0x1000 + 448340

Thread 0 crashed with ARM Thread State:
    r0: 0x35f4d17c    r1: 0x302765a9      r2: 0x35989b04      r3: 0x0000000e
    r4: 0x2fe29e78    r5: 0x07d17490      r6: 0x302765d3      r7: 0x2fffe24c
    r8: 0x00000000    r9: 0x3598762c     r10: 0x0000000d     r11: 0x07d17470
    ip: 0x3598762c    sp: 0x2fffe240      lr: 0x3e08dc60      pc: 0x2fe08110
  cpsr: 0x20000030


推荐答案

错误12是ENOMEM,你已经耗尽了iphone上可用的所有内存。

Error 12 is ENOMEM, you've exhausted all the memory available on the iphone.

这篇关于iPhone应用程序崩溃与Mprotect失败错误(MonoTouch)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆