Rubberduck: v2.0.12.688 Parser error

Created on 6 Mar 2017  路  10Comments  路  Source: rubberduck-vba/Rubberduck

Just started with new download.
Open a workbook which in turn opens another referenced one.
Click Pending, after a few secs get Parser Error. Click red X but window shows no errors.
How do I find out what the problem is?
Edit: also tried on small test xlsm workbook, same thing.

bug critical parse-tree-processing

Most helpful comment

Yes, no parse errors!
Thank you

All 10 comments

You could have look at the log, and maybe post it here.
(Then we can see what has gone wrong and try to fix it in case it is a bug.)
To get any useful information, the log level will have to be set to Error at least.

You can find the setting in Rubberduck -> Settings -> General along with a button that leads you to the log folder, but I think you know that already from before.

OK, I set it to Trace.
Here's the first mention of an error:

2017-03-06 09:50:54.3929;ERROR-2.0.12.688;Rubberduck.Parsing.VBA.ComponentParseTask;Exception thrown in thread 9, ParseTaskID bf3eb322-d23c-4054-a023-91c7ac49e021.;System.IO.IOException: The process cannot access the file 'C:\ProgramData\Rubberduck\Sheet2.doccls' because it is being used by another process.
   at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
   at System.IO.File.InternalDelete(String path, Boolean checkHost)
   at System.IO.File.Delete(String path)
   at Rubberduck.Parsing.VBA.AttributeParser.Parse(IVBComponent component, CancellationToken token) in c:\Users\Mathieu\Documents\GitHub\Rubberduck\Rubberduck.Parsing\VBA\AttributeParser.cs:line 42
   at Rubberduck.Parsing.VBA.ComponentParseTask.Start(CancellationToken token) in c:\Users\Mathieu\Documents\GitHub\Rubberduck\Rubberduck.Parsing\VBA\ComponentParseTask.cs:line 56
2017-03-06 09:50:54.4509;DEBUG-2.0.12.688;Rubberduck.Parsing.VBA.RubberduckParserState;Module 'Sheet2' state is changing to 'Error' (thread 9);
2017-03-06 09:50:54.4549;DEBUG-2.0.12.688;Rubberduck.Parsing.VBA.RubberduckParserState;RubberduckParserState raised StateChanged (Error);
2017-03-06 09:50:54.4709;DEBUG-2.0.12.688;Rubberduck.Parsing.VBA.RubberduckParserState;Module 'Sheet1' state is changing to 'Parsed' (thread 8);
2017-03-06 09:50:54.4709;TRACE-2.0.12.688;Rubberduck.Parsing.VBA.ComponentParseTask;Starting ParseTaskID 76689227-14b6-4327-af51-5d46ed51012c on thread 8.;
2017-03-06 09:50:54.5104;DEBUG-2.0.12.688;Rubberduck.Parsing.VBA.RubberduckParserState;Module 'Sheet3' state is changing to 'Parsed' (thread 11);
2017-03-06 09:50:54.5261;TRACE-2.0.12.688;Rubberduck.Parsing.VBA.ComponentParseTask;Starting ParseTaskID 5bed5426-18d3-4669-82b5-0d72f5403c75 on thread 11.;
2017-03-06 09:50:54.5417;DEBUG-2.0.12.688;Rubberduck.Parsing.VBA.RubberduckParserState;Module 'ThisWorkbook' state is changing to 'Parsed' (thread 16);
2017-03-06 09:50:54.5573;TRACE-2.0.12.688;Rubberduck.Parsing.VBA.ComponentParseTask;Starting ParseTaskID 7792aa3c-1be3-4792-ad43-e506a617b7ac on thread 16.;
2017-03-06 09:50:54.5729;DEBUG-2.0.12.688;Rubberduck.Parsing.VBA.RubberduckParserState;Module 'ThisWorkbook' state is changing to 'Parsed' (thread 7);
2017-03-06 09:50:54.5886;TRACE-2.0.12.688;Rubberduck.Parsing.VBA.ComponentParseTask;Starting ParseTaskID 8de18c0a-b082-4194-9333-579e5aa244cc on thread 7.;
2017-03-06 09:50:54.6198;DEBUG-2.0.12.688;Rubberduck.Parsing.VBA.RubberduckParserState;Module 'Sheet2' state is changing to 'Parsed' (thread 15);
2017-03-06 09:50:54.6667;DEBUG-2.0.12.688;Rubberduck.Parsing.VBA.RubberduckParserState;Module 'Sheet1' state is changing to 'Parsed' (thread 10);
2017-03-06 09:50:54.6979;DEBUG-2.0.12.688;Rubberduck.Parsing.VBA.RubberduckParserState;Module 'Sheet3' state is changing to 'Parsed' (thread 8);
2017-03-06 09:50:54.7136;DEBUG-2.0.12.688;Rubberduck.Parsing.VBA.RubberduckParserState;Module 'UserTests' state is changing to 'Parsed' (thread 6);
2017-03-06 09:50:54.7292;DEBUG-2.0.12.688;Rubberduck.Parsing.VBA.RubberduckParserState;Module 'Instancing1' state is changing to 'Parsed' (thread 11);
2017-03-06 09:50:54.7448;DEBUG-2.0.12.688;Rubberduck.Parsing.VBA.RubberduckParserState;Module 'Instancing2' state is changing to 'Parsed' (thread 16);
2017-03-06 09:50:54.7604;DEBUG-2.0.12.688;Rubberduck.Parsing.VBA.RubberduckParserState;Module 'Interface' state is changing to 'Parsed' (thread 7);
2017-03-06 09:50:54.7761;DEBUG-2.0.12.688;Rubberduck.Parsing.VBA.ParseCoordinator;Parsing run got canceled. (thread 7).;
2017-03-06 09:50:54.7761;DEBUG-2.0.12.688;Rubberduck.Parsing.VBA.ParseCoordinator;Parsing run finished after 2s. (thread 7).;

And another one. Maybe it's simply code using the wrong temp path.
Could be virus scanner holding a file open. Maybe MS Defender can't use a "read-through-regardless" mode.

2017-03-06 10:03:47.3258;ERROR-2.0.12.688;Rubberduck.Parsing.VBA.ComponentParseTask;Exception thrown in thread 11, ParseTaskID c29e04f1-f0ff-4082-9952-fde3118ffbe2.;System.IO.IOException: The process cannot access the file 'C:\ProgramData\Rubberduck\ThisWorkbook.doccls' because it is being used by another process.
   at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
   at System.IO.FileStream.Init(String path, FileMode mode, FileAccess access, Int32 rights, Boolean useRights, FileShare share, Int32 bufferSize, FileOptions options, SECURITY_ATTRIBUTES secAttrs, String msgPath, Boolean bFromProxy, Boolean useLongPath, Boolean checkHost)
   at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, FileOptions options, String msgPath, Boolean bFromProxy, Boolean useLongPath, Boolean checkHost)
   at System.IO.StreamWriter.CreateFile(String path, Boolean append, Boolean checkHost)
   at System.IO.StreamWriter..ctor(String path, Boolean append, Encoding encoding, Int32 bufferSize, Boolean checkHost)
   at System.IO.File.InternalWriteAllText(String path, String contents, Encoding encoding, Boolean checkHost)
   at System.IO.File.WriteAllText(String path, String contents)
   at Rubberduck.VBEditor.SafeComWrappers.VBA.VBComponent.ExportDocumentModule(String path) in c:\Users\Mathieu\Documents\GitHub\Rubberduck\Rubberduck.VBEEditor\SafeComWrappers\VBA\VBComponent.cs:line 186
   at Rubberduck.VBEditor.SafeComWrappers.VBA.VBComponent.ExportAsSourceFile(String folder) in c:\Users\Mathieu\Documents\GitHub\Rubberduck\Rubberduck.VBEEditor\SafeComWrappers\VBA\VBComponent.cs:line 136
   at Rubberduck.Common.ModuleExporter.Export(IVBComponent component) in c:\Users\Mathieu\Documents\GitHub\Rubberduck\RetailCoder.VBE\Common\ModuleExporter.cs:line 21
   at Rubberduck.Parsing.VBA.AttributeParser.Parse(IVBComponent component, CancellationToken token) in c:\Users\Mathieu\Documents\GitHub\Rubberduck\Rubberduck.Parsing\VBA\AttributeParser.cs:line 35
   at Rubberduck.Parsing.VBA.ComponentParseTask.Start(CancellationToken token) in c:\Users\Mathieu\Documents\GitHub\Rubberduck\Rubberduck.Parsing\VBA\ComponentParseTask.cs:line 56
2017-03-06 10:03:47.3258;ERROR-2.0.12.688;Rubberduck.Parsing.VBA.ComponentParseTask;Exception thrown in thread 17, ParseTaskID 56a18f65-9629-41cf-b1bf-20622c4f015b.;System.IO.IOException: The process cannot access the file 'C:\ProgramData\Rubberduck\Sheet1.doccls' because it is being used by another process.
   at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
   at System.IO.FileStream.Init(String path, FileMode mode, FileAccess access, Int32 rights, Boolean useRights, FileShare share, Int32 bufferSize, FileOptions options, SECURITY_ATTRIBUTES secAttrs, String msgPath, Boolean bFromProxy, Boolean useLongPath, Boolean checkHost)
   at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, FileOptions options, String msgPath, Boolean bFromProxy, Boolean useLongPath, Boolean checkHost)
   at System.IO.StreamWriter.CreateFile(String path, Boolean append, Boolean checkHost)
   at System.IO.StreamWriter..ctor(String path, Boolean append, Encoding encoding, Int32 bufferSize, Boolean checkHost)
   at System.IO.File.InternalWriteAllText(String path, String contents, Encoding encoding, Boolean checkHost)
   at System.IO.File.WriteAllText(String path, String contents)
   at Rubberduck.VBEditor.SafeComWrappers.VBA.VBComponent.ExportDocumentModule(String path) in c:\Users\Mathieu\Documents\GitHub\Rubberduck\Rubberduck.VBEEditor\SafeComWrappers\VBA\VBComponent.cs:line 186
   at Rubberduck.VBEditor.SafeComWrappers.VBA.VBComponent.ExportAsSourceFile(String folder) in c:\Users\Mathieu\Documents\GitHub\Rubberduck\Rubberduck.VBEEditor\SafeComWrappers\VBA\VBComponent.cs:line 136
   at Rubberduck.Common.ModuleExporter.Export(IVBComponent component) in c:\Users\Mathieu\Documents\GitHub\Rubberduck\RetailCoder.VBE\Common\ModuleExporter.cs:line 21
   at Rubberduck.Parsing.VBA.AttributeParser.Parse(IVBComponent component, CancellationToken token) in c:\Users\Mathieu\Documents\GitHub\Rubberduck\Rubberduck.Parsing\VBA\AttributeParser.cs:line 35
   at Rubberduck.Parsing.VBA.ComponentParseTask.Start(CancellationToken token) in c:\Users\Mathieu\Documents\GitHub\Rubberduck\Rubberduck.Parsing\VBA\ComponentParseTask.cs:line 56
2017-03-06 10:03:47.3938;DEBUG-2.0.12.688;Rubberduck.Parsing.VBA.RubberduckParserState;Module 'ThisWorkbook' state is changing to 'Error' (thread 11);
2017-03-06 10:03:47.3938;DEBUG-2.0.12.688;Rubberduck.Parsing.VBA.RubberduckParserState;Module 'Sheet1' state is changing to 'Error' (thread 17);
2017-03-06 10:03:47.3938;DEBUG-2.0.12.688;Rubberduck.Parsing.VBA.RubberduckParserState;RubberduckParserState raised StateChanged (Error);

Ah, crap - we never got around to change the temp file export path to actual %temp%, did we?

@SystemsModelling can you run the host application as administrator?

We'll likely be shipping a fix to this one as a hotfix.

I'll wait for the fix.
Thanks!

I ran Excel 2010 as administrator and got this Parse error in the log, and an Excel crash on close:

2017-03-07 08:46:15.3463;TRACE-2.0.12.688;Rubberduck.Parsing.VBA.ComponentParseTask;Starting ParseTaskID 9eac330b-a052-4b92-a60f-e502a726d532 on thread 11.;
2017-03-07 08:46:15.4773;ERROR-2.0.12.688;Rubberduck.Parsing.VBA.ComponentParseTask;Exception thrown in thread 6, ParseTaskID b0ac22b4-f885-470e-9b6e-d783cb8f5294.;System.IO.IOException: The process cannot access the file 'C:\ProgramData\Rubberduck\Sheet1.doccls' because it is being used by another process.
   at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
   at System.IO.FileStream.Init(String path, FileMode mode, FileAccess access, Int32 rights, Boolean useRights, FileShare share, Int32 bufferSize, FileOptions options, SECURITY_ATTRIBUTES secAttrs, String msgPath, Boolean bFromProxy, Boolean useLongPath, Boolean checkHost)
   at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, FileOptions options, String msgPath, Boolean bFromProxy, Boolean useLongPath, Boolean checkHost)
   at System.IO.StreamWriter.CreateFile(String path, Boolean append, Boolean checkHost)
   at System.IO.StreamWriter..ctor(String path, Boolean append, Encoding encoding, Int32 bufferSize, Boolean checkHost)
   at System.IO.File.InternalWriteAllText(String path, String contents, Encoding encoding, Boolean checkHost)
   at System.IO.File.WriteAllText(String path, String contents)
   at Rubberduck.VBEditor.SafeComWrappers.VBA.VBComponent.ExportDocumentModule(String path) in c:\Users\Mathieu\Documents\GitHub\Rubberduck\Rubberduck.VBEEditor\SafeComWrappers\VBA\VBComponent.cs:line 186
   at Rubberduck.VBEditor.SafeComWrappers.VBA.VBComponent.ExportAsSourceFile(String folder) in c:\Users\Mathieu\Documents\GitHub\Rubberduck\Rubberduck.VBEEditor\SafeComWrappers\VBA\VBComponent.cs:line 136
   at Rubberduck.Common.ModuleExporter.Export(IVBComponent component) in c:\Users\Mathieu\Documents\GitHub\Rubberduck\RetailCoder.VBE\Common\ModuleExporter.cs:line 21
   at Rubberduck.Parsing.VBA.AttributeParser.Parse(IVBComponent component, CancellationToken token) in c:\Users\Mathieu\Documents\GitHub\Rubberduck\Rubberduck.Parsing\VBA\AttributeParser.cs:line 35
   at Rubberduck.Parsing.VBA.ComponentParseTask.Start(CancellationToken token) in c:\Users\Mathieu\Documents\GitHub\Rubberduck\Rubberduck.Parsing\VBA\ComponentParseTask.cs:line 56
2017-03-07 08:46:15.4773;ERROR-2.0.12.688;Rubberduck.Parsing.VBA.ComponentParseTask;Exception thrown in thread 7, ParseTaskID d7fe3f72-25cd-4b94-8793-f2526dbaf432.;System.IO.IOException: The process cannot access the file 'C:\ProgramData\Rubberduck\ThisWorkbook.doccls' because it is being used by another process.
   at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
   at System.IO.FileStream.Init(String path, FileMode mode, FileAccess access, Int32 rights, Boolean useRights, FileShare share, Int32 bufferSize, FileOptions options, SECURITY_ATTRIBUTES secAttrs, String msgPath, Boolean bFromProxy, Boolean useLongPath, Boolean checkHost)
   at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, FileOptions options, String msgPath, Boolean bFromProxy, Boolean useLongPath, Boolean checkHost)
   at System.IO.StreamWriter.CreateFile(String path, Boolean append, Boolean checkHost)
   at System.IO.StreamWriter..ctor(String path, Boolean append, Encoding encoding, Int32 bufferSize, Boolean checkHost)
   at System.IO.File.InternalWriteAllText(String path, String contents, Encoding encoding, Boolean checkHost)
   at System.IO.File.WriteAllText(String path, String contents)
   at Rubberduck.VBEditor.SafeComWrappers.VBA.VBComponent.ExportDocumentModule(String path) in c:\Users\Mathieu\Documents\GitHub\Rubberduck\Rubberduck.VBEEditor\SafeComWrappers\VBA\VBComponent.cs:line 186
   at Rubberduck.VBEditor.SafeComWrappers.VBA.VBComponent.ExportAsSourceFile(String folder) in c:\Users\Mathieu\Documents\GitHub\Rubberduck\Rubberduck.VBEEditor\SafeComWrappers\VBA\VBComponent.cs:line 136
   at Rubberduck.Common.ModuleExporter.Export(IVBComponent component) in c:\Users\Mathieu\Documents\GitHub\Rubberduck\RetailCoder.VBE\Common\ModuleExporter.cs:line 21
   at Rubberduck.Parsing.VBA.AttributeParser.Parse(IVBComponent component, CancellationToken token) in c:\Users\Mathieu\Documents\GitHub\Rubberduck\Rubberduck.Parsing\VBA\AttributeParser.cs:line 35
   at Rubberduck.Parsing.VBA.ComponentParseTask.Start(CancellationToken token) in c:\Users\Mathieu\Documents\GitHub\Rubberduck\Rubberduck.Parsing\VBA\ComponentParseTask.cs:line 56
2017-03-07 08:46:15.5633;DEBUG-2.0.12.688;Rubberduck.Parsing.VBA.RubberduckParserState;Module 'Sheet1' state is changing to 'Error' (thread 6);
2017-03-07 08:46:15.5653;DEBUG-2.0.12.688;Rubberduck.Parsing.VBA.RubberduckParserState;Module 'ThisWorkbook' state is changing to 'Error' (thread 7);
2017-03-07 08:46:15.5653;DEBUG-2.0.12.688;Rubberduck.Parsing.VBA.RubberduckParserState;RubberduckParserState raised StateChanged (Error);
2017-03-07 08:46:15.5653;DEBUG-2.0.12.688;Rubberduck.Parsing.VBA.RubberduckParserState;Module 'Sheet2' state is changing to 'Parsed' (thread 15);

@SystemsModelling hopefully the changes made in 2.0.13 fix this issue. Please confirm :smiley:

Yes, no parse errors!
Thank you

Was this page helpful?
0 / 5 - 0 ratings