运行WPF动画应用程序时出错 [英] Errors while running a wpf animated application

查看:74
本文介绍了运行WPF动画应用程序时出错的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

所有人都好,

我正在开发一个示例动画应用程序.当我运行此应用程序时,它显示以下错误.我不知道为什么会发生此错误.运行应用程序时,应用程序使用的内存同时增加.如何解决这个错误.如果有人有解决此错误的方法,请回复此帖子.

System.Windows.Media.Imaging.BitmapSourceSafeMILHandle.ComputeEstimatedSize(IntPtr bitmapObject)
在System.Windows.Media.Imaging.BitmapSourceSafeMILHandle.CalculateSize()
在System.Windows.Media.Imaging.UnmanagedBitmapWrapper..ctor(BitmapSourceSafeMILHandle bitmapSource)
在System.Windows.Media.Effects.BitmapEffect.GetOutput(SafeHandle非托管Effect,Int32索引,BitmapEffectRenderContext上下文)
在System.Windows.Media.Effects.BitmapEffect.GetOutput(BitmapEffectInput输入)处
在System.Windows.Media.Effects.BitmapEffectState.GetEffectOutput(Visual visual,RenderTargetBitmap& renderBitmap,Matrix worldTransform,Rect windowClip,Matrix& finalTransform)
在System.Windows.Media.Effects.BitmapEffectVisualState.RenderBitmapEffect(Visual visual,Channel channel)
在System.Windows.Media.Effects.BitmapEffectContent.ExecuteRealizationsUpdate()
在System.Windows.Media.RealizationContext.RealizationUpdateSchedule.Execute()
在System.Windows.Media.MediaContext.Render(ICompositionTarget resizedCompositionTarget)
在System.Windows.Media.MediaContext.RenderMessageHandlerCore(Object resizedCompositionTarget)
在System.Windows.Media.MediaContext.AnimatedRenderMessageHandler(Object resizedCompositionTarget)
在System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate回调,Object args,Boolean isSingleParameter)
在System.Windows.Threading.ExceptionWrapper.TryCatchWhen(对象源,委托回调,对象参数,布尔值isSingleParameter,委托catchHandler)
在System.Windows.Threading.Dispatcher.WrappedInvoke(委托回调,对象参数,布尔值isSingleParameter,委托catchHandler)
在System.Windows.Threading.DispatcherOperation.InvokeImpl()
在System.Windows.Threading.DispatcherOperation.InvokeInSecurityContext(对象状态)下
在System.Threading.ExecutionContext.runTryCode(Object userData)
在System.Runtime.CompilerServices.RuntimeHelpers.ExecuteCodeWithGuaranteedCleanup(TryCode代码,CleanupCode backoutCode,对象userData)
在System.Threading.ExecutionContext.RunInternal处(ExecutionContext执行上下文,ContextCallback回调,对象状态)
在System.Threading.ExecutionContext.Run(ExecutionContext执行上下文,ContextCallback回调,对象状态)处
在System.Windows.Threading.DispatcherOperation.Invoke()处
在System.Windows.Threading.Dispatcher.ProcessQueue()处
在System.Windows.Threading.Dispatcher.WndProcHook中(IntPtr hwnd,Int32 msg,IntPtr wParam,IntPtr lParam,布尔值和已处理)
在MS.Win32.HwndWrapper.WndProc中(IntPtr hwnd,Int32 msg,IntPtr wParam,IntPtr lParam,布尔值和已处理)
在MS.Win32.HwndSubclass.DispatcherCallbackOperation(Object o)
在System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate回调,Object args,Boolean isSingleParameter)
在System.Windows.Threading.ExceptionWrapper.TryCatchWhen(对象源,委托回调,对象参数,布尔值isSingleParameter,委托catchHandler)
在System.Windows.Threading.Dispatcher.WrappedInvoke(委托回调,对象参数,布尔值isSingleParameter,委托catchHandler)
在System.Windows.Threading.Dispatcher.InvokeImpl中(DispatcherPriority优先级,TimeSpan超时,Delegate方法,对象参数,布尔值isSingleParameter)
在System.Windows.Threading.Dispatcher.Invoke处(DispatcherPriority优先级,Delegate方法,对象arg)
在MS.Win32.HwndSubclass.SubclassWndProc(IntPtr hwnd,Int32 msg,IntPtr wParam,IntPtr lParam)
在MS.Win32.UnsafeNativeMethods.DispatchMessage(MSG& msg)
在System.Windows.Threading.Dispatcher.PushFrameImpl(DispatcherFrame frame)
在System.Windows.Threading.Dispatcher.PushFrame(DispatcherFrame框架)处
在System.Windows.Threading.Dispatcher.Run()
在System.Windows.Application.RunDispatcher(对象忽略)上
在System.Windows.Application.RunInternal(窗口窗口)
在System.Windows.Application.Run(窗口窗口)中
在System.Windows.Application.Run()
在AnimateApplication.App.Main()

Hai to all,

I am developing a sample animation application. while i run this application it shows the following errors. I don''t know why this error was occured. The application usage memory was increases simultaneously while running the application. How to solve this error. If anybody had the solution for this error please reply this post.

System.Windows.Media.Imaging.BitmapSourceSafeMILHandle.ComputeEstimatedSize(IntPtr bitmapObject)
at System.Windows.Media.Imaging.BitmapSourceSafeMILHandle.CalculateSize()
at System.Windows.Media.Imaging.UnmanagedBitmapWrapper..ctor(BitmapSourceSafeMILHandle bitmapSource)
at System.Windows.Media.Effects.BitmapEffect.GetOutput(SafeHandle unmanagedEffect, Int32 index, BitmapEffectRenderContext context)
at System.Windows.Media.Effects.BitmapEffect.GetOutput(BitmapEffectInput input)
at System.Windows.Media.Effects.BitmapEffectState.GetEffectOutput(Visual visual, RenderTargetBitmap& renderBitmap, Matrix worldTransform, Rect windowClip, Matrix& finalTransform)
at System.Windows.Media.Effects.BitmapEffectVisualState.RenderBitmapEffect(Visual visual, Channel channel)
at System.Windows.Media.Effects.BitmapEffectContent.ExecuteRealizationsUpdate()
at System.Windows.Media.RealizationContext.RealizationUpdateSchedule.Execute()
at System.Windows.Media.MediaContext.Render(ICompositionTarget resizedCompositionTarget)
at System.Windows.Media.MediaContext.RenderMessageHandlerCore(Object resizedCompositionTarget)
at System.Windows.Media.MediaContext.AnimatedRenderMessageHandler(Object resizedCompositionTarget)
at System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Boolean isSingleParameter)
at System.Windows.Threading.ExceptionWrapper.TryCatchWhen(Object source, Delegate callback, Object args, Boolean isSingleParameter, Delegate catchHandler)
at System.Windows.Threading.Dispatcher.WrappedInvoke(Delegate callback, Object args, Boolean isSingleParameter, Delegate catchHandler)
at System.Windows.Threading.DispatcherOperation.InvokeImpl()
at System.Windows.Threading.DispatcherOperation.InvokeInSecurityContext(Object state)
at System.Threading.ExecutionContext.runTryCode(Object userData)
at System.Runtime.CompilerServices.RuntimeHelpers.ExecuteCodeWithGuaranteedCleanup(TryCode code, CleanupCode backoutCode, Object userData)
at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
at System.Windows.Threading.DispatcherOperation.Invoke()
at System.Windows.Threading.Dispatcher.ProcessQueue()
at System.Windows.Threading.Dispatcher.WndProcHook(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
at MS.Win32.HwndWrapper.WndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
at MS.Win32.HwndSubclass.DispatcherCallbackOperation(Object o)
at System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Boolean isSingleParameter)
at System.Windows.Threading.ExceptionWrapper.TryCatchWhen(Object source, Delegate callback, Object args, Boolean isSingleParameter, Delegate catchHandler)
at System.Windows.Threading.Dispatcher.WrappedInvoke(Delegate callback, Object args, Boolean isSingleParameter, Delegate catchHandler)
at System.Windows.Threading.Dispatcher.InvokeImpl(DispatcherPriority priority, TimeSpan timeout, Delegate method, Object args, Boolean isSingleParameter)
at System.Windows.Threading.Dispatcher.Invoke(DispatcherPriority priority, Delegate method, Object arg)
at MS.Win32.HwndSubclass.SubclassWndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam)
at MS.Win32.UnsafeNativeMethods.DispatchMessage(MSG& msg)
at System.Windows.Threading.Dispatcher.PushFrameImpl(DispatcherFrame frame)
at System.Windows.Threading.Dispatcher.PushFrame(DispatcherFrame frame)
at System.Windows.Threading.Dispatcher.Run()
at System.Windows.Application.RunDispatcher(Object ignore)
at System.Windows.Application.RunInternal(Window window)
at System.Windows.Application.Run(Window window)
at System.Windows.Application.Run()
at AnimateApplication.App.Main()

推荐答案

代码在哪里?查看堆栈跟踪-您是否可以使用图像(并且可以访问)?
Where''s the code? Looking at the stack trace - is you image available (and accessible)?


您发布了堆栈跟踪,而不是错误.您没有发布代码.我看不到没有代码和错误消息,没有人能提供帮助.
You posted a stack trace and not an error. You posted no code. I don''t see how anyone can help without both code and the error message.


这篇关于运行WPF动画应用程序时出错的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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