DynamoDS / Dynamo

Open Source Graphical Programming for Design
https://dynamobim.org
Other
1.72k stars 632 forks source link

Dynamo won't open at all #1951

Closed frankfralick closed 10 years ago

frankfralick commented 10 years ago

Dynamo won't start. I merged this morning into a branch that exactly matches your master. I hit the Dynamo addin button, the wheel spins for a few seconds, then the button remains grayed out after control returns to Revit. I can use Revit after this, but Dynamo button stays grayed out.

To make sure I wasn't doing something to cause this, I installed Dynamo from your most recent Dynamo installer (DynamoInstall0.7.1.20140714T0722.exe). This produced the same behavior.

Sometime after calling "CreateDynamoRevitControllerAndViewModel" in DynamoRevit, the main thread runs out of things to do, and ProtoScript.Runners.LiveRunner.TaskExecMethod just runs over and over, sleeping for 10ms, waiting for a task.

This could be a red herring, but the two times I stepped through, the main thread makes it to "Dynamo.VisualizationManager" constructor before control suddenly returns to Revit, and the main thread in the threads window reads "unavailable" like it doesn't have any code left to execute.

This seems like some sort of threading issue. Any help on this is greatly appreciated. I was trying to get you guys something this morning on my other recently opened issue, but I have to get Dynamo running to do that.

I observed this behavior last week, but upon restarting Revit the issue would go away, so this doesn't necessarily have anything to do with changes since last Thursday.

ikeough commented 10 years ago

Hi Frank. I've just tried with the latest build, and I can open on top of both Revit 2014 and Revit 2015. Can you try the absolute latest build and let us know if you're still experiencing difficulty.

ikeough commented 10 years ago

BTW, the Dynamo button going gray is an indication that Dynamo is running. Do you use a dual monitor setup? I wonder if the Dynamo window is getting shot off into space somewhere.

frankfralick commented 10 years ago

@ikeough Thanks for the quick response. I'm aware about the graying out of the button indicating Dynamo is running, which is why I'm so confused. I can see when debugging that it is running, it just seems like it isn't ever hitting .Show()/ever coming back from creating the controller/view.

Just an extra idiot check, if I recall, when Dynamo is running and there is a window, it is visable/selectable from the task bar (on pcs). This is what it looks like when after selecting. I don't think there is a window somewhere where I can't see it. Normally Revit and Dynamo would be visible when hovering over Revit in the task bar.

dynamorevit 2014-07-14 no start 02

I am going to try some installers from a few days ago in the morning just to see if there is some difference, although I do feel an embarrassing realization coming on, in the same vein as the multiple monitors suggestion.

Benglin commented 10 years ago

This looks more like a crashing case to me, @frankfralick. You mentioned control returned to Dynamo while stepping through VisualizationManagerRevit, do you know exactly which line does the control return to Dynamo? That might be the place it crashes.

frankfralick commented 10 years ago

@Benglin It gets to the constructor of VisualizationManagerRevit, line 26. The next step, which calls base() is where control returns.

dynamorevit 2014-07-15 no start

frankfralick commented 10 years ago

Also, I checked out your master this morning onto a new branch so this is your latest code and none of mine mixed in.

mjkkirschner commented 10 years ago

Hi Frank, do you get any addin loader errors when you start revit?

frankfralick commented 10 years ago

@holyjewsus no it appears to start normally

frankfralick commented 10 years ago

Well guys, I think I got to the bottom of this, now I'm going to go get to the bottom of a bottle. Somehow on Friday, DynamoCore.dll got put in Revit's install directory. I'm not sure what I could have done to make that happen. After two days of pulling my hair out I happened to look at the Modules window while debugging and saw DynamoCore.dll was being loaded from Revit's install directory. What the hell! I deleted it and Dynamo immediately worked. Sorry for spinning everyone's wheels.

ikeough commented 10 years ago

Whoa. Frank. Good catch. It's a really weird thing that DynamoCore would get into Revit's install directory. That would, understandably, wreak havoc with our assembly resolution mechanisms. Do you have any idea how this happened? Did you make a copy of it into the Revit directory for some reason, and forget about it? If you can think of anything, let us know because we definitely don't want this happening to others.

I'll close this issue for now, but feel free to reopen if there is something that we need to fix to avoid this behavior.

minismore commented 9 years ago

Hi Frank, I'm having the same issue. can you tell me where to delete the Dynamo.Core.dll file? I deleted the dll file nested within dynamo 0.7, but i'm having the same issue of the program not opening and not showing up in the task ribbon.