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.9k stars 298 forks source link

TestExplorer stuck running the refresh progress ring #5659

Open oscarda opened 3 years ago

oscarda commented 3 years ago

Rubberduck version information Version 2.5.1.5557 OS: Microsoft Windows NT 10.0.14393.0, x64 Host Product: Microsoft Office x86 Host Version: 16.0.11929.20648 Host Executable: MSACCESS.EXE

Description After fresh installation, and clicking on any rubberduck 'refresh' icon, TestExplorer gets stuck showing non-stop the 'processing' rubberduck spinning ring. Also, all the TestExplorer menus are disabled, appart from 'add Test Module', that works correctly.

To Reproduce Steps to reproduce the behavior:

  1. Fresh install Rubberduck
  2. Click on 'refresh' (...progress rings spin, though afterwards no items populate none of Rubberduck's panels )
  3. From Test Explorer panel add a new TestModule (a new module is created with the corresponding code template)
  4. Click on 'refresh' (the spining rings trigger in CodeExplorer, TestExplorer, and CodeInspections. Little after, the progress rings stop, but not the one on the TestExplorer

Expected behavior I would expect the progress spinning ring not to be running non-stop, and more important, to see my project files in Code Explorer, and the newly created test module in the TestExporer.

Screenshots imagen imagen

Logfile Attached RubberduckLog.txt

Additional context In the CodeInspections panel, I permanently see the message 'Rubberduck doesn't see anything', while the CodeExplorer remains empty. I have read support #3490 and issue #4980, but cannot put together how to solve it and move forward.

Thanks in advance for any hint or tip to get this solved.

MDoerner commented 3 years ago

That the test explorer animation does not stop upon a parser error seems to be a bug, indeed.

As I also wrote in a reply to your comment in #4980, the reason why everything stays deactivated is that there was a parser error. You can see that in the command bar. Clicking on the red button will allow you to navigate to the parser errors RD encountered. Based on the logs, this should point you to line 39 of the module Analizador.

Note that we need to parse the code in order to make sense of it, run test and inspections. This is only possible for legal VBA code and, by now, our parser should be able to read next to all legal VBA. That is why I have asked in other issue whether your code compiles. (You can check this by clicking Compile in the Debug menu, or rather the Spanish equivalents of thosr, in your case.)

oscarda commented 3 years ago

Thank you @MDoerner!! As you point out, once I have solved the glitches in my code (spotted by Rubberduck), the parser can finish correctly, and the refresh progress ring is not stuck any more.

By the way, the Code Inspections tips are most helpful. I'm impressed with Rubberduck and the excellent team behind it!! Best wishes!!

MDoerner commented 3 years ago

I reopen thins because the the eternally spinning animation in the test explorer really is a bug. In case of a parser error, it should stop and revert back to the initial state.

MDoerner commented 3 years ago

@oscarda One side note regarding the previously undiscovered issues in your code. In the VBE's options, there is an option to compile on demand, which probably is checked. This has the effect that the VBE essentially only compiles what is needed to run the code you are trying to execute. This can mask issues in other modules not necessary for what you run. So, our recommendation is to turn it off and let the compiler always compile the full project on execution, or more precisely, all uncompiled parts of the project.

oscarda commented 3 years ago

Thanks again @MDoerner. Your recomendation is being most helpful!! When unchecked the "compile on demand" option, lots of issues came up in the code, and now I have the chance to correct them all.