Catastrophic failure while running thread with BackgroundWorker
-
I am running some threads so that data initially gets loaded partially and then with the threads, the should get loaded at runtime. But if I close the browser and the thread is not get completed at a certain point then it throws following error: System.Exception was unhandled by user code Message="Catastrophic failure (Exception from HRESULT: 0x8000FFFF (E_UNEXPECTED))" StackTrace: at MS.Internal.XcpImports.CheckHResult(UInt32 hr) at MS.Internal.XcpImports.CreateObjectByTypeIndex(UInt32 typeIndex) at System.Windows.DependencyObject..ctor(UInt32 nativeTypeIndex, IntPtr constructDO) at System.Windows.DependencyObject..ctor(UInt32 nativeTypeIndex) at System.Windows.UIElement..ctor(UInt32 nKnownTypeIndex) at System.Windows.FrameworkElement..ctor(UInt32 nKnownTypeIndex) at System.Windows.Controls.Control..ctor(UInt32 nKnownTypeIndex) at System.Windows.Controls.UserControl..ctor() at ReeleezeeFormsEngine.Silverlight.CommonControls.Pager..ctor(String sectionCount) at ReeleezeeFormsEngine.Silverlight.FormsRenderer.AutoLayoutGridManager..ctor(AutoLayoutGridManagerConfiguration configuration, String sectionCount) at ReeleezeeFormsEngine.Silverlight.FormsRenderer.SequentialRenderer.backgroundWorkerForSection_RunWorkerCompleted(Object sender, RunWorkerCompletedEventArgs e) at System.ComponentModel.BackgroundWorker.OnRunWorkerCompleted(RunWorkerCompletedEventArgs e) at System.ComponentModel.BackgroundWorker.<OnRun>b__1(Object state) InnerException: I am using BackgroundWorker for threading?
-
I am running some threads so that data initially gets loaded partially and then with the threads, the should get loaded at runtime. But if I close the browser and the thread is not get completed at a certain point then it throws following error: System.Exception was unhandled by user code Message="Catastrophic failure (Exception from HRESULT: 0x8000FFFF (E_UNEXPECTED))" StackTrace: at MS.Internal.XcpImports.CheckHResult(UInt32 hr) at MS.Internal.XcpImports.CreateObjectByTypeIndex(UInt32 typeIndex) at System.Windows.DependencyObject..ctor(UInt32 nativeTypeIndex, IntPtr constructDO) at System.Windows.DependencyObject..ctor(UInt32 nativeTypeIndex) at System.Windows.UIElement..ctor(UInt32 nKnownTypeIndex) at System.Windows.FrameworkElement..ctor(UInt32 nKnownTypeIndex) at System.Windows.Controls.Control..ctor(UInt32 nKnownTypeIndex) at System.Windows.Controls.UserControl..ctor() at ReeleezeeFormsEngine.Silverlight.CommonControls.Pager..ctor(String sectionCount) at ReeleezeeFormsEngine.Silverlight.FormsRenderer.AutoLayoutGridManager..ctor(AutoLayoutGridManagerConfiguration configuration, String sectionCount) at ReeleezeeFormsEngine.Silverlight.FormsRenderer.SequentialRenderer.backgroundWorkerForSection_RunWorkerCompleted(Object sender, RunWorkerCompletedEventArgs e) at System.ComponentModel.BackgroundWorker.OnRunWorkerCompleted(RunWorkerCompletedEventArgs e) at System.ComponentModel.BackgroundWorker.<OnRun>b__1(Object state) InnerException: I am using BackgroundWorker for threading?
if your browser is close where you got error?
Viral My Site Tips & Tracks
-
if your browser is close where you got error?
Viral My Site Tips & Tracks
I have one button added each time when the thread gets completed for each time. It means if it brings one chunk of data in one thread then one button added, then it brings another chunk then another button added, brings third chunk third button added, brings fourth chunk fourth button added and so on..... But in between if we close the browser then exception occurs at the constructor of button control
-
I have one button added each time when the thread gets completed for each time. It means if it brings one chunk of data in one thread then one button added, then it brings another chunk then another button added, brings third chunk third button added, brings fourth chunk fourth button added and so on..... But in between if we close the browser then exception occurs at the constructor of button control
I dont understand you problem clearly but, It seem to me that you have problem when your application close. Make sure you close all your thread at application close event. Viral
Viral My Site Tips & Tracks
-
I dont understand you problem clearly but, It seem to me that you have problem when your application close. Make sure you close all your thread at application close event. Viral
Viral My Site Tips & Tracks
-
I got a link http://msdn.microsoft.com/en-us/library/system.componentmodel.backgroundworker.cancellationpending%28VS.95%29.aspx[^] I have written
if ((worker.CancellationPending == true))
{
e.Cancel = true;}
in bw_DoWork(object sender, DoWorkEventArgs e) but still getting the same exception. I think this is because bw_DoWork not getting that the browser is getting closed. How can I tell it that? Do I have some flag so that it is conveyed to this event that browser is getting closed?