Hi,
Can anyone help me on this.
I am facing this weird issue, when I try to fetch some rows(row by row) from my dataset(dataframe in R). First few rows are fetched without any error but after say 4-5 rows I get some exception on a line which executed perfectly for first few rows.
I am executing following statement:
SomeRDotNetObject.Evaluate("Dataset1[rowindex , ]" ); // Dataset1 is the name of the dataset
for say rowindex= 1 to 4 this works but fails on rowindex=5. And C# application crashes with following exception:-
_System.Windows.Threading.DispatcherUnhandledExceptionEventHandler -METHOD :Invoke() -LINE :0
System.InvalidOperationException: Dispatcher processing has been suspended, but messages are still being processed.
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, Int32 numArgs)
at MS.Internal.Threading.ExceptionFilterHelper.TryCatchWhen(Object source, Delegate method, Object args, Int32 numArgs, Delegate catchHandler)_
Thanks
adabral
Comments: I am not using Dispatcher.Invoke() call. In my C# WPF project, I got default App.xaml.cs ( where I added Dispatcher for handling unhandled exceptions ). And there is another xaml file ( Window1.xaml file) that has the datagrid, that requests a row (at a time) using R.Net code. Its a single threaded application. Grid does not get the control back, untill all the rows get fetched. In App.xaml.cs I have created an object of Window1.xaml and Window1.xaml has the datagrid. If I can fetch first few rows, I should be able fetch all. The same R.Net statement is used all the time. Or, it should have failed/crashed very first time without fetching even a single row. I have no clue, what's going on. The fetching process is something (vaguely) like following :- For Rowindex = 1 to TotalRows { Get rowdata for Rowindex // This line calls another method that uses Evaluate() to get row from R. Put rowdata somewhere (later will be assigned to grid) } Thanks, adabral
Can anyone help me on this.
I am facing this weird issue, when I try to fetch some rows(row by row) from my dataset(dataframe in R). First few rows are fetched without any error but after say 4-5 rows I get some exception on a line which executed perfectly for first few rows.
I am executing following statement:
SomeRDotNetObject.Evaluate("Dataset1[rowindex , ]" ); // Dataset1 is the name of the dataset
for say rowindex= 1 to 4 this works but fails on rowindex=5. And C# application crashes with following exception:-
_System.Windows.Threading.DispatcherUnhandledExceptionEventHandler -METHOD :Invoke() -LINE :0
System.InvalidOperationException: Dispatcher processing has been suspended, but messages are still being processed.
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, Int32 numArgs)
at MS.Internal.Threading.ExceptionFilterHelper.TryCatchWhen(Object source, Delegate method, Object args, Int32 numArgs, Delegate catchHandler)_
Thanks
adabral
Comments: I am not using Dispatcher.Invoke() call. In my C# WPF project, I got default App.xaml.cs ( where I added Dispatcher for handling unhandled exceptions ). And there is another xaml file ( Window1.xaml file) that has the datagrid, that requests a row (at a time) using R.Net code. Its a single threaded application. Grid does not get the control back, untill all the rows get fetched. In App.xaml.cs I have created an object of Window1.xaml and Window1.xaml has the datagrid. If I can fetch first few rows, I should be able fetch all. The same R.Net statement is used all the time. Or, it should have failed/crashed very first time without fetching even a single row. I have no clue, what's going on. The fetching process is something (vaguely) like following :- For Rowindex = 1 to TotalRows { Get rowdata for Rowindex // This line calls another method that uses Evaluate() to get row from R. Put rowdata somewhere (later will be assigned to grid) } Thanks, adabral