zoukankan      html  css  js  c++  java
  • WP8异常错误:Error HRESULT E_FAIL has been returned from a call to a COM component.

    在做WP8开发的过程中,使用到了longlistselector这个控件,本来使用没有问题。

    但是突然出现了一个闪退的错误,错误信息如下:

    {MS.Internal.WrappedException: Error HRESULT E_FAIL has been returned from a call to a COM component. ---> System.Exception: Error HRESULT E_FAIL has been returned from a call to a COM component.
    at MS.Internal.XcpImports.CheckHResult(UInt32 hr)
    at MS.Internal.XcpImports.UIElement_Measure(UIElement element, Size availableSize)
    at System.Windows.UIElement.Measure(Size availableSize)
    at Microsoft.Phone.Controls.LongListSelector.RealizeDisplayItem(Iterator`1 iterator, RealizeOptions options)
    at Microsoft.Phone.Controls.LongListSelector.RealizedRange.Append(RealizedRange nextRange, Double bottom)
    at Microsoft.Phone.Controls.LongListSelector.AppendElement(RealizedRange range, RealizedRange nextRange, Double bottom)
    at Microsoft.Phone.Controls.LongListSelector.HealElements(Rect requireRect, Rect allowRect, Boolean& areBoundsUpdated)
    at Microsoft.Phone.Controls.LongListSelector.Balance()
    at Microsoft.Phone.Controls.LongListSelector.MeasureOverride(Size availableSize)
    at System.Windows.FrameworkElement.MeasureOverride(IntPtr nativeTarget, Double inWidth, Double inHeight, Double& outWidth, Double& outHeight)
    --- End of inner exception stack trace ---}

    看似很复杂,搞得我也不知道从何下手。

    回想整个开发过程,之前使用正常,后面闪退,期间做了全局资源命名的调整,但是vs没有给出错误提示,本以为替换完毕(其实应该全局查找替换的)。

    但遗漏了一个地方,longlistselector中的HeaderDataTemplate中的一个资源使用的地方。

    在做了更改后,使用又恢复正常了。

  • 相关阅读:
    C语言 unsigned 和 signed 类型相互转换深入理解
    C++的关键字 explicit的作用———菜鸟级日记
    solr笔记
    矩阵解
    USACO题目——Transformations
    模块化加载时断点调试没反应,进入不了断点
    flash中的渐变滤镜GradientGlowFilter
    Flash Builder 找不到所需的Adobe Flash Player调试器版本的解决办法
    使用Pixel Bender 和Shader Job来处理普通数据运算
    关于Event.ADDED_TO_STAGE
  • 原文地址:https://www.cnblogs.com/wangzhiyu811/p/3601829.html
Copyright © 2011-2022 走看看