pyrevitlabs / pyRevit

Rapid Application Development (RAD) Environment for Autodesk Revit®
http://wiki.pyrevitlabs.io
GNU General Public License v3.0
1.28k stars 332 forks source link

pyRevit is crashing Revit on startup #2031

Closed gnomesoup closed 8 months ago

gnomesoup commented 9 months ago

🐞 Describe the bug

Starting this morning all but 1 out of 12 pyRevit installations are causing Revit to close before it finishes loading with no error message. I cannot determine the difference with the single installation that will still correctly load pyRevit.

If I run the pyrevit detach --all command, Revit will open without pyRevit. I have tried disabling all other plugins and restarting without success. The journal file does report several errors that begin with:

' 0:< API_ERROR { : Assembly version conflict in some references in pyRevitLoader.dll assembly
'Addin's module RevitAPI of version 22.0.0.0 conflicts with same preloaded module of version 21.0.0.0
'Addin's module RevitAPIUI of version 22.0.0.0 conflicts with same preloaded module of version 21.0.0.0 }

More of the errors are included below. Has anyone seen this behavior before. As far as I know there where no changes to our environment overnight. pyRevit ran fine for everyone yesterday.

♻️ To Reproduce

Steps to reproduce the behavior:

  1. Open Revit 2021 or greater with pyrevit installed and attached

⏲️ Expected behavior

Revit loads pyRevit and continues to open

🖼 Screenshots of the issue

If applicable, add screenshots to help explain your problem.

🖥️ Hardware and Software Setup (please complete the following information):

master | Product: "Autodesk Revit 2021" | Engine: IPY2710 (2710) | Path: "C:\Users\Michael_P\AppData\Roaming\pyRevit\pyRevit\master" | AllUsers
master | Product: "2020.2.0" | Engine: IPY2710 (2710) | Path: "C:\Users\Michael_P\AppData\Roaming\pyRevit\pyRevit\master" | AllUsers
==> Installed Extensions
==> Default Extension Search Path
C:\Users\Michael_P\AppData\Roaming\pyRevit\Extensions
==> Extension Search Paths
==> Extension Sources - Default
https://github.com/eirannejad/pyRevit/raw/master/extensions/extensions.json
==> Extension Sources - Additional
==> Installed Revits
Autodesk Revit 2021 | Version: 21.1.90.15 | Build: 20230907_1515(x64) | Language: 1033 | Path: "C:\Program Files\Autodesk\Revit 2021\"
2020.2.0 | Version: 20.2.90.12 | Build: 20220517_1515(x64) | Language: 1033 | Path: "C:\Program Files\Autodesk\Revit 2020\"
==> Running Revit Instances
==> User Environment
Microsoft Windows 10 [Version 10.0.19045]
Executing User: KSA\Michael_P
Active User:
Admin Access: Yes
%APPDATA%: "C:\Users\Michael_P\AppData\Roaming"
Latest Installed .Net Framework: 4.8
No .Net Target Packs are installed.
No .Ne-Core Target Packs are installed.
pyRevit CLI v4.8.13.23182+2215

Additional context

Below is the relevant lines from the journal file

Jrn.RibbonEvent "TabActivated:Add-Ins"
' 0:< ::50:: Delta VM: Avail +16 -> 134210919 MB, Used +5 -> 655 MB, Peak +5 -> 661 MB; RAM: Avail -1417 -> 51104 MB, Used +6 -> 825 MB 
' 0:< GUI Resource Usage GDI: Avail 9809, Used 191, User: Used 173 
' 0:< API_ERROR { : Assembly version conflict in some references in pyRevitLoader.dll assembly
'Addin's module RevitAPI of version 22.0.0.0 conflicts with same preloaded module of version 21.0.0.0
'Addin's module RevitAPIUI of version 22.0.0.0 conflicts with same preloaded module of version 21.0.0.0 } 
' 0:< API_ERROR { : Assembly version conflict in some references in IKVM.Reflection assembly
'Addin's module mscorlib of version 2.0.0.0 conflicts with same preloaded module of version 4.0.0.0
'Addin's module System of version 2.0.0.0 conflicts with same preloaded module of version 4.0.0.0 } 
' 0:< API_ERROR { : Assembly version conflict in some references in pyRevitRunner assembly
'Addin's module RevitAPIUI of version 22.0.0.0 conflicts with same preloaded module of version 21.0.0.0
'Addin's module RevitAPI of version 22.0.0.0 conflicts with same preloaded module of version 21.0.0.0 } 
' 0:< ::50:: Delta VM: Avail -33 -> 134210887 MB, Used +22 -> 677 MB, Peak +19 -> 680 MB; RAM: Avail -40 -> 51064 MB, Used +36 -> 862 MB, Peak +15 -> 865 MB 
' 0:< GUI Resource Usage GDI: Avail 9809, Used 191, User: Used 173 
' 0:< API_ERROR { : Assembly version conflict in some references in Microsoft.WindowsAPICodePack assembly
'Addin's module mscorlib of version 2.0.0.0 conflicts with same preloaded module of version 4.0.0.0
'Addin's module System of version 2.0.0.0 conflicts with same preloaded module of version 4.0.0.0
'Addin's module System.Windows.Forms of version 2.0.0.0 conflicts with same preloaded module of version 4.0.0.0
'Addin's module System.Core of version 3.5.0.0 conflicts with same preloaded module of version 4.0.0.0 } 
' 0:< API_ERROR { : Assembly version conflict in some references in Microsoft.WindowsAPICodePack.Shell assembly
'Addin's module mscorlib of version 2.0.0.0 conflicts with same preloaded module of version 4.0.0.0
'Addin's module System.Windows.Forms of version 2.0.0.0 conflicts with same preloaded module of version 4.0.0.0
'Addin's module PresentationFramework of version 3.0.0.0 conflicts with same preloaded module of version 4.0.0.0
'Addin's module System of version 2.0.0.0 conflicts with same preloaded module of version 4.0.0.0
'Addin's module WindowsBase of version 3.0.0.0 conflicts with same preloaded module of version 4.0.0.0
'Addin's module PresentationCore of version 3.0.0.0 conflicts with same preloaded module of version 4.0.0.0
'Addin's module System.Drawing of version 2.0.0.0 conflicts with same preloaded module of version 4.0.0.0
'Addin's module System.Core of version 3.5.0.0 conflicts with same preloaded module of version 4.0.0.0
'Addin's module WindowsFormsIntegration of version 3.0.0.0 conflicts with same preloaded module of version 4.0.0.0 } 
' 0:< ::50:: Delta VM: Avail -6 -> 134210881 MB, Used +7 -> 684 MB, Peak +4 -> 684 MB; RAM: Avail -25 -> 51040 MB, Used +8 -> 871 MB, Peak +5 -> 871 MB 
' 0:< GUI Resource Usage GDI: Avail 9809, Used 191, User: Used 173 
' 0:< API_ERROR { : Assembly version conflict in some references in MadMilkman.Ini assembly
'Addin's module mscorlib of version 2.0.0.0 conflicts with same preloaded module of version 4.0.0.0
'Addin's module System of version 2.0.0.0 conflicts with same preloaded module of version 4.0.0.0 } 
' 0:< API_ERROR { : Assembly version conflict in some references in System.Reflection.Metadata assembly
'Addin's module System.Collections.Immutable of version 1.2.3.0 conflicts with same preloaded module of version 1.2.2.0 } 
' 0:< API_ERROR { : Assembly version conflict in some references in Microsoft.CodeAnalysis assembly
'Addin's module System.Collections.Immutable of version 1.2.3.0 conflicts with same preloaded module of version 1.2.2.0 } 
' 0:< ::50:: Delta VM: Avail -16 -> 134210865 MB, Used +4 -> 689 MB, Peak +4 -> 689 MB; RAM: Avail +10 -> 51050 MB, Used +8 -> 879 MB, Peak +8 -> 879 MB 
' 0:< GUI Resource Usage GDI: Avail 9809, Used 191, User: Used 173 
' 0:< API_ERROR { : Assembly version conflict in some references in Microsoft.CodeAnalysis.CSharp assembly
'Addin's module System.Collections.Immutable of version 1.2.3.0 conflicts with same preloaded module of version 1.2.2.0 } 
' 0:< API_ERROR { : Assembly version conflict in some references in pyRevitLabs.Common assembly
'Addin's module System.Collections.Immutable of version 1.2.3.0 conflicts with same preloaded module of version 1.2.2.0 } 
' 0:< API_ERROR { : Assembly version conflict in some references in Microsoft.CodeAnalysis.VisualBasic assembly
'Addin's module System.Collections.Immutable of version 1.2.3.0 conflicts with same preloaded module of version 1.2.2.0 } 
jmcouffin commented 9 months ago

What has worked in the past, either:

jmcouffin commented 9 months ago

It must be something that was added or removed out of the system, IMHO

jmcouffin commented 8 months ago

No news is good news, I will close the issue for now. Feel free to ping me to reopen if needed