Rubberduck
Rubberduck copied to clipboard
Autodesk Inventor 2018 - Unexpected exception thrown in parsing run. An item with the same key has already been added.
Rubberduck version information Version 2.5.2.6030 OS: Microsoft Windows NT 6.2.9200.0, x64 Host Product: Autodesk® Inventor® 2018 x64 Host Version: Autodesk Inventor 2018 Host Executable: INVENTOR.EXE
Description The software works correctly when first loaded and refreshed, with 1-2 documents open. If you open 2-3 documents, you get an Unexpected Exception. The log shows the following.
2021-12-08 15:58:47.8572;ERROR-2.5.2.6030;Rubberduck.Parsing.VBA.ParseCoordinator;Unexpected exception thrown in parsing run. (thread 39).;System.ArgumentException: An item with the same key has already been added.
at System.ThrowHelper.ThrowArgumentException(ExceptionResource resource)
at System.Collections.Generic.Dictionary`2.Insert(TKey key, TValue value, Boolean add)
at Rubberduck.Parsing.VBA.ComReferenceLoading.COMReferenceSynchronizerBase.RefreshReferencedByProjectId()
at Rubberduck.Parsing.VBA.ComReferenceLoading.COMReferenceSynchronizerBase.SyncComReferences(CancellationToken token)
at Rubberduck.Parsing.VBA.ParsingStageService.SyncComReferences(CancellationToken token)
at Rubberduck.Parsing.VBA.ParseCoordinator.SyncComReferences(IReadOnlyCollection`1 toParse, CancellationToken token, HashSet`1 toReresolveReferences)
at Rubberduck.Parsing.VBA.ParseCoordinator.ExecuteCommonParseActivities(IReadOnlyCollection`1 toParse, IReadOnlyCollection`1 toReresolveReferencesInput, IReadOnlyCollection`1 newProjectIds, CancellationToken token)
at Rubberduck.Parsing.VBA.ParseCoordinator.ParseAllInternal(Object requestor, CancellationToken token)
at Rubberduck.Parsing.VBA.ParseCoordinator.ParseAll(Object requestor)
To Reproduce Steps to reproduce the behavior:
- Open Inventor and a part/assembly file.
- Open the VBA editor.
- Refresh Rubberduck.
- Close the VBA editor.
- Open several other part/assembly files.
- Open the VBA editor.
- See error.
Expected behavior For Rubberduck to continue working with more than 1-2 open documents.
Logfile Logfile snippet included above.