{"action":"created","issue":{"url":"https://api.github.com/repos/rubberduck-vba/Rubberduck/issues/3787","repository_url":"https://api.github.com/repos/rubberduck-vba/Rubberduck","labels_url":"https://api.github.com/repos/rubberduck-vba/Rubberduck/issues/3787/labels{/name}","comments_url":"https://api.github.com/repos/rubberduck-vba/Rubberduck/issues/3787/comments","events_url":"https://api.github.com/repos/rubberduck-vba/Rubberduck/issues/3787/events","html_url":"https://github.com/rubberduck-vba/Rubberduck/issues/3787","id":299497923,"number":3787,"title":"Unexpected exception thrown in parsing run after Compact & Repair","user":{"login":"alexkadis","id":4106499,"avatar_url":"https://avatars2.githubusercontent.com/u/4106499?v=4","gravatar_id":"","url":"https://api.github.com/users/alexkadis","html_url":"https://github.com/alexkadis","followers_url":"https://api.github.com/users/alexkadis/followers","following_url":"https://api.github.com/users/alexkadis/following{/other_user}","gists_url":"https://api.github.com/users/alexkadis/gists{/gist_id}","starred_url":"https://api.github.com/users/alexkadis/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/alexkadis/subscriptions","organizations_url":"https://api.github.com/users/alexkadis/orgs","repos_url":"https://api.github.com/users/alexkadis/repos","events_url":"https://api.github.com/users/alexkadis/events{/privacy}","received_events_url":"https://api.github.com/users/alexkadis/received_events","type":"User","site_admin":false},"labels":[{"id":141909750,"url":"https://api.github.com/repos/rubberduck-vba/Rubberduck/labels/bug","name":"bug","color":"b60205","default":true}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":20,"created_at":"2018-02-22T20:31:57Z","updated_at":"2018-02-26T15:18:57Z","closed_at":null,"author_association":"NONE","body":"When opening Access for the first time #2915 is resolved. But if I run Compact & Repair, a similar error occurs:\r\n\r\n```\r\n2018-02-22 15:28:18.9582;ERROR-2.1.2.2870;Rubberduck.Parsing.VBA.ParseCoordinator;Unexpected exception thrown in parsing run. (thread 14).;System.Runtime.InteropServices.COMException (0x80010105): The server threw an exception. (Exception from HRESULT: 0x80010105 (RPC_E_SERVERFAULT))\r\n   at Microsoft.Vbe.Interop.VBProjectClass.get_Protection()\r\n   at Rubberduck.Navigation.CodeExplorer.CodeExplorerProjectViewModel..ctor(FolderHelper folderHelper, Declaration declaration, IEnumerable`1 declarations) in C:\\projects\\rubberduck\\RetailCoder.VBE\\Navigation\\CodeExplorer\\CodeExplorerProjectViewModel.cs:line 37\r\n   at Rubberduck.Navigation.CodeExplorer.CodeExplorerViewModel.<HandleStateChanged>b__51_2(IGrouping`2 grouping) in C:\\projects\\rubberduck\\RetailCoder.VBE\\Navigation\\CodeExplorer\\CodeExplorerViewModel.cs:line 319\r\n   at System.Linq.Enumerable.WhereSelectListIterator`2.MoveNext()\r\n   at System.Collections.Generic.List`1..ctor(IEnumerable`1 collection)\r\n   at System.Linq.Enumerable.ToList[TSource](IEnumerable`1 source)\r\n   at Rubberduck.Navigation.CodeExplorer.CodeExplorerViewModel.HandleStateChanged(Object sender, ParserStateEventArgs e) in C:\\projects\\rubberduck\\RetailCoder.VBE\\Navigation\\CodeExplorer\\CodeExplorerViewModel.cs:line 318\r\n   at System.EventHandler`1.Invoke(Object sender, TEventArgs e)\r\n   at Rubberduck.Parsing.VBA.ParseCoordinator.ExecuteCommonParseActivities(IReadOnlyCollection`1 toParse, IReadOnlyCollection`1 toReresolveReferencesInput, CancellationToken token) in C:\\projects\\rubberduck\\Rubberduck.Parsing\\VBA\\ParseCoordinator.cs:line 244\r\n   at Rubberduck.Parsing.VBA.ParseCoordinator.ParseAllInternal(Object requestor, CancellationToken token) in C:\\projects\\rubberduck\\Rubberduck.Parsing\\VBA\\ParseCoordinator.cs:line 378\r\n   at Rubberduck.Parsing.VBA.ParseCoordinator.ParseAll(Object requestor, CancellationToken token) in C:\\projects\\rubberduck\\Rubberduck.Parsing\\VBA\\ParseCoordinator.cs:line 313\r\n```\r\n\r\nOpening as a new issue at the request of @bclothier"},"comment":{"url":"https://api.github.com/repos/rubberduck-vba/Rubberduck/issues/comments/368536996","html_url":"https://github.com/rubberduck-vba/Rubberduck/issues/3787#issuecomment-368536996","issue_url":"https://api.github.com/repos/rubberduck-vba/Rubberduck/issues/3787","id":368536996,"user":{"login":"MDoerner","id":22868956,"avatar_url":"https://avatars1.githubusercontent.com/u/22868956?v=4","gravatar_id":"","url":"https://api.github.com/users/MDoerner","html_url":"https://github.com/MDoerner","followers_url":"https://api.github.com/users/MDoerner/followers","following_url":"https://api.github.com/users/MDoerner/following{/other_user}","gists_url":"https://api.github.com/users/MDoerner/gists{/gist_id}","starred_url":"https://api.github.com/users/MDoerner/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/MDoerner/subscriptions","organizations_url":"https://api.github.com/users/MDoerner/orgs","repos_url":"https://api.github.com/users/MDoerner/repos","events_url":"https://api.github.com/users/MDoerner/events{/privacy}","received_events_url":"https://api.github.com/users/MDoerner/received_events","type":"User","site_admin":false},"created_at":"2018-02-26T15:18:57Z","updated_at":"2018-02-26T15:18:57Z","author_association":"CONTRIBUTOR","body":"I just had a look at the code throwing the error. The problem is not the `ProjectsRepository`, which should get refreshed just fine. The problem are the project references saved on the declarations. These still point to the old object.\r\n\r\nI guess we are not refreshing these because the project events fire in rapid succession such that we never get to the clean up part before cancellation of the parsing run. Then, after all events have fired, all projects are there again, with the same project ids. Thus, they do not get reparsed.\r\n\r\nMaybe, we could just add all modules in inaccessible projects to the list of modules to reparse. That would at least make the error recoverable by parsing again. "}}
{"actor":{"display_login":"MDoerner"}}