openstudiocoalition / OpenStudioApplication

The OpenStudio Application is a fully featured graphical interface to OpenStudio models including envelope, loads, schedules, and HVAC.
https://openstudiocoalition.org
Other
137 stars 25 forks source link

Windows: Machine restart required to completely uninstall app #71

Closed eomere closed 3 years ago

eomere commented 4 years ago

Issue overview

The windows version of the app does not completely uninstall when prompted.

Current Behavior

The directory containing all originally downloaded information does not get deleted. This is because it holds a bin file that won't delete. Upon restarting the computer, both the directory and bin file were deleted.

Expected Behavior

When uninstalled, all items associated with the app should be deleted.

Steps to Reproduce

Install the app, then uninstall it.

jmarrec commented 4 years ago

Which bin file won't delete?

eomere commented 4 years ago

Hi Julien,

I and another team member encountered this problem over a month ago. Unfortunately I don’t recall the details here. Are you unable to recreate the issue when you uninstall the OS App?

Emmanuel

Sent from Mailhttps://go.microsoft.com/fwlink/?LinkId=550986 for Windows 10

From: Julien Marrecmailto:notifications@github.com Sent: Thursday, January 23, 2020 3:55 PM To: NREL/OpenStudioApplicationmailto:OpenStudioApplication@noreply.github.com Cc: Emmanuel Omeremailto:eomere@psdconsulting.com; Authormailto:author@noreply.github.com Subject: Re: [NREL/OpenStudioApplication] Windows: Machine restart required to completely uninstall app (#71)

Which bin file won't delete?

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHubhttps://github.com/NREL/OpenStudioApplication/issues/71?email_source=notifications&email_token=ANIEEKJPJUFXVUTPLWLOA53Q7H72DA5CNFSM4KIOLCG2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEJY2FCQ#issuecomment-577872522, or unsubscribehttps://github.com/notifications/unsubscribe-auth/ANIEEKJ6HFOOEJXVSV7N7STQ7H72DANCNFSM4KIOLCGQ.

jmarrec commented 4 years ago

I just don't really use windows unless I really have to. Anyways, I tried it out today:

Try 1:

  1. Install OS App
  2. Uninstall OS App. works fine

Try 2:

  1. Install OS App
  2. Launch OS App.
  3. Close OS App. Seems like I have a hanging "openstudio.exe" process
  4. Uninstall OS App. uninstaller says it's fine. But I still have C:\openstudioapplication-1.0.0-pre1\bin\ (the "bin" folder) on my disk, and that folder is plain empty. I still see openstudio.exe as Running in the Task Manager. I also see QtWebEngineProcess.exe (3 of them) which could be related.
jmarrec commented 4 years ago

Ok, so I have a lead:

If I open OS App, and wait a few seconds before I close it, then OpenStudioApp.exe and openstudio.exe are both killed. If I open OS App and close it right after, openstudio.exe gets orphaned.

So it looks like in a way if I don't wait out for the measure manager to start properly, then closing the OS App doesn't make the cli stop.

The measure manager is started in a non-blocking way, and we use a future to see when it's started and then use connectOSDocumentSignals, so perhaps that makes some sense.

https://github.com/NREL/OpenStudioApplication/blob/aaff5fd8a72ef81af90c4226b551d12a2d4c7f0e/src/openstudio_app/OpenStudioApp.cpp#L216-L225


I can also confirm that when I log into my session, I don't have any "QtWebEngineProcess.exe", then after launching OS App the first time I do have 3. Closing OS app leaves 3 of them running. Opening two instances of OS App doesn't change the fact that 3 are running.


jmarrec commented 4 years ago

I'm probably not the right person to track down this problem, but I'll label the issue accordingly.

macumber commented 3 years ago

It's possible that orphan CLI processes were holding this folder locked. When this happens next can you use unlocker to see which process it is? If it is openstudio then there is a good chance that will be fixed in https://github.com/openstudiocoalition/OpenStudioApplication/issues/369

jmarrec commented 3 years ago

Assuming it's fixed by #369, and if not need more info to reproduce. Happy to reopen if bug is confirmed with 1.2.0 (or 1.2.0-rc6) and more info is provided