I've been using the GoogleSheets API from a C# application in windows without problem for quite a while.
When I port this program to Linux, and run using Mono, it freezes regularly at "Execute" for Spreadsheets.Get OR BatchUpdate.
SheetsService service = new SheetsService(new BaseClientService.Initializer()
{
HttpClientInitializer = credential,
ApplicationName = ApplicationName,
});
var gotSS = service.Spreadsheets.Get(spreadsheetId); // <<< freezes HERE
...
var vbur = service.Spreadsheets.Values.BatchUpdate(buvr, spreadsheetId); // <<< OR freezes HERE
It doesn't just get stuck and not return - all threads in the application freeze.
What could be the cause?
The stacktrace for that thread shows:
"unnamed thread" at <0xffffffff> at (wrapper managed-to-native) System.Threading.Monitor.Monitor_wait (object,int) [0x00000] in :0 at System.Threading.Monitor.ObjWait (bool,int,object) [0x0002f] in :0 at System.Threading.Monitor.Wait (object,int,bool) [0x0000e] in :0 at System.Threading.Monitor.Wait (object,int) [0x00000] in :0 at System.Threading.ManualResetEventSlim.Wait (int,System.Threading.CancellationToken) [0x00141] in :0 at System.Threading.Tasks.Task.SpinThenBlockingWait (int,System.Threading.CancellationToken) [0x0002d] in :0 at System.Threading.Tasks.Task.InternalWait (int,System.Threading.CancellationToken) [0x00069] in :0 at System.Threading.Tasks.Task
1<TResult_REF>.GetResultCore (bool) [0x00008] in <b78dcefd6c184245be8bf4a1e52466d9>:0 at System.Threading.Tasks.Task
1.get_Result () [0x0000f] in :0 at Google.Apis.Requests.ClientServiceRequest1<TResponse_REF>.Execute () [0x0000b] in <1587d07172024990b6af5b790c2a559c>:0 at myFuncs.GCMupdates.sendToGoogleSheets (myFuncs.clsPositionManager/HistSummaryData,myFuncs.clsPositionManager/Position2HistData,System.Collections.Generic.Dictionary
2,double,double,double,double,double,System.Collections.Generic.List`1) [0x00236] in <1791c5302f4a454b8cf7412b7f799253>:0 at myFuncs.GCMupdates.sendNotification (myFuncs.clsPositionManager/HistSummaryData,double,myFuncs.clsPositionManager/Position2HistData,myFuncs.subLog) [0x009c3] in <1791c5302f4a454b8cf7412b7f799253>:0 at Master.MainForm.UpdateDets (myFuncs.clsPositionManager/HistSummaryData,int,int,double,myFuncs.clsPositionManager/Position2HistData,myFuncs.subLog) [0x0063e] in <4860a2c0b9a848eeab8026906aeac5a8>:0 at (wrapper runtime-invoke) .runtime_invoke_void__this___object_int_int_double_object_object (object,intptr,intptr,intptr) [0x0006b] in <4860a2c0b9a848eeab8026906aeac5a8>:0 at <0xffffffff> at (wrapper managed-to-native) System.Reflection.MonoMethod.InternalInvoke (System.Reflection.MonoMethod,object,object[],System.Exception&) [0x0000c] in :0 at System.Reflection.MonoMethod.Invoke (object,System.Reflection.BindingFlags,System.Reflection.Binder,object[],System.Globalization.CultureInfo) [0x0003b] in :0 at System.Reflection.MethodBase.Invoke (object,object[]) [0x00000] in :0 at System.Delegate.DynamicInvokeImpl (object[]) [0x000e7] in :0 at System.MulticastDelegate.DynamicInvokeImpl (object[]) [0x00008] in :0 at System.Delegate.DynamicInvoke (object[]) [0x00000] in :0 at System.Windows.Forms.XplatUIDriverSupport.ExecutionCallback (System.Windows.Forms.AsyncMethodData) [0x00007] in <951cc200450d41168b6f8c8543d9b41e>:0 at System.Windows.Forms.XplatUIDriverSupport.ExecutionCallbackInContext (object) [0x00027] in <951cc200450d41168b6f8c8543d9b41e>:0 at System.Threading.ExecutionContext.RunInternal (System.Threading.ExecutionContext,System.Threading.ContextCallback,object,bool) [0x00071] in :0 at System.Threading.ExecutionContext.Run (System.Threading.ExecutionContext,System.Threading.ContextCallback,object,bool) [0x00000] in :0 at System.Threading.ExecutionContext.Run (System.Threading.ExecutionContext,System.Threading.ContextCallback,object) [0x0002b] in :0 at System.Windows.Forms.XplatUIDriverSupport.ExecuteClientMessage (System.Runtime.InteropServices.GCHandle) [0x00028] in <951cc200450d41168b6f8c8543d9b41e>:0 at System.Windows.Forms.XplatUIX11.GetMessage (object,System.Windows.Forms.MSG&,intptr,int,int) [0x01762] in <951cc200450d41168b6f8c8543d9b41e>:0 at System.Windows.Forms.XplatUI.GetMessage (object,System.Windows.Forms.MSG&,intptr,int,int) [0x00000] in <951cc200450d41168b6f8c8543d9b41e>:0 at System.Windows.Forms.Application.RunLoop (bool,System.Windows.Forms.ApplicationContext) [0x0034e] in <951cc200450d41168b6f8c8543d9b41e>:0 at System.Windows.Forms.Application.Run (System.Windows.Forms.ApplicationContext) [0x00011] in <951cc200450d41168b6f8c8543d9b41e>:0 at System.Windows.Forms.Application.Run (System.Windows.Forms.Form) [0x00006] in <951cc200450d41168b6f8c8543d9b41e>:0 at Master.Program.Main (string[]) [0x00137] in <4860a2c0b9a848eeab8026906aeac5a8>:0 at (wrapper runtime-invoke) .runtime_invoke_void_object (object,intptr,intptr,intptr) [0x0004e] in <4860a2c0b9a848eeab8026906aeac5a8>:0
User contributions licensed under CC BY-SA 3.0