InvalidOperationException“已释放LocalDataStoreSlot存储” [英] InvalidOperationException "LocalDataStoreSlot storage has been freed"

查看:86
本文介绍了InvalidOperationException“已释放LocalDataStoreSlot存储”的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

您好,

我们正在使用excel工作簿2013应用程序。在这个应用程序中,我们使用Listobjects,验证控件,按钮,图表控件等。在文档操作窗格中,我们起诉WPF用户控件(在HostedElement
控件的帮助下托管在任务窗格中)。 从db获取数据到excel之后,如果我们应用以下操作,那么我们将获得  InvalidOperationException"localDataStoreSlot存储已被释放" 。

We are using excel work book 2013 application. In this application , we are using Listobjects, validation control, button, chart control etc. In the document actions pane, we are suing WPF user control ( hosted in the task pane with the help of HostedElement control).  After getting data from db to the excel , if we apply the following action then we are getting  InvalidOperationException "localDataStoreSlot storage has been freed" .

打开excel

检索数据并绑定数据

保存excel(通过原生excel)

Save excel ( by native excel)

重新打开excel

关闭excel,它会提示保存&不要保存。点击不保存。

Close excel , it will prompt for save & don't save. Click on don't save.

以上异常即将到来。 所有关闭事件后都会触发此错误。请告诉我们如何处理此错误/如何跟踪此问题的原因。

Above exception is coming.  This error is firing after all shut down events . Please let us know how to handle this error / how to trace the cause for this issue.

InvalidOperationException" LocalDataStoreSlot存储已被释放"  

InvalidOperationException "LocalDataStoreSlot storage has been freed" 

mscorlib.dll!System.LocalDataStore.GetData(System.LocalDataStoreSlot slot)

mscorlib.dll!System.Threading.Thread.GetData(System.LocalDataStoreSlot slot)

WindowsBase.dll!System.Windows.Interop.ComponentDispatcher.CurrentThreadData.get()

WindowsBase.dll!System.Windows.Threading.Dispatcher.WndProcHook(System.IntPtr hwnd,int msg,System.IntPtr wParam,System.IntPtr lParam,ref bool handle)

WindowsBase.dll!MS.Win32.HwndWrapper.WndProc(System.IntPtr hwnd,in t msg,System.IntPtr wParam,System.IntPtr lParam,ref bool处理)

WindowsBase.dll!MS.Win32。 HwndSubclass.DispatcherCallbackOperation(object o)

WindowsBase.dll!System.Windows.Threading.ExceptionWrapper.InternalRealCall(System.Delegate callback) ,object args,int numArgs)

WindowsBase.dll!MS.Internal.Threading.ExceptionFilterHelper.TryCatchWhen(object source,System .Delegate方法,对象args,int numArgs,System.Delegate catchHandler)

WindowsBase.dll!System.Windows.Threading。 Dispatcher.LegacyInvokeImpl(System.Windows.Threading.DispatcherPriority priority,System.TimeSpan timeout,System.Delegate方法,object args,int numArgs)

WindowsBase.dll!MS.Win32.HwndSubclass.SubclassWndProc(System.IntPtr hwnd,int msg,System.IntPtr wParam,System.IntPtr lParam)

< span style ="color:red"> [原生于管理过渡]

[管理到原生过渡]

WindowsBase.dll!MS.Win32.HwndWrapper.DestroyWindow(object args)

WindowsBase.dll!MS.Win32.HwndWrapper.Dispose(bool disposing,bool isHwndBeingDestroyed)

WindowsBase.dll!MS.Win32.HwndWrapper.Finalize()

[原生到托管过渡]

[Appdomain Transition]

[原生到管理过渡]

推荐答案

您好,

感谢您的参与。

根据您的描述,我认为此异常最有可能是由数据库中的数据损坏引起的。您可以尝试使用其他方式获取这些数据。如果特定于数据库问题,这将缩小问题范围。

According to your description, I think this exception is most likely to be caused by data corruption from the database. You can try to get those data using another way. This will narrow down the issue if it is specific to database problems.

问候,


这篇关于InvalidOperationException“已释放LocalDataStoreSlot存储”的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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