VS 2017 Crashes after external change of project

(tescosw) #1

I’ve probably found a bug in Oxygen Extension in VS 2017. Visual Studio crashed after I’ve made a change in one of my projects externally and after prompt to Reload the solution in VS it crashed. Here is report info…

Application: devenv.exe
Framework Version: v4.0.30319
Description: The process was terminated due to an unhandled exception.
Exception Info: System.InvalidOperationException
at Microsoft.Build.Shared.ErrorUtilities.ThrowInvalidOperation(System.String, System.Object[])
at Microsoft.Build.Evaluation.ProjectCollection+LoadedProjectCollection.AddProject(Microsoft.Build.Evaluation.Project)
at Microsoft.Build.Evaluation.ProjectCollection.AfterUpdateLoadedProjectGlobalProperties(Microsoft.Build.Evaluation.Project)
at Microsoft.Build.Evaluation.Project.SetGlobalProperty(System.String, System.String)
at RemObjects.VisualStudio.Project.ProjectNode.SetConfiguration(RemObjects.VisualStudio.Project.ConfigPair)
at RemObjects.VisualStudio.Project.ProjectNode.SetCurrentConfiguration()
at RemObjects.VisualStudio.Project.ProjectNode.GetMsBuildProperty(System.String)
at RemObjects.VisualStudio.Project.ProjectNode.GetProjectProperty(System.String)
at RemObjects.Oxygene.VisualStudio.OxygeneProject.OxygeneProjectNodeProperties.GetProperty(System.String)
at RemObjects.Oxygene.VisualStudio.OxygeneProject.PropertyAccessor.GetProperty[[RemObjects.Oxygene.Code.CompilerMode, RemObjects.Elements, Version=, Culture=neutral, PublicKeyToken=3df3cad1b7aa5098]](System.String, RemObjects.Oxygene.Code.CompilerMode)
at RemObjects.Oxygene.VisualStudio.OxygeneProject.OxygeneProjectNodeProperties.get_Mode()
at RemObjects.Oxygene.VisualStudio.OxygeneProject.OxygeneProjectNode.IsSharedProject()
at RemObjects.Oxygene.VisualStudio.OxygeneProject.OxygeneProjectNodeProperties.get_IsSharedProject()
at RemObjects.Oxygene.VisualStudio.OxygeneProject.OxygeneProjectNode+d__19.MoveNext()
at System.Runtime.CompilerServices.AsyncMethodBuilderCore+<>c.b__6_0(System.Object)
at System.Windows.Threading.ExceptionWrapper.InternalRealCall(System.Delegate, System.Object, Int32)
at System.Windows.Threading.ExceptionWrapper.TryCatchWhen(System.Object, System.Delegate, System.Object, Int32, System.Delegate)
at System.Windows.Threading.DispatcherOperation.InvokeImpl()
at System.Windows.Threading.DispatcherOperation.InvokeInSecurityContext(System.Object)
at MS.Internal.CulturePreservingExecutionContext.CallbackWrapper(System.Object)
at System.Threading.ExecutionContext.RunInternal(System.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object, Boolean)
at System.Threading.ExecutionContext.Run(System.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object, Boolean)
at System.Threading.ExecutionContext.Run(System.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object)
at MS.Internal.CulturePreservingExecutionContext.Run(MS.Internal.CulturePreservingExecutionContext, System.Threading.ContextCallback, System.Object)
at System.Windows.Threading.DispatcherOperation.Invoke()
at System.Windows.Threading.Dispatcher.ProcessQueue()
at System.Windows.Threading.Dispatcher.WndProcHook(IntPtr, Int32, IntPtr, IntPtr, Boolean ByRef)
at MS.Win32.HwndWrapper.WndProc(IntPtr, Int32, IntPtr, IntPtr, Boolean ByRef)
at MS.Win32.HwndSubclass.DispatcherCallbackOperation(System.Object)
at System.Windows.Threading.ExceptionWrapper.InternalRealCall(System.Delegate, System.Object, Int32)
at System.Windows.Threading.ExceptionWrapper.TryCatchWhen(System.Object, System.Delegate, System.Object, Int32, System.Delegate)
at System.Windows.Threading.Dispatcher.LegacyInvokeImpl(System.Windows.Threading.DispatcherPriority, System.TimeSpan, System.Delegate, System.Object, Int32)
at MS.Win32.HwndSubclass.SubclassWndProc(IntPtr, Int32, IntPtr, IntPtr)

Also… the extension uninstalls right after it.
I’m sending activitylog.

ActivityLog.xml (76.9 KB)

Thank you for your help,

(viktoriad) #2

Hello David,
Could you please provide us with steps on how to reproduce the problem? Does it happen to a particular project, or with any project? What happens, if you open the project again, and do changes externally again? Does it show the same problem again?

(tescosw) #3

Unfortunately, now I’m not even able to replicate this issue because of Oxygene extension in VS is just crashing… and it sends me this to output window of Visual Studio.

Unspecified error (Exception from HRESULT: 0x80004005 (E_FAIL))
at EnvDTE.DTEClass.get_ActiveSolutionProjects()
at RemObjects.Oxygene.VisualStudio.CrossBoxUI.CrossBoxUIPackage.d__74.MoveNext()
— End of stack trace from previous location where exception was thrown —
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at RemObjects.Oxygene.VisualStudio.CrossBoxUI.CrossBoxUIPackage.d__93.MoveNext()
— End of stack trace from previous location where exception was thrown —
at System.Runtime.CompilerServices.AsyncMethodBuilderCore.<>c.b__6_0(Object state)
at System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Int32 numArgs)
at System.Windows.Threading.ExceptionWrapper.TryCatchWhen(Object source, Delegate callback, Object args, Int32 numArgs, Delegate catchHandler)

(viktoriad) #4

Did you try to reinstall Oxygene again? Did it help to fix the problem?

(tescosw) #5

Yes, we tried it. It seems like the installation is broken. It happens on multiple computers in our company. We also noticed that it can uninstall itself. This usually happens when the extension crashes like I mentioned above.

(Carlo Kok) #6

@viktoriad could this be the fix your did for the lockup? That was in crossbox ui.

(viktoriad) #7

We have added several important fixes to the build, that are supposed to fix your problem too. The fixes will be available in the next build. Please, let us know if that helps you.
Thanks in advance.

(tescosw) #8

Ok, so after updating to the new preview version the error messages dissapeared but aplication still keeps uninstalling itself after some time. We’ve found out that if we rename the uninstallation file then this issue dissapers. It’s not a solution but at least it works.

(Carlo Kok) #9

you’re literally getting out uninstaller? or the VS uninstall extension dialog?

If our uninstaller, can you see in ProcExp.exe who ran it? Nothing in our tools runs setup directly.

(tescosw) #10

No, I get no dialog. The app just dissapears. It isn’t even in the C:\ProgramFiles(x86)\RemObjects\Elements directory.

My testcase is:

  1. Full install of Elements with water.
  2. Using it for a while
  3. After variable amount of time and VS closing/openings I try to open solution file with elements projects in it and it informs me, that elements projects are incompatible… that’s how I discover that the program has been uninstalled. When I check program files the Elements folder is empty (only Bin folder and uninstall executable arein there, no libraries).

(Carlo Kok) #11

hrmm. This makes no sense. Nothing even has access to those directories (they’re system owned, you need UAC elevation to delete it). Could this be a virusscanner of some kind?

(tescosw) #12

Ok, so I’ve discovered that after I install the program this process starts to run. Unfortunatelly I cannot get more info about it since it errors out that I don’t have access to it. I’ve asked our technicians about it and I will inform you if we find something.

(tescosw) #13

Ok, so I’ve left my PC running overnight and when I started up ProcessExplorer as admin, there are multiple instances of uninstallation executeble running.

(tescosw) #14

Ok, we’ve found out why this happens. WMI Provider Host periodically runs this script ‘uninstall.bat’. In the picture bellow you can see it’s location. We are still trying to determine why this script exists.

(Carlo Kok) #15

Wow; that’s (obviously) not one of our things.