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

Access from Office365 (ver. 2019?) hangs and crashes with Rubberduck #5663

Closed RandalR closed 3 years ago

RandalR commented 3 years ago

Rubberduck version information Version 2.5.1.5676 as well as 2.5.1.5557 OS: Microsoft Windows NT 10.0.19042.0, x64 Host Product: Microsoft Office x64 Host Version: 16.0.13127.21064 Host Executable: MSACCESS.EXE

Description I am researching what appear to be hangs and crashes in ACCESS (Office 365 or 2019 version) when Rubberduck (either version) is loaded and starts at VBE startup.

To Reproduce It seems to be repeatable - for instance - when I choose (in Access) File-->Info-->"Compact and Repair Database". Access will then either hang (requiring an End Task), or crash completely (leaving the process unfinished and a temporary "compact" database e.g. Database1.mdb in the same directory.) This hang/crash has also happened when using a basic Datasheet form to enter a new Record into a Table (with and without any associated VBA code).

Doing the same operations after removing/disabling Rubberduck (via VBE Add-in Manager, uncheck "Loaded/Unloaded" and "Load on Startup") on an identical copy of the database works as normal, with no exceptions.

I fully acknowledge that this could be a symptom of something else, and that I've just scratched the surface.

I am continuing to test. I wish I had more to go on, I'm sorry.

Expected behavior I expected Rubberduck not to influence or interfere with the "Database" side of operations, and it to keep to itself "inside" the VBE.

Screenshots There are no screenshots available.

Logfile I will turn this on and continue to test to see if Rubberduck issues any logging before Access crashes.

Additional context I've also gone in and disabled any code associated with the form that was involved in the crashes/hangs without any effect. I have recreated the form involved from scratch, and still get a hang when adding a record. The Compact/Repair crashes are the most troubling as it leaves the Database file in an unknown state and anything that has been subjected to an "End Task" doesn't have a chance to close out things nicely.

I fully admit that it could be pure coincidence or that 'disabling' Rubberduck actually changes something else about the Database Project so that the crashes/hangs go away. I don't believe that it is my code that is causing this, as it is very simple, and didn't change the behavior when I removed it.

I would really appreciate some guidance or things to try or look at, as I am currently stumped. Thanks!

RandalR commented 3 years ago

My apologies. Additional testing has shown that it is not Rubberduck causing the Access 365 crashes. It did seem that way after an initial round of analysis, but I have managed to narrow it down to one table (perhaps two) in the database. Adding a new record to this table can trigger the hang and I am still attempting to figure out why. It's not the code (I removed all of it), it's not the form (happens adding to the table), it's not memory issues, hard drive issues, record locking issues. The work continues. Again. Rubberduck is NOT the culprit and I will close this now.

bclothier commented 3 years ago

Though the issue was closed as unrelated, I'm just noting that we did found a AV occurring when parse is hit at certain point, and compacting & repairing may have hit that issue because it implicitly does a parse in response to the project unloading & reloading. The AV causes a pointer to leak which then will crash Access when the user tries to quit Access normally.

The issue has been addressed in the PR #5675. You are welcome to pull from the build and test to confirm if this avoids crashing of Access.