Rubberduck: 'Unexpected Error' and 'Out of Memory' when launching VBE

Created on 29 Apr 2016  路  3Comments  路  Source: rubberduck-vba/Rubberduck

I wanted to build and run my own version of Rubberduck so that I could track down a Parser Error in a huge VBA codebase. So I followed the exact setup guide in Contributing; building, running regasm and adding registry keys. I have also uninstalled the stock version of Rubberduck.

Now when I open Excel, it throws up generic 'Unexpected Error' messages on startup and then periodically. There are more of the same error if I try to open Excel's Options.

If I try to open VBE, I get 'Out of Memory' and the editor does not load.

Any ideas?

bug

Most helpful comment

The cause of this issue was absence of HKEY_CURRENT_USER\Software\Microsoft\VBA\VBE\6.0\Addins64\Rubberduck.Extension\LoadBehavior

I had accidentally called it LoadBehaviour instead of LoadBehavior because I am British.

All 3 comments

Rubberduck isn't loaded until the VBE is first opened, as you might notice in the debug output window when you F5-launch Excel from Visual Studio... is there VBA code that runs when the workbook is opened? Does Rubberduck load when a VBA macro executes code at startup but the VBE hasn't been brought up yet?

That 'Out of Memory' error is scary... How big is the project? How many type libraries are referenced? Does it load normally with an empty workbook/project? @autoboosh would you think the memory footprint of 50K+ Declaration instances (and, say, as many IdentifierReference instances) could be a problem?

Hi, thanks for responding!

The project does run a Macro at startup, I didn't check whether this triggers Rubberduck as I couldn't get it to catch on any breakpoints. I did not persist at that task for long, though, I could have another go next week.

The project has the following entities with code, let's assume they have 200 lines each (seems to be the average):

  • 1 Sheet
  • 2 Forms
  • 8 Modules
  • 47 Class Modules

= 11,600 lines of code, roughly?

So, hopefully not as huge as

50K+ Declaration instances

The cause of this issue was absence of HKEY_CURRENT_USER\Software\Microsoft\VBA\VBE\6.0\Addins64\Rubberduck.Extension\LoadBehavior

I had accidentally called it LoadBehaviour instead of LoadBehavior because I am British.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

Hosch250 picture Hosch250  路  3Comments

ChrisBrackett picture ChrisBrackett  路  3Comments

susnick picture susnick  路  3Comments

ghost picture ghost  路  3Comments

bclothier picture bclothier  路  3Comments