Reading file.ListItemAllFields occasionally ends-up in stackoverflow

Copper Contributor

Hi,

my application is downloading files from SharePoint.Online and then I am using file.ListitemAllFields to be able to read fields on list item attached to that document (I need only fields like Editor, Modified, _ModerationStatus, _ModerationComment). Unfortunately, application is, periodically, crashing and from dump file I see:

This dump file has an exception of interest stored in it.
The stored exception information can be accessed via .ecxr.
(6904.4ea4): Stack overflow - code c00000fd (first/second chance not available)

MethodDesc: 00007ff8470f71c0
Method Name: Microsoft.SharePoint.Client.ClientRequest.AddQueryIdAndResultObject(Int64, System.Object)
Class: 00007ff8470ef838
MethodTable: 00007ff8470f7358
mdToken: 00000000060000db
Module: 00007ff845314428
IsJitted: yes
CodeAddr: 00007ff846c0e060
Transparency: Transparent
MethodDesc: 00007ff845315f10
Method Name: Microsoft.SharePoint.Client.ClientObject.get_Query()
Class: 00007ff84534cdf0
MethodTable: 00007ff845315fd8
mdToken: 000000000600002c
Module: 00007ff845314428
IsJitted: yes
CodeAddr: 00007ff846c0eee0
Transparency: Transparent
MethodDesc: 00007ff847124b18
Method Name: Microsoft.SharePoint.Client.ListItem.LoadExpandoFields()
Class: 00007ff84710b268
MethodTable: 00007ff847124cc8
mdToken: 0000000006000602
Module: 00007ff845311e08
IsJitted: yes
CodeAddr: 00007ff848f26780
Transparency: Transparent
MethodDesc: 00007ff845315f10
Method Name: Microsoft.SharePoint.Client.ClientObject.get_Query()
Class: 00007ff84534cdf0
MethodTable: 00007ff845315fd8
mdToken: 000000000600002c
Module: 00007ff845314428
IsJitted: yes
CodeAddr: 00007ff846c0eee0
Transparency: Transparent
MethodDesc: 00007ff847124b18
Method Name: Microsoft.SharePoint.Client.ListItem.LoadExpandoFields()
Class: 00007ff84710b268

....

ERROR_CODE: (NTSTATUS) 0xc00000fd - A new guard page for the stack cannot be created.

(this is repeating until crash) so all points to some problem in Microsoft.SharePoint.Client*

Is there any other way to get list item fields connected to file uploaded to the SharePoint instead of doing file.ListItemAllFields. At the end, I need very small subset of fields and always only from exactly 1 document.

Thx

0 Replies