SpeckleRhino icon indicating copy to clipboard operation
SpeckleRhino copied to clipboard

Multiple menus are appearing in Grasshopper

Open jjsolly opened this issue 4 years ago • 8 comments

Step 0:

Expected Behaviour

How things should actually work! - Probably should only have one menu item. SpeckleSpeckleSpeckle

Actual Behaviour

What's actually going on! - Have multiple menu items (SpeckleSpeckleSpeckle... probably soon to be SpeckleSpeckleSpeckleSpeckle)

Affected Projects

Does this issue propagate to other dependencies or dependants? If so, list them here! - Is just annoying.

Reproduction Steps & System Config (win, osx, web, etc.)

Windows 64 bit, Rhino 6 SR24, latest version Speckle (from 2 days ago)

Proposed Solution (if any)

No idea for proposed solution. But thanks as always for the great work!

2020-04-16 16_19_16-Window

jjsolly avatar Apr 16 '20 15:04 jjsolly

Hello @jjsolly ! Might have been caused by some old Speckle installations, do you recall installing it previously at all or having IT installing it? Or have you maybe built and debugged it yourself?

I'd suggest trying the following solutions in order:

  • uninstall Speckle form programs and features and then reinstall it
  • manually delete %localappdata%\McNeel\Rhinoceros\6.0\Plug-ins\Speckle Rhino Plugin (512d9705-6f92-49ca-a606-d6d5c1ac6aa2)\ and then reinstall Speckle

teocomi avatar Apr 16 '20 15:04 teocomi

Sorry, closed by mistake... 🤦‍♂️

teocomi avatar Apr 16 '20 15:04 teocomi

Hi @teocomi it's a totally fresh installation from the other day and I did what you said already. So i don't think it should be that. But I can try again and report back. I assumed maybe there was an on-load command that can't see that the menu is already there?

jjsolly avatar Apr 16 '20 15:04 jjsolly

Quite weird, aside having multiple SpeckleGrasshopper.gha on your machine I can't think on anything causing that...

teocomi avatar Apr 16 '20 15:04 teocomi

FYI @teocomi I have had the same issue quite a few times. E.g. I recently completely reset my computer and installed Speckle once, got two menus on top. For some reasons I have only one now... it's a bit unpredictable... (also not sure what to report more precisely that could help)

PaulPoinet avatar Apr 16 '20 15:04 PaulPoinet

This issue is so annoying (it's a dupe of #277, but doesn't matter). The code is here: https://github.com/speckleworks/SpeckleRhino/blob/master/SpeckleGrasshopper/Loader.cs

To add a menu to the top bar, we need to run a timer function to see if gh is loaded. For some reason i never got it right, and the AddSpeckleMenu does its job more than once (or the timer elapsed function is called multiple times between when setting the MenuHasBeenAdded semaphore.

I'll try and have a look next week, unless someone else picks it up.

In the meantime, please refer to this issue as the Speckle Ad Project. The faster your machine is, the more speckle menus you get.

didimitrie avatar Apr 17 '20 07:04 didimitrie

^^ That's why I never had it on my machine... 🐌

teocomi avatar Apr 17 '20 07:04 teocomi

the MetaHopper plugin avoids a timer by including this line in PriorityLoad():

Instances.CanvasCreated += new Instances.CanvasCreatedEventHandler(this.RegisterNewMenuItems);

daviddekoning avatar Oct 10 '20 05:10 daviddekoning