Stack overflow in Microsoft.SharePoint.Client.ClientRequest.AddQueryIdAndResultObject

%3CLINGO-SUB%20id%3D%22lingo-sub-2410244%22%20slang%3D%22en-US%22%3ERe%3A%20Stack%20overflow%20in%20Microsoft.SharePoint.Client.ClientRequest.AddQueryIdAndResultObject%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2410244%22%20slang%3D%22en-US%22%3EBtw.%20there%20is%20no%20memory%20leak%2Fissue%20as%20application%20is%20using%20around%20200-300MB%20(our%20of%2016GB)%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2410209%22%20slang%3D%22en-US%22%3EStack%20overflow%20in%20Microsoft.SharePoint.Client.ClientRequest.AddQueryIdAndResultObject%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2410209%22%20slang%3D%22en-US%22%3E%3CP%3EHi%2C%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3Emy%20application%20connects%20to%20SharePoint%20Online%20and%20download%20documents%20which%20are%20processed%20locally%20(replacements%20in%20documents)%20and%20then%20uploaded%20back%20to%20SharePoint%20Online.%20Depending%20on%20settings%20application%20can%20keep%20meta%20data%20like%20(modified%20date%2C%20editor%20name%2C%20approval%20status%2C%20major%2Fminor%20status)%20but%20very%20unpredictably%20application%20is%20crashing%20due%20to%20stack%20overflow%20in%20Microsoft.SharePoint.Client.ClientRequest.AddQueryIdAndResultObject.%3C%2FP%3E%3CP%3EUnfortunately%2C%20as%20documents%20are%20processed%20in%20separate%20threads%20when%20this%20happens%20main%20process%20is%20closed%20and%20I%20cannot%20figure%20what%20is%20happening.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3ETo%20make%20it%20even%20more%20difficult%20in%20most%20cases%20when%20I%20process%20same%20location%20all%20will%20work%20but%20on%20some%20occasions%20there%20will%20be%20crash.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EFrom%20crash%20dump%20I%20can%20see%3A%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EERROR_CODE%3A%20(NTSTATUS)%200xc00000fd%20-%20A%20new%20guard%20page%20for%20the%20stack%20cannot%20be%20created.%3CBR%20%2F%3EEXCEPTION_CODE_STR%3A%20c00000fd%3CBR%20%2F%3EEXCEPTION_PARAMETER1%3A%200000000000000001%3CBR%20%2F%3EEXCEPTION_PARAMETER2%3A%200000003412a05fe0%3CBR%20%2F%3EFAULTING_THREAD%3A%20ffffffff%3C%2FP%3E%3CP%3ESTACK_TEXT%3A%3CBR%20%2F%3E00000034%6012a06600%2000007ff8%60e2df63be%20Microsoft_SharePoint_Client_Runtime!Microsoft.SharePoint.Client.ClientRequest.AddQueryIdAndResultObject%2B0x3e%3CBR%20%2F%3E00000034%6012a06650%2000007ff8%60e2df6f6a%20Microsoft_SharePoint_Client_Runtime!Microsoft.SharePoint.Client.ClientObject.get_Query%2B0x17a%3CBR%20%2F%3E00000034%6012a066a0%2000007ff8%60e33b5530%20Microsoft_SharePoint_Client_Runtime!Microsoft.SharePoint.Client.ClientObject.Retrieve%2B0x10%3CBR%20%2F%3E00000034%6012a066f0%2000007ff8%60e33b244a%20Microsoft_SharePoint_Client!Microsoft.SharePoint.Client.ListItem.LoadExpandoFields%2B0x11a%3CBR%20%2F%3E00000034%6012a06750%2000007ff8%60e2df70a1%20Microsoft_SharePoint_Client_Runtime!Microsoft.SharePoint.Client.ClientObject.get_Query%2B0x2b1%3CBR%20%2F%3E00000034%6012a067a0%2000007ff8%60e33b5530%20Microsoft_SharePoint_Client_Runtime!Microsoft.SharePoint.Client.ClientObject.Retrieve%2B0x10%3CBR%20%2F%3E00000034%6012a067f0%2000007ff8%60e33b244a%20Microsoft_SharePoint_Client!Microsoft.SharePoint.Client.ListItem.LoadExpandoFields%2B0x11a%3CBR%20%2F%3E00000034%6012a06850%2000007ff8%60e2df70a1%20Microsoft_SharePoint_Client_Runtime!Microsoft.SharePoint.Client.ClientObject.get_Query%2B0x2b1%3CBR%20%2F%3E00000034%6012a068a0%2000007ff8%60e33b5530%20Microsoft_SharePoint_Client_Runtime!Microsoft.SharePoint.Client.ClientObject.Retrieve%2B0x10%3CBR%20%2F%3E00000034%6012a068f0%2000007ff8%60e33b244a%20Microsoft_SharePoint_Client!Microsoft.SharePoint.Client.ListItem.LoadExpandoFields%2B0x11a%3CBR%20%2F%3E00000034%6012a06950%2000007ff8%60e2df70a1%20Microsoft_SharePoint_Client_Runtime!Microsoft.SharePoint.Client.ClientObject.get_Query%2B0x2b1%3CBR%20%2F%3E00000034%6012a069a0%2000007ff8%60e33b5530%20Microsoft_SharePoint_Client_Runtime!Microsoft.SharePoint.Client.ClientObject.Retrieve%2B0x10%3CBR%20%2F%3E00000034%6012a069f0%2000007ff8%60e33b244a%20Microsoft_SharePoint_Client!Microsoft.SharePoint.Client.ListItem.LoadExpandoFields%2B0x11a%3CBR%20%2F%3E00000034%6012a06a50%2000007ff8%60e2df70a1%20Microsoft_SharePoint_Client_Runtime!Microsoft.SharePoint.Client.ClientObject.get_Query%2B0x2b1%3CBR%20%2F%3E00000034%6012a06aa0%2000007ff8%60e33b5530%20Microsoft_SharePoint_Client_Runtime!Microsoft.SharePoint.Client.ClientObject.Retrieve%2B0x10%3CBR%20%2F%3E00000034%6012a06af0%2000007ff8%60e33b244a%20Microsoft_SharePoint_Client!Microsoft.SharePoint.Client.ListItem.LoadExpandoFields%2B0x11a%3CBR%20%2F%3E00000034%6012a06b50%2000007ff8%60e2df70a1%20Microsoft_SharePoint_Client_Runtime!Microsoft.SharePoint.Client.ClientObject.get_Query%2B0x2b1%3CBR%20%2F%3E00000034%6012a06ba0%2000007ff8%60e33b5530%20Microsoft_SharePoint_Client_Runtime!Microsoft.SharePoint.Client.ClientObject.Retrieve%2B0x10%3CBR%20%2F%3E00000034%6012a06bf0%2000007ff8%60e33b244a%20Microsoft_SharePoint_Client!Microsoft.SharePoint.Client.ListItem.LoadExpandoFields%2B0x11a%3CBR%20%2F%3E00000034%6012a06c50%2000007ff8%60e2df70a1%20Microsoft_SharePoint_Client_Runtime!Microsoft.SharePoint.Client.ClientObject.get_Query%2B0x2b1%3CBR%20%2F%3E00000034%6012a06ca0%2000007ff8%60e33b5530%20Microsoft_SharePoint_Client_Runtime!Microsoft.SharePoint.Client.ClientObject.Retrieve%2B0x10%3CBR%20%2F%3E00000034%6012a06cf0%2000007ff8%60e33b244a%20Microsoft_SharePoint_Client!Microsoft.SharePoint.Client.ListItem.LoadExpandoFields%2B0x11a%3CBR%20%2F%3E00000034%6012a06d50%2000007ff8%60e2df70a1%20Microsoft_SharePoint_Client_Runtime!Microsoft.SharePoint.Client.ClientObject.get_Query%2B0x2b1%3CBR%20%2F%3E00000034%6012a06da0%2000007ff8%60e33b5530%20Microsoft_SharePoint_Client_Runtime!Microsoft.SharePoint.Client.ClientObject.Retrieve%2B0x10%3CBR%20%2F%3E00000034%6012a06df0%2000007ff8%60e33b244a%20Microsoft_SharePoint_Client!Microsoft.SharePoint.Client.ListItem.LoadExpandoFields%2B0x11a%3CBR%20%2F%3E00000034%6012a06e50%2000007ff8%60e2df70a1%20Microsoft_SharePoint_Client_Runtime!Microsoft.SharePoint.Client.ClientObject.get_Query%2B0x2b1%3CBR%20%2F%3E00000034%6012a06ea0%2000007ff8%60e33b5530%20Microsoft_SharePoint_Client_Runtime!Microsoft.SharePoint.Client.ClientObject.Retrieve%2B0x10%3CBR%20%2F%3E00000034%6012a06ef0%2000007ff8%60e33b244a%20Microsoft_SharePoint_Client!Microsoft.SharePoint.Client.ListItem.LoadExpandoFields%2B0x11a%3CBR%20%2F%3E00000034%6012a06f50%2000007ff8%60e2df70a1%20Microsoft_SharePoint_Client_Runtime!Microsoft.SharePoint.Client.ClientObject.get_Query%2B0x2b1%3CBR%20%2F%3E00000034%6012a06fa0%2000007ff8%60e33b5530%20Microsoft_SharePoint_Client_Runtime!Microsoft.SharePoint.Client.ClientObject.Retrieve%2B0x10%3CBR%20%2F%3E00000034%6012a06ff0%2000007ff8%60e33b244a%20Microsoft_SharePoint_Client!Microsoft.SharePoint.Client.ListItem.LoadExpandoFields%2B0x11a%3CBR%20%2F%3E00000034%6012a07050%2000007ff8%60e2df70a1%20Microsoft_SharePoint_Client_Runtime!Microsoft.SharePoint.Client.ClientObject.get_Query%2B0x2b1%3CBR%20%2F%3E00000034%6012a070a0%2000007ff8%60e33b5530%20Microsoft_SharePoint_Client_Runtime!Microsoft.SharePoint.Client.ClientObject.Retrieve%2B0x10%3CBR%20%2F%3E00000034%6012a070f0%2000007ff8%60e33b244a%20Microsoft_SharePoint_Client!Microsoft.SharePoint.Client.ListItem.LoadExpandoFields%2B0x11a%3CBR%20%2F%3E00000034%6012a07150%2000007ff8%60e2df70a1%20Microsoft_SharePoint_Client_Runtime!Microsoft.SharePoint.Client.ClientObject.get_Query%2B0x2b1%3CBR%20%2F%3E00000034%6012a071a0%2000007ff8%60e33b5530%20Microsoft_SharePoint_Client_Runtime!Microsoft.SharePoint.Client.ClientObject.Retrieve%2B0x10%3CBR%20%2F%3E00000034%6012a071f0%2000007ff8%60e33b244a%20Microsoft_SharePoint_Client!Microsoft.SharePoint.Client.ListItem.LoadExpandoFields%2B0x11a%3CBR%20%2F%3E00000034%6012a07250%2000007ff8%60e2df70a1%20Microsoft_SharePoint_Client_Runtime!Microsoft.SharePoint.Client.ClientObject.get_Query%2B0x2b1%3CBR%20%2F%3E00000034%6012a072a0%2000007ff8%60e33b5530%20Microsoft_SharePoint_Client_Runtime!Microsoft.SharePoint.Client.ClientObject.Retrieve%2B0x10%3CBR%20%2F%3E00000034%6012a072f0%2000007ff8%60e33b244a%20Microsoft_SharePoint_Client!Microsoft.SharePoint.Client.ListItem.LoadExpandoFields%2B0x11a%3CBR%20%2F%3E00000034%6012a07350%2000007ff8%60e2df70a1%20Microsoft_SharePoint_Client_Runtime!Microsoft.SharePoint.Client.ClientObject.get_Query%2B0x2b1%3CBR%20%2F%3E00000034%6012a073a0%2000007ff8%60e33b5530%20Microsoft_SharePoint_Client_Runtime!Microsoft.SharePoint.Client.ClientObject.Retrieve%2B0x10%3CBR%20%2F%3E00000034%6012a073f0%2000007ff8%60e33b244a%20Microsoft_SharePoint_Client!Microsoft.SharePoint.Client.ListItem.LoadExpandoFields%2B0x11a%3CBR%20%2F%3E00000034%6012a07450%2000007ff8%60e2df70a1%20Microsoft_SharePoint_Client_Runtime!Microsoft.SharePoint.Client.ClientObject.get_Query%2B0x2b1%3CBR%20%2F%3E00000034%6012a074a0%2000007ff8%60e33b5530%20Microsoft_SharePoint_Client_Runtime!Microsoft.SharePoint.Client.ClientObject.Retrieve%2B0x10%3CBR%20%2F%3E00000034%6012a074f0%2000007ff8%60e33b244a%20Microsoft_SharePoint_Client!Microsoft.SharePoint.Client.ListItem.LoadExpandoFields%2B0x11a%3CBR%20%2F%3E00000034%6012a07550%2000007ff8%60e2df70a1%20Microsoft_SharePoint_Client_Runtime!Microsoft.SharePoint.Client.ClientObject.get_Query%2B0x2b1%3CBR%20%2F%3E00000034%6012a075a0%2000007ff8%60e33b5530%20Microsoft_SharePoint_Client_Runtime!Microsoft.SharePoint.Client.ClientObject.Retrieve%2B0x10%3CBR%20%2F%3E00000034%6012a075f0%2000007ff8%60e33b244a%20Microsoft_SharePoint_Client!Microsoft.SharePoint.Client.ListItem.LoadExpandoFields%2B0x11a%3CBR%20%2F%3E00000034%6012a07650%2000007ff8%60e2df70a1%20Microsoft_SharePoint_Client_Runtime!Microsoft.SharePoint.Client.ClientObject.get_Query%2B0x2b1%3CBR%20%2F%3E00000034%6012a076a0%2000007ff8%60e33b5530%20Microsoft_SharePoint_Client_Runtime!Microsoft.SharePoint.Client.ClientObject.Retrieve%2B0x10%3CBR%20%2F%3E00000034%6012a076f0%2000007ff8%60e33b244a%20Microsoft_SharePoint_Client!Microsoft.SharePoint.Client.ListItem.LoadExpandoFields%2B0x11a%3CBR%20%2F%3E00000034%6012a07750%2000007ff8%60e2df70a1%20Microsoft_SharePoint_Client_Runtime!Microsoft.SharePoint.Client.ClientObject.get_Query%2B0x2b1%3CBR%20%2F%3E00000034%6012a077a0%2000007ff8%60e33b5530%20Microsoft_SharePoint_Client_Runtime!Microsoft.SharePoint.Client.ClientObject.Retrieve%2B0x10%3CBR%20%2F%3E00000034%6012a077f0%2000007ff8%60e33b244a%20Microsoft_SharePoint_Client!Microsoft.SharePoint.Client.ListItem.LoadExpandoFields%2B0x11a%3CBR%20%2F%3E00000034%6012a07850%2000007ff8%60e2df70a1%20Microsoft_SharePoint_Client_Runtime!Microsoft.SharePoint.Client.ClientObject.get_Query%2B0x2b1%3CBR%20%2F%3E00000034%6012a078a0%2000007ff8%60e33b5530%20Microsoft_SharePoint_Client_Runtime!Microsoft.SharePoint.Client.ClientObject.Retrieve%2B0x10%3CBR%20%2F%3E00000034%6012a078f0%2000007ff8%60e33b244a%20Microsoft_SharePoint_Client!Microsoft.SharePoint.Client.ListItem.LoadExpandoFields%2B0x11a%3CBR%20%2F%3E00000034%6012a07950%2000007ff8%60e2df70a1%20Microsoft_SharePoint_Client_Runtime!Microsoft.SharePoint.Client.ClientObject.get_Query%2B0x2b1%3CBR%20%2F%3E00000034%6012a079a0%2000007ff8%60e33b5530%20Microsoft_SharePoint_Client_Runtime!Microsoft.SharePoint.Client.ClientObject.Retrieve%2B0x10%3CBR%20%2F%3E00000034%6012a079f0%2000007ff8%60e33b244a%20Microsoft_SharePoint_Client!Microsoft.SharePoint.Client.ListItem.LoadExpandoFields%2B0x11a%3CBR%20%2F%3E00000034%6012a07a50%2000007ff8%60e2df70a1%20Microsoft_SharePoint_Client_Runtime!Microsoft.SharePoint.Client.ClientObject.get_Query%2B0x2b1%3CBR%20%2F%3E00000034%6012a07aa0%2000007ff8%60e33b5530%20Microsoft_SharePoint_Client_Runtime!Microsoft.SharePoint.Client.ClientObject.Retrieve%2B0x10%3CBR%20%2F%3E00000034%6012a07af0%2000007ff8%60e33b244a%20Microsoft_SharePoint_Client!Microsoft.SharePoint.Client.ListItem.LoadExpandoFields%2B0x11a%3CBR%20%2F%3E00000034%6012a07b50%2000007ff8%60e2df70a1%20Microsoft_SharePoint_Client_Runtime!Microsoft.SharePoint.Client.ClientObject.get_Query%2B0x2b1%3CBR%20%2F%3E00000034%6012a07ba0%2000007ff8%60e33b5530%20Microsoft_SharePoint_Client_Runtime!Microsoft.SharePoint.Client.ClientObject.Retrieve%2B0x10%3CBR%20%2F%3E00000034%6012a07bf0%2000007ff8%60e33b244a%20Microsoft_SharePoint_Client!Microsoft.SharePoint.Client.ListItem.LoadExpandoFields%2B0x11a%3CBR%20%2F%3E00000034%6012a07c50%2000007ff8%60e2df70a1%20Microsoft_SharePoint_Client_Runtime!Microsoft.SharePoint.Client.ClientObject.get_Query%2B0x2b1%3CBR%20%2F%3E00000034%6012a07ca0%2000007ff8%60e33b5530%20Microsoft_SharePoint_Client_Runtime!Microsoft.SharePoint.Client.ClientObject.Retrieve%2B0x10%3CBR%20%2F%3E00000034%6012a07cf0%2000007ff8%60e33b244a%20Microsoft_SharePoint_Client!Microsoft.SharePoint.Client.ListItem.LoadExpandoFields%2B0x11a%3CBR%20%2F%3E00000034%6012a07d50%2000007ff8%60e2df70a1%20Microsoft_SharePoint_Client_Runtime!Microsoft.SharePoint.Client.ClientObject.get_Query%2B0x2b1%3CBR%20%2F%3E00000034%6012a07da0%2000007ff8%60e33b5530%20Microsoft_SharePoint_Client_Runtime!Microsoft.SharePoint.Client.ClientObject.Retrieve%2B0x10%3CBR%20%2F%3E00000034%6012a07df0%2000007ff8%60e33b244a%20Microsoft_SharePoint_Client!Microsoft.SharePoint.Client.ListItem.LoadExpandoFields%2B0x11a%3CBR%20%2F%3E00000034%6012a07e50%2000007ff8%60e2df70a1%20Microsoft_SharePoint_Client_Runtime!Microsoft.SharePoint.Client.ClientObject.get_Query%2B0x2b1%3CBR%20%2F%3E00000034%6012a07ea0%2000007ff8%60e33b5530%20Microsoft_SharePoint_Client_Runtime!Microsoft.SharePoint.Client.ClientObject.Retrieve%2B0x10%3CBR%20%2F%3E00000034%6012a07ef0%2000007ff8%60e33b244a%20Microsoft_SharePoint_Client!Microsoft.SharePoint.Client.ListItem.LoadExpandoFields%2B0x11a%3CBR%20%2F%3E00000034%6012a07f50%2000007ff8%60e2df70a1%20Microsoft_SharePoint_Client_Runtime!Microsoft.SharePoint.Client.ClientObject.get_Query%2B0x2b1%3CBR%20%2F%3E00000034%6012a07fa0%2000007ff8%60e33b5530%20Microsoft_SharePoint_Client_Runtime!Microsoft.SharePoint.Client.ClientObject.Retrieve%2B0x10%3CBR%20%2F%3E00000034%6012a07ff0%2000007ff8%60e33b244a%20Microsoft_SharePoint_Client!Microsoft.SharePoint.Client.ListItem.LoadExpandoFields%2B0x11a%3CBR%20%2F%3E00000034%6012a08050%2000007ff8%60e2df70a1%20Microsoft_SharePoint_Client_Runtime!Microsoft.SharePoint.Client.ClientObject.get_Query%2B0x2b1%3CBR%20%2F%3E00000034%6012a080a0%2000007ff8%60e33b5530%20Microsoft_SharePoint_Client_Runtime!Microsoft.SharePoint.Client.ClientObject.Retrieve%2B0x10%3CBR%20%2F%3E00000034%6012a080f0%2000007ff8%60e33b244a%20Microsoft_SharePoint_Client!Microsoft.SharePoint.Client.ListItem.LoadExpandoFields%2B0x11a%3CBR%20%2F%3E00000034%6012a08150%2000007ff8%60e2df70a1%20Microsoft_SharePoint_Client_Runtime!Microsoft.SharePoint.Client.ClientObject.get_Query%2B0x2b1%3CBR%20%2F%3E00000034%6012a081a0%2000007ff8%60e33b5530%20Microsoft_SharePoint_Client_Runtime!Microsoft.SharePoint.Client.ClientObject.Retrieve%2B0x10%3CBR%20%2F%3E00000034%6012a081f0%2000007ff8%60e33b244a%20Microsoft_SharePoint_Client!Microsoft.SharePoint.Client.ListItem.LoadExpandoFields%2B0x11a%3CBR%20%2F%3E00000034%6012a08250%2000007ff8%60e2df70a1%20Microsoft_SharePoint_Client_Runtime!Microsoft.SharePoint.Client.ClientObject.get_Query%2B0x2b1%3CBR%20%2F%3E00000034%6012a082a0%2000007ff8%60e33b5530%20Microsoft_SharePoint_Client_Runtime!Microsoft.SharePoint.Client.ClientObject.Retrieve%2B0x10%3CBR%20%2F%3E00000034%6012a082f0%2000007ff8%60e33b244a%20Microsoft_SharePoint_Client!Microsoft.SharePoint.Client.ListItem.LoadExpandoFields%2B0x11a%3CBR%20%2F%3E00000034%6012a08350%2000007ff8%60e2df70a1%20Microsoft_SharePoint_Client_Runtime!Microsoft.SharePoint.Client.ClientObject.get_Query%2B0x2b1%3CBR%20%2F%3E00000034%6012a083a0%2000007ff8%60e33b5530%20Microsoft_SharePoint_Client_Runtime!Microsoft.SharePoint.Client.ClientObject.Retrieve%2B0x10%3CBR%20%2F%3E00000034%6012a083f0%2000007ff8%60e33b244a%20Microsoft_SharePoint_Client!Microsoft.SharePoint.Client.ListItem.LoadExpandoFields%2B0x11a%3CBR%20%2F%3E00000034%6012a08450%2000007ff8%60e2df70a1%20Microsoft_SharePoint_Client_Runtime!Microsoft.SharePoint.Client.ClientObject.get_Query%2B0x2b1%3CBR%20%2F%3E00000034%6012a084a0%2000007ff8%60e33b5530%20Microsoft_SharePoint_Client_Runtime!Microsoft.SharePoint.Client.ClientObject.Retrieve%2B0x10%3CBR%20%2F%3E00000034%6012a084f0%2000007ff8%60e33b244a%20Microsoft_SharePoint_Client!Microsoft.SharePoint.Client.ListItem.LoadExpandoFields%2B0x11a%3CBR%20%2F%3E00000034%6012a08550%2000007ff8%60e2df70a1%20Microsoft_SharePoint_Client_Runtime!Microsoft.SharePoint.Client.ClientObject.get_Query%2B0x2b1%3CBR%20%2F%3E00000034%6012a085a0%2000007ff8%60e33b5530%20Microsoft_SharePoint_Client_Runtime!Microsoft.SharePoint.Client.ClientObject.Retrieve%2B0x10%3CBR%20%2F%3E00000034%6012a085f0%2000007ff8%60e33b244a%20Microsoft_SharePoint_Client!Mi%3C%2FP%3E%3CP%3ESTACK_COMMAND%3A%20**%20Pseudo%20Context%20**%20ManagedPseudo%20**%20Value%3A%20ffffffff%20**%20%3B%20kb%3CBR%20%2F%3ESYMBOL_NAME%3A%20Microsoft_SharePoint_Client_Runtime!Microsoft.SharePoint.Client.ClientRequest.AddQueryIdAndResultObject%2B3e%3CBR%20%2F%3EMODULE_NAME%3A%20Microsoft_SharePoint_Client_Runtime%3CBR%20%2F%3EIMAGE_NAME%3A%20Microsoft.SharePoint.Client.Runtime.dll%3CBR%20%2F%3EFAILURE_BUCKET_ID%3A%20CLR_EXCEPTION_STACK_OVERFLOW_c00000fd_Microsoft.SharePoint.Client.Runtime.dll!Microsoft.SharePoint.Client.ClientRequest.AddQueryIdAndResultObject%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3Ebut%20my%20app%20works%20with%20usually%20only%204%20documents%20at%20the%20same%20time%20so%20I%20cannot%20figure%20why%20there%20are%20so%20many%20SP%20calls.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EBtw.%20test%20documents%20are%20fairly%20small%20Excel%20files%20of%20around%2018-20kb.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EConsdering%20that%20I%20cannot%20even%20find%20where%20this%20is%20happening%20any%20idea%20will%20be%20more%20than%20appreciated.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EBtw.%20there%20is%20no%20memory%20leak%2Fissue%20as%20application%20is%20using%20around%20200-300MB%20(out%20of%2016GB).%20Also%20there%20is%20no%20recursion%20in%20coding%20and%20Microsoft.SharePointOnline.CSOM%20versions%20were%3A%20v16.21312.12000%20and%2016.1.21213.12000%20and%20with%20both%20I%20had%20same%20problem%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EThx%3C%2FP%3E%3C%2FLINGO-BODY%3E
Occasional Contributor

Hi,

 

my application connects to SharePoint Online and download documents which are processed locally (replacements in documents) and then uploaded back to SharePoint Online. Depending on settings application can keep meta data like (modified date, editor name, approval status, major/minor status) but very unpredictably application is crashing due to stack overflow in Microsoft.SharePoint.Client.ClientRequest.AddQueryIdAndResultObject.

Unfortunately, as documents are processed in separate threads when this happens main process is closed and I cannot figure what is happening.

 

To make it even more difficult in most cases when I process same location all will work but on some occasions there will be crash.

 

From crash dump I can see:

 

ERROR_CODE: (NTSTATUS) 0xc00000fd - A new guard page for the stack cannot be created.
EXCEPTION_CODE_STR: c00000fd
EXCEPTION_PARAMETER1: 0000000000000001
EXCEPTION_PARAMETER2: 0000003412a05fe0
FAULTING_THREAD: ffffffff

STACK_TEXT:
00000034`12a06600 00007ff8`e2df63be Microsoft_SharePoint_Client_Runtime!Microsoft.SharePoint.Client.ClientRequest.AddQueryIdAndResultObject+0x3e
00000034`12a06650 00007ff8`e2df6f6a Microsoft_SharePoint_Client_Runtime!Microsoft.SharePoint.Client.ClientObject.get_Query+0x17a
00000034`12a066a0 00007ff8`e33b5530 Microsoft_SharePoint_Client_Runtime!Microsoft.SharePoint.Client.ClientObject.Retrieve+0x10
00000034`12a066f0 00007ff8`e33b244a Microsoft_SharePoint_Client!Microsoft.SharePoint.Client.ListItem.LoadExpandoFields+0x11a
00000034`12a06750 00007ff8`e2df70a1 Microsoft_SharePoint_Client_Runtime!Microsoft.SharePoint.Client.ClientObject.get_Query+0x2b1
00000034`12a067a0 00007ff8`e33b5530 Microsoft_SharePoint_Client_Runtime!Microsoft.SharePoint.Client.ClientObject.Retrieve+0x10
00000034`12a067f0 00007ff8`e33b244a Microsoft_SharePoint_Client!Microsoft.SharePoint.Client.ListItem.LoadExpandoFields+0x11a
00000034`12a06850 00007ff8`e2df70a1 Microsoft_SharePoint_Client_Runtime!Microsoft.SharePoint.Client.ClientObject.get_Query+0x2b1
00000034`12a068a0 00007ff8`e33b5530 Microsoft_SharePoint_Client_Runtime!Microsoft.SharePoint.Client.ClientObject.Retrieve+0x10
00000034`12a068f0 00007ff8`e33b244a Microsoft_SharePoint_Client!Microsoft.SharePoint.Client.ListItem.LoadExpandoFields+0x11a
00000034`12a06950 00007ff8`e2df70a1 Microsoft_SharePoint_Client_Runtime!Microsoft.SharePoint.Client.ClientObject.get_Query+0x2b1
00000034`12a069a0 00007ff8`e33b5530 Microsoft_SharePoint_Client_Runtime!Microsoft.SharePoint.Client.ClientObject.Retrieve+0x10
00000034`12a069f0 00007ff8`e33b244a Microsoft_SharePoint_Client!Microsoft.SharePoint.Client.ListItem.LoadExpandoFields+0x11a
00000034`12a06a50 00007ff8`e2df70a1 Microsoft_SharePoint_Client_Runtime!Microsoft.SharePoint.Client.ClientObject.get_Query+0x2b1
00000034`12a06aa0 00007ff8`e33b5530 Microsoft_SharePoint_Client_Runtime!Microsoft.SharePoint.Client.ClientObject.Retrieve+0x10
00000034`12a06af0 00007ff8`e33b244a Microsoft_SharePoint_Client!Microsoft.SharePoint.Client.ListItem.LoadExpandoFields+0x11a
00000034`12a06b50 00007ff8`e2df70a1 Microsoft_SharePoint_Client_Runtime!Microsoft.SharePoint.Client.ClientObject.get_Query+0x2b1
00000034`12a06ba0 00007ff8`e33b5530 Microsoft_SharePoint_Client_Runtime!Microsoft.SharePoint.Client.ClientObject.Retrieve+0x10
00000034`12a06bf0 00007ff8`e33b244a Microsoft_SharePoint_Client!Microsoft.SharePoint.Client.ListItem.LoadExpandoFields+0x11a
00000034`12a06c50 00007ff8`e2df70a1 Microsoft_SharePoint_Client_Runtime!Microsoft.SharePoint.Client.ClientObject.get_Query+0x2b1
00000034`12a06ca0 00007ff8`e33b5530 Microsoft_SharePoint_Client_Runtime!Microsoft.SharePoint.Client.ClientObject.Retrieve+0x10
00000034`12a06cf0 00007ff8`e33b244a Microsoft_SharePoint_Client!Microsoft.SharePoint.Client.ListItem.LoadExpandoFields+0x11a
00000034`12a06d50 00007ff8`e2df70a1 Microsoft_SharePoint_Client_Runtime!Microsoft.SharePoint.Client.ClientObject.get_Query+0x2b1
00000034`12a06da0 00007ff8`e33b5530 Microsoft_SharePoint_Client_Runtime!Microsoft.SharePoint.Client.ClientObject.Retrieve+0x10
00000034`12a06df0 00007ff8`e33b244a Microsoft_SharePoint_Client!Microsoft.SharePoint.Client.ListItem.LoadExpandoFields+0x11a
00000034`12a06e50 00007ff8`e2df70a1 Microsoft_SharePoint_Client_Runtime!Microsoft.SharePoint.Client.ClientObject.get_Query+0x2b1
00000034`12a06ea0 00007ff8`e33b5530 Microsoft_SharePoint_Client_Runtime!Microsoft.SharePoint.Client.ClientObject.Retrieve+0x10
00000034`12a06ef0 00007ff8`e33b244a Microsoft_SharePoint_Client!Microsoft.SharePoint.Client.ListItem.LoadExpandoFields+0x11a
00000034`12a06f50 00007ff8`e2df70a1 Microsoft_SharePoint_Client_Runtime!Microsoft.SharePoint.Client.ClientObject.get_Query+0x2b1
00000034`12a06fa0 00007ff8`e33b5530 Microsoft_SharePoint_Client_Runtime!Microsoft.SharePoint.Client.ClientObject.Retrieve+0x10
00000034`12a06ff0 00007ff8`e33b244a Microsoft_SharePoint_Client!Microsoft.SharePoint.Client.ListItem.LoadExpandoFields+0x11a
00000034`12a07050 00007ff8`e2df70a1 Microsoft_SharePoint_Client_Runtime!Microsoft.SharePoint.Client.ClientObject.get_Query+0x2b1
00000034`12a070a0 00007ff8`e33b5530 Microsoft_SharePoint_Client_Runtime!Microsoft.SharePoint.Client.ClientObject.Retrieve+0x10
00000034`12a070f0 00007ff8`e33b244a Microsoft_SharePoint_Client!Microsoft.SharePoint.Client.ListItem.LoadExpandoFields+0x11a
00000034`12a07150 00007ff8`e2df70a1 Microsoft_SharePoint_Client_Runtime!Microsoft.SharePoint.Client.ClientObject.get_Query+0x2b1
00000034`12a071a0 00007ff8`e33b5530 Microsoft_SharePoint_Client_Runtime!Microsoft.SharePoint.Client.ClientObject.Retrieve+0x10
00000034`12a071f0 00007ff8`e33b244a Microsoft_SharePoint_Client!Microsoft.SharePoint.Client.ListItem.LoadExpandoFields+0x11a
00000034`12a07250 00007ff8`e2df70a1 Microsoft_SharePoint_Client_Runtime!Microsoft.SharePoint.Client.ClientObject.get_Query+0x2b1
00000034`12a072a0 00007ff8`e33b5530 Microsoft_SharePoint_Client_Runtime!Microsoft.SharePoint.Client.ClientObject.Retrieve+0x10
00000034`12a072f0 00007ff8`e33b244a Microsoft_SharePoint_Client!Microsoft.SharePoint.Client.ListItem.LoadExpandoFields+0x11a
00000034`12a07350 00007ff8`e2df70a1 Microsoft_SharePoint_Client_Runtime!Microsoft.SharePoint.Client.ClientObject.get_Query+0x2b1
00000034`12a073a0 00007ff8`e33b5530 Microsoft_SharePoint_Client_Runtime!Microsoft.SharePoint.Client.ClientObject.Retrieve+0x10
00000034`12a073f0 00007ff8`e33b244a Microsoft_SharePoint_Client!Microsoft.SharePoint.Client.ListItem.LoadExpandoFields+0x11a
00000034`12a07450 00007ff8`e2df70a1 Microsoft_SharePoint_Client_Runtime!Microsoft.SharePoint.Client.ClientObject.get_Query+0x2b1
00000034`12a074a0 00007ff8`e33b5530 Microsoft_SharePoint_Client_Runtime!Microsoft.SharePoint.Client.ClientObject.Retrieve+0x10
00000034`12a074f0 00007ff8`e33b244a Microsoft_SharePoint_Client!Microsoft.SharePoint.Client.ListItem.LoadExpandoFields+0x11a
00000034`12a07550 00007ff8`e2df70a1 Microsoft_SharePoint_Client_Runtime!Microsoft.SharePoint.Client.ClientObject.get_Query+0x2b1
00000034`12a075a0 00007ff8`e33b5530 Microsoft_SharePoint_Client_Runtime!Microsoft.SharePoint.Client.ClientObject.Retrieve+0x10
00000034`12a075f0 00007ff8`e33b244a Microsoft_SharePoint_Client!Microsoft.SharePoint.Client.ListItem.LoadExpandoFields+0x11a
00000034`12a07650 00007ff8`e2df70a1 Microsoft_SharePoint_Client_Runtime!Microsoft.SharePoint.Client.ClientObject.get_Query+0x2b1
00000034`12a076a0 00007ff8`e33b5530 Microsoft_SharePoint_Client_Runtime!Microsoft.SharePoint.Client.ClientObject.Retrieve+0x10
00000034`12a076f0 00007ff8`e33b244a Microsoft_SharePoint_Client!Microsoft.SharePoint.Client.ListItem.LoadExpandoFields+0x11a
00000034`12a07750 00007ff8`e2df70a1 Microsoft_SharePoint_Client_Runtime!Microsoft.SharePoint.Client.ClientObject.get_Query+0x2b1
00000034`12a077a0 00007ff8`e33b5530 Microsoft_SharePoint_Client_Runtime!Microsoft.SharePoint.Client.ClientObject.Retrieve+0x10
00000034`12a077f0 00007ff8`e33b244a Microsoft_SharePoint_Client!Microsoft.SharePoint.Client.ListItem.LoadExpandoFields+0x11a
00000034`12a07850 00007ff8`e2df70a1 Microsoft_SharePoint_Client_Runtime!Microsoft.SharePoint.Client.ClientObject.get_Query+0x2b1
00000034`12a078a0 00007ff8`e33b5530 Microsoft_SharePoint_Client_Runtime!Microsoft.SharePoint.Client.ClientObject.Retrieve+0x10
00000034`12a078f0 00007ff8`e33b244a Microsoft_SharePoint_Client!Microsoft.SharePoint.Client.ListItem.LoadExpandoFields+0x11a
00000034`12a07950 00007ff8`e2df70a1 Microsoft_SharePoint_Client_Runtime!Microsoft.SharePoint.Client.ClientObject.get_Query+0x2b1
00000034`12a079a0 00007ff8`e33b5530 Microsoft_SharePoint_Client_Runtime!Microsoft.SharePoint.Client.ClientObject.Retrieve+0x10
00000034`12a079f0 00007ff8`e33b244a Microsoft_SharePoint_Client!Microsoft.SharePoint.Client.ListItem.LoadExpandoFields+0x11a
00000034`12a07a50 00007ff8`e2df70a1 Microsoft_SharePoint_Client_Runtime!Microsoft.SharePoint.Client.ClientObject.get_Query+0x2b1
00000034`12a07aa0 00007ff8`e33b5530 Microsoft_SharePoint_Client_Runtime!Microsoft.SharePoint.Client.ClientObject.Retrieve+0x10
00000034`12a07af0 00007ff8`e33b244a Microsoft_SharePoint_Client!Microsoft.SharePoint.Client.ListItem.LoadExpandoFields+0x11a
00000034`12a07b50 00007ff8`e2df70a1 Microsoft_SharePoint_Client_Runtime!Microsoft.SharePoint.Client.ClientObject.get_Query+0x2b1
00000034`12a07ba0 00007ff8`e33b5530 Microsoft_SharePoint_Client_Runtime!Microsoft.SharePoint.Client.ClientObject.Retrieve+0x10
00000034`12a07bf0 00007ff8`e33b244a Microsoft_SharePoint_Client!Microsoft.SharePoint.Client.ListItem.LoadExpandoFields+0x11a
00000034`12a07c50 00007ff8`e2df70a1 Microsoft_SharePoint_Client_Runtime!Microsoft.SharePoint.Client.ClientObject.get_Query+0x2b1
00000034`12a07ca0 00007ff8`e33b5530 Microsoft_SharePoint_Client_Runtime!Microsoft.SharePoint.Client.ClientObject.Retrieve+0x10
00000034`12a07cf0 00007ff8`e33b244a Microsoft_SharePoint_Client!Microsoft.SharePoint.Client.ListItem.LoadExpandoFields+0x11a
00000034`12a07d50 00007ff8`e2df70a1 Microsoft_SharePoint_Client_Runtime!Microsoft.SharePoint.Client.ClientObject.get_Query+0x2b1
00000034`12a07da0 00007ff8`e33b5530 Microsoft_SharePoint_Client_Runtime!Microsoft.SharePoint.Client.ClientObject.Retrieve+0x10
00000034`12a07df0 00007ff8`e33b244a Microsoft_SharePoint_Client!Microsoft.SharePoint.Client.ListItem.LoadExpandoFields+0x11a
00000034`12a07e50 00007ff8`e2df70a1 Microsoft_SharePoint_Client_Runtime!Microsoft.SharePoint.Client.ClientObject.get_Query+0x2b1
00000034`12a07ea0 00007ff8`e33b5530 Microsoft_SharePoint_Client_Runtime!Microsoft.SharePoint.Client.ClientObject.Retrieve+0x10
00000034`12a07ef0 00007ff8`e33b244a Microsoft_SharePoint_Client!Microsoft.SharePoint.Client.ListItem.LoadExpandoFields+0x11a
00000034`12a07f50 00007ff8`e2df70a1 Microsoft_SharePoint_Client_Runtime!Microsoft.SharePoint.Client.ClientObject.get_Query+0x2b1
00000034`12a07fa0 00007ff8`e33b5530 Microsoft_SharePoint_Client_Runtime!Microsoft.SharePoint.Client.ClientObject.Retrieve+0x10
00000034`12a07ff0 00007ff8`e33b244a Microsoft_SharePoint_Client!Microsoft.SharePoint.Client.ListItem.LoadExpandoFields+0x11a
00000034`12a08050 00007ff8`e2df70a1 Microsoft_SharePoint_Client_Runtime!Microsoft.SharePoint.Client.ClientObject.get_Query+0x2b1
00000034`12a080a0 00007ff8`e33b5530 Microsoft_SharePoint_Client_Runtime!Microsoft.SharePoint.Client.ClientObject.Retrieve+0x10
00000034`12a080f0 00007ff8`e33b244a Microsoft_SharePoint_Client!Microsoft.SharePoint.Client.ListItem.LoadExpandoFields+0x11a
00000034`12a08150 00007ff8`e2df70a1 Microsoft_SharePoint_Client_Runtime!Microsoft.SharePoint.Client.ClientObject.get_Query+0x2b1
00000034`12a081a0 00007ff8`e33b5530 Microsoft_SharePoint_Client_Runtime!Microsoft.SharePoint.Client.ClientObject.Retrieve+0x10
00000034`12a081f0 00007ff8`e33b244a Microsoft_SharePoint_Client!Microsoft.SharePoint.Client.ListItem.LoadExpandoFields+0x11a
00000034`12a08250 00007ff8`e2df70a1 Microsoft_SharePoint_Client_Runtime!Microsoft.SharePoint.Client.ClientObject.get_Query+0x2b1
00000034`12a082a0 00007ff8`e33b5530 Microsoft_SharePoint_Client_Runtime!Microsoft.SharePoint.Client.ClientObject.Retrieve+0x10
00000034`12a082f0 00007ff8`e33b244a Microsoft_SharePoint_Client!Microsoft.SharePoint.Client.ListItem.LoadExpandoFields+0x11a
00000034`12a08350 00007ff8`e2df70a1 Microsoft_SharePoint_Client_Runtime!Microsoft.SharePoint.Client.ClientObject.get_Query+0x2b1
00000034`12a083a0 00007ff8`e33b5530 Microsoft_SharePoint_Client_Runtime!Microsoft.SharePoint.Client.ClientObject.Retrieve+0x10
00000034`12a083f0 00007ff8`e33b244a Microsoft_SharePoint_Client!Microsoft.SharePoint.Client.ListItem.LoadExpandoFields+0x11a
00000034`12a08450 00007ff8`e2df70a1 Microsoft_SharePoint_Client_Runtime!Microsoft.SharePoint.Client.ClientObject.get_Query+0x2b1
00000034`12a084a0 00007ff8`e33b5530 Microsoft_SharePoint_Client_Runtime!Microsoft.SharePoint.Client.ClientObject.Retrieve+0x10
00000034`12a084f0 00007ff8`e33b244a Microsoft_SharePoint_Client!Microsoft.SharePoint.Client.ListItem.LoadExpandoFields+0x11a
00000034`12a08550 00007ff8`e2df70a1 Microsoft_SharePoint_Client_Runtime!Microsoft.SharePoint.Client.ClientObject.get_Query+0x2b1
00000034`12a085a0 00007ff8`e33b5530 Microsoft_SharePoint_Client_Runtime!Microsoft.SharePoint.Client.ClientObject.Retrieve+0x10
00000034`12a085f0 00007ff8`e33b244a Microsoft_SharePoint_Client!Mi

STACK_COMMAND: ** Pseudo Context ** ManagedPseudo ** Value: ffffffff ** ; kb
SYMBOL_NAME: Microsoft_SharePoint_Client_Runtime!Microsoft.SharePoint.Client.ClientRequest.AddQueryIdAndResultObject+3e
MODULE_NAME: Microsoft_SharePoint_Client_Runtime
IMAGE_NAME: Microsoft.SharePoint.Client.Runtime.dll
FAILURE_BUCKET_ID: CLR_EXCEPTION_STACK_OVERFLOW_c00000fd_Microsoft.SharePoint.Client.Runtime.dll!Microsoft.SharePoint.Client.ClientRequest.AddQueryIdAndResultObject

 

but my app works with usually only 4 documents at the same time so I cannot figure why there are so many SP calls.

 

Btw. test documents are fairly small Excel files of around 18-20kb.

 

Consdering that I cannot even find where this is happening any idea will be more than appreciated.

 

Btw. there is no memory leak/issue as application is using around 200-300MB (out of 16GB). Also there is no recursion in coding and Microsoft.SharePointOnline.CSOM versions were: v16.21312.12000 and 16.1.21213.12000 and with both I had same problem

 

Thx

0 Replies