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.91k stars 299 forks source link

Excel and VBE are unresponsive #5403

Closed zspitz closed 4 years ago

zspitz commented 4 years ago

Rubberduck version information

Rubberduck version 2.5.0.5304 loading:
Operating System: Microsoft Windows NT 6.2.9200.0 x64
Host Product: Microsoft Office 2010 x86
Host Version: 14.0.7245.5000
Host Executable: EXCEL.EXE;

Description Opening a relatively large VBA project causes both the VBE and Excel to become unresponsive -- neither window can be activated; menu items and buttons don't work; can't interact with the worksheet or worksheet tabs.

To Reproduce Steps to reproduce the behavior:

  1. Open the Battleship project

Expected behavior VBE and Excel should be responsive

Logfile RubberduckLog.txt

Additional context Windows doesn't seem to recognize the window as having frozen.

Excel seems to be showing high CPU usage.

A9G-Data-Droid commented 4 years ago

I'm seeing a similar behavior in an Access project. It used to work fine with this project. I added one module and now parsing takes a very long time. When the parsing is complete I can no longer interact with Access at all. I can't click on a single thing in the VBE or in the Access GUI. It's completely frozen. The only way to recover is to close the application. I have uninstalled RD as I can't use it on my current project anymore. I've Tried the previous stable release as well as the most recent "pre" release. Same behavior.

daFreeMan commented 4 years ago

@A9G-Data-Droid it would be very helpful if you would reinstall RD, set debugging to Trace, reproduce the issue, then post the log here. Then uninstall it again, as it's obviously not being helpful at the moment.

A9G-Data-Droid commented 4 years ago

I don't want to post the whole thing here. I can share some redacted snips that seem interesting. RubberduckLogREDACTED.txt

A9G-Data-Droid commented 4 years ago

Ok, that's better.

MDoerner commented 4 years ago

The COM exceptions are very suspicious. Since this happens in Excel, the host app should not be Access.

Does the project reference the Access object model? If yes, is the reference priority higher than the one for the Excel object model? (Is is on top of the Excel one in the VBE`s References dialog?)

A9G-Data-Droid commented 4 years ago

Sorry, I'm not OP. I'm jumping in to say I see the same thing in Access. I thought it might be related. zspitz included his log file at the beginning of this issue. His errors are different than mine. Should I make a different Issue?

zspitz commented 4 years ago

@MDoerner Any suggestions for me?

MDoerner commented 4 years ago

This might actually be related to #5442. Could you see whether you have the same problem with version 5226?

zspitz commented 4 years ago

@MDoerner Specifically 5226? Or 5226 and later?

MDoerner commented 4 years ago

5226 or earlier

zspitz commented 4 years ago

5226 seems to work -- at least it opens, and I can interact with both the VBA IDE and the Rubberduck UI.

zspitz commented 4 years ago

@MDoerner Just a ping; not sure if you're getting notifications here or not.

MDoerner commented 4 years ago

I get notification. Since it works with that version, there is a good chance that it is related. The bad thing is that the issue seems to be related to a race condition in the grouping grid control. That will not be easy to debug. In particular, the battleship project does not hang in any way for me with the current version.

MDoerner commented 4 years ago

Can you still reproduce this with Rubberduck v2.5.0.5457-pre or newer? That PR fixed a bug in the test explorer UI causing a freeze for some projects.

zspitz commented 4 years ago

It seems to be working now. Both the VBE and the host application are responsive. I also checked the following:

Is there anything further you want me to check or do before closing?

MDoerner commented 4 years ago

Thanks for checking, It seems that it was the same issue as in #5442. Accordingly, I close this issue as fixed by PR #5506.