I'm trying to reach the Google API Services (Plus Service in this case), using simple C# console application. Each time I call the API functions I'm encountering a very weird exception:
An unhandled exception of type 'System.AccessViolationException' occurred in Unknown Module.
Additional information: Attempted to read or write protected memory. This is often an indication that other memory is corrupt.
This is happened when I'm getting the API endpoints like this example:
Client.People.Get("me").Execute();
Did anyone got this problem before?
EDIT:
I have downloaded the GPlus sample, and still getting the same problem, but now inside:
Oauth2Service.TokeninfoRequest request = service.Tokeninfo();
I think the common case here is about generated code classes:
EDIT 2:
I'm attaching the stacktrace:
at Google.Apis.Plus.v1.PeopleResource.GetRequest.set_UserId(String value) at Google.Apis.Plus.v1.PeopleResource.GetRequest..ctor(IClientService service, String userId) in c:\code.google.com\google-api-dotnet-client\default_gen\Tools\Google.Apis.NuGet.Publisher\Template\Build\Google.Apis.Plus.v1.cs:line 2661 at Google.Apis.Plus.v1.PeopleResource.Get(String userId) in c:\code.google.com\google-api-dotnet-client\default_gen\Tools\Google.Apis.NuGet.Publisher\Template\Build\Google.Apis.Plus.v1.cs:line 2649 at Core.External.GoogleService.GooglePlusApplicationClient.Test() in e:\Copy\Feedly\Backend\Core.External.GooglePlus\GooglePlusApplicationClient.cs:line 34 at FeedlyTest.Program.Main(String[] args) in e:\Projects\Feedly\Backend\Testing\Program.cs:line 88
EDIT 3:
When I'm using the Ctrl+F5 combination, it's working. I read that combination is disabling the debugger. First thought, maybe in the debugger mode, the system is running at 32bit (and then can't access the memory which outside the 32bit boundary) . I tried to change the debug platform to 64bit, but it wasn't help.