rubberduck-vba / Rubberduck

Every programmer needs a rubberduck. COM add-in for the VBA & VB6 IDE (VBE).
https://rubberduckvba.com
GNU General Public License v3.0
1.92k stars 302 forks source link

Code parser stuck #2121

Closed TZubiri closed 7 years ago

TZubiri commented 8 years ago

rubberduck.txt

Stuck at "Loading References"

TZubiri commented 8 years ago

I'm sorry if I am being vague, let me know what other info I can provide.

Vogel612 commented 8 years ago

hmmm... From the log I take that this is not happening directly at startup, but rather after you clicked onto "Test Explorer", correct?

Because interestingly the Parser seems to be stuck in a loop starting the parse-process for all your modules after the process was completed...

The same 5 modules are changing to "Pending" over and over in the last lines of the log. Before that there's a short time where the RawInput API has a few invalid handle messages. Aside from that this should definitely not be stuck at "Loading References"

TZubiri commented 8 years ago

Each loop corresponds to each time I hit the refresh button next to the parsing state. On another project this is the debug message that appears each time I refresh. Same problem 2016-07-22 15:02:03.0400;DEBUG;Rubberduck.App;App handles StateChanged (ResolvingReferences), evaluating menu states...;

TZubiri commented 8 years ago

This is happening at startup

Hosch250 commented 8 years ago

I fixed a bug with this not too long ago when the Rubberduck Source Control 1.0 library is referenced. Do you have a reference to this library?

TZubiri commented 8 years ago

No. The only Rubberduck library I have is called rubberduck. I installed it with this script because I didn't have admin privileges: https://github.com/rubberduck-vba/Rubberduck/issues/2086

Hosch250 commented 8 years ago

OK. I'm not sure what's up with this. Is it a consistent issue in this project, or does it only happen randomly?

TZubiri commented 8 years ago

rubberduck.txt I tried it on a 3rd project and it is still stuck at "resolving references".

Hosch250 commented 8 years ago

Peculiar. That log should result in a parser error.

Vogel612 commented 8 years ago

Same NoViableAltException shows up in the log attached in #2113

TZubiri commented 8 years ago

The test explorer being empty is what originally caused this. I added a test module with a testMethod1 stub, nothing appears in the test explorer, no clue how to run it. Run all tests doesn't runn the testModule1 I just added which should fail. rubberduck.txt

Hosch250 commented 8 years ago

If there is a parser/resolve declarations error, the tests won't be able to run. Also, you didn't delete any of the '@ comments, did you? Those are annotations that we use to know what is what.

TZubiri commented 8 years ago

rubberduck.txt Actions done on this log: Deleted old test method Refreshed parser state Opened test explorer Added new test module (with test method stub and early binding) Ran all tests.

Hosch250 commented 8 years ago

Did it work?

TZubiri commented 8 years ago

No. Test should fail, but nothing happens

Hosch250 commented 8 years ago

Would it be possible to share the project? It sounds like there is a parser error somewhere that should be addressed.

TZubiri commented 8 years ago

I'll see what I can do.

TZubiri commented 8 years ago

What files do you need? I couldn't narrow it down to a single file

Hosch250 commented 8 years ago

The .xlsx/.xlsm file should be good.

TZubiri commented 8 years ago

rubberduck.txt I added a test method on a healthy file that was showing "ready" and it is stuck on pending now. Macro - Copy.xlsm.txt

Again , test doesn't show up and doesn't run.

TZubiri commented 8 years ago

Note: I can't upload any of the original projects.

Hosch250 commented 8 years ago

I can't reproduce this. It may be because the PS script you ran did not install Rubberduck correctly.

TZubiri commented 8 years ago

Any clue as to how I might have access to unit tests from a clean install with no admin privileges?

Hosch250 commented 8 years ago

Not really. I will probably be doing a release later today (unless some super serious bug shows its ugly head), so you could try uninstalling and installing the new release.

TZubiri commented 8 years ago

Ok

Hosch250 commented 8 years ago

Is this still an issue? If it is, is it an issue with all workbooks (including empty ones) or just certain ones?

TZubiri commented 8 years ago

Yes. I reinstalled. Here is the new log RubberduckLog.txt And here is the .xlsm file Dev.txt

Hosch250 commented 8 years ago

untitled

Hosch250 commented 8 years ago

Seems to work fine here.

TZubiri commented 8 years ago

What excel version is that? I have 2010

Hosch250 commented 8 years ago

2016 on Windows 10, but the same IDE. It doesn't make a difference.

camosborn21 commented 8 years ago

I'm having the same issue. Program hangs on "Resolving References" when I parse open projects. The hang up seems to be, for me, directly tied to having the Rubberduck reference turned on in the reference library. If I use late binding it works just fine.

Working in Access on Windows 7/Office 2010 and Windows 10/Office 2016

retailcoder commented 8 years ago

@camosborn21 interesting. can you confirm the build number? 2.0.9?

camosborn21 commented 8 years ago

Yes 2.0.9

Also, I'm having frequent, though not as near as I can tell consistent, crash to desktop errors when I close Access. Which you have noted in the build notes for 2.0.9; just thought I'd let you know I'm seeing the same glitch on both my Windows7/Office 2010 machine as well as Windows 10/Office 2016 machine.

retailcoder commented 8 years ago

@camosborn21 that crash on exit has been narrowed down to the dockable toolwindows and the commandbar, see the teardown timeline in #2322: something is preventing proper destruction of these objects. The crash is host-independent.

camosborn21 commented 8 years ago

@retailcoder Thanks for the info on the crashing. Let me know if there's any additional info I can provide you for you to see what's going on with the "Resolving References" hang up.

retailcoder commented 7 years ago

ref. #2459