[WP8.1]麻烦的一般算法“程序'[%PID%] TaskHost.exe'已退出,代码为%EXIT_CODE%(%ERROR_CODE%)。” [英] [WP8.1]General algorithm to troubleshot "The program '[%PID%] TaskHost.exe' has exited with code %EXIT_CODE% (%ERROR_CODE%)."

查看:65
本文介绍了[WP8.1]麻烦的一般算法“程序'[%PID%] TaskHost.exe'已退出,代码为%EXIT_CODE%(%ERROR_CODE%)。”的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

问题

今天我遇到了问题:

该计划'[2896] ] TaskHost.exe已退出,代码为-2147220978(0x8004020e)。

Today I faced with problem:
The program '[2896] TaskHost.exe' has exited with code -2147220978 (0x8004020e).

应用程序已从VS 2015在调试器下,但没有任何异常(我选择了复选框到
捕获所有CLR异常

Application has been started from VS 2015 under debugger, but there is no any exception (I have selected checkbox to catch all CLR Exception)

应用程序已关闭,我看到了日志中只有一行

程序'[2896] TaskHost.exe'已退出,代码为-2147220978(0x8004020e)。

Application closed, and I see only one line in logs
The program '[2896] TaskHost.exe' has exited with code -2147220978 (0x8004020e).

我已经从Android / iOS移动世界,我甚至无法成像这样的情况。绝对无奈。

I have moved from Android/iOS mobile world, I and even can't imaging situation like this. Absolutely helpless.

  - 对于Android(因为我总是可以在logcat或kmsg中找到root用户手机的信息)

 - For Android (because I always can found information in logcat or kmsg for rooted phone)

  -   对于iOS我总是能够捕获任何异常,在第三方或系统代码中无关紧要,但我总是知道它何时发生(对于Jailbroken手机也可以看到系统日志)

 - For iOS I always able to catch any exception, doesn't matter in third-party or system code, but I always know when it happens (also for Jailbroken phone it's possible to see system logs)

我在错误消失时找到了一些条件:

I have found some condition when this error gone:

1。当我的应用不使用 '新'相机API

1. when my app doesn't use 'New' Camera API

2时。当我的应用不使用  Microsoft 设备 Sensors.Accelerometer API

2. when my app doesn't use Microsoft.Devices.Sensors.Accelerometer API

这就是我现在所拥有的一切。

This is all I have now.




我的问题

1。什么意味着价值  -2147220978  ?
2.什么意思是价值  0x8004020e  ?看起来这是HRESULT值。有人可以确认我的假设吗?

3.为什么调试器没有捕获异常。我可以说调试器中有错误吗?

1. What means value -2147220978 ?
2. What means value 0x8004020e ? Looks like this is HRESULT value. Can someone confirm my assumption?
3. Why the debugger isn't catch exception. Can I say that there is bug in debugger?

4。是否可以获得任何系统/操作系统日志或类似的事项

4. Is it possible to get any system/OS logs or something like  

5。是否有任何一般步骤如何分析此类错误?

5. Is there any general steps how to analyze such kind of errors?

推荐答案

您好,

1。什么意味着价值  -2147220978  ?

1. What means value -2147220978 ?

- >它的错误代码是无符号版本。

-> Its the error code unsigned version.

2。什么意味着价值  0x8004020e  ?看起来这是HRESULT值。有人可以证实我的假设吗?

2. What means value 0x8004020e ? Looks like this is HRESULT value. Can someone confirm my assumption?

- > 0x8004020e是错误的十六进制版本,基本上这个错误更像是一个COM错误。

-> 0x8004020e is the Hex version of the error, basically this error more like a COM error.

3。为什么调试器没有捕获异常。我可以说调试器中有错误吗?

3. Why the debugger isn't catch exception. Can I say that there is bug in debugger?

- >可以捕获错误,基本上你需要在Visual Studio上进行一些设置,默认情况下,不检查这些选项。我附上了你需要设置的屏幕截图。

-> It's possible to catch the error, basically you need some setting on Visual Studio, by default, these options are not checked. I attached a screenshot where you need to set.

#1,在项目设置页面中启用Native调试。

#1, enable the Native debug in the project setting page.

#2,允许在DEBUG上抛出异常 - > EXCEPTION设置。

#2, enable to throw exceptions on DEBUG -> EXCEPTION setting.

4。是否可以获取任何系统/操作系统日志或类似于  

4. Is it possible to get any system/OS logs or something like  

- >不可能,但我们可以按照以下文档处理应用级别的例外情况:    C#或Visual Basic中Windows运行时应用程序的异常
处理

-> Not possible, but we can handle the App level exceptions by following this doc:  Exception handling for Windows Runtime apps in C# or Visual Basic

5。是否有任何一般步骤如何分析此类错误?

5. Is there any general steps how to analyze such kind of errors?

- >好吧,正如我上面所说,应该帮助你解决错误,但是我可以知道这个问题是否会导致你的应用无法正常运行或崩溃?如果是,我们需要深入了解代码,否则系统只是让您知道有这样的信息。

-> Well, as I told above, should help you with the error, but may I know if this issue make your app not working or crash? If yes, we need to look deep into the code, otherwise system just let you know there is such information.

- 詹姆斯


这篇关于[WP8.1]麻烦的一般算法“程序'[%PID%] TaskHost.exe'已退出,代码为%EXIT_CODE%(%ERROR_CODE%)。”的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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