MrPig91 / PSChiaPlotter

A repo for powershell module that helps Chia Plotting
MIT License
181 stars 47 forks source link

Does gui stops if you close the Powershell window? #81

Closed lenith closed 3 years ago

lenith commented 3 years ago

I closed Powershell window and GUI disappeared without any warning. However it seems plotting in background. If that's true, how can bring back the gui?

Is it required to keep both PS and gui open?

Jaga-Telesin commented 3 years ago

Yes, if the Powershell instance that spawned the PSChiaPlotter GUI closes, the GUI will close along with it. I ran into a crash ~1 week ago that gave similar results - even the log files for PSChiaPlotter were gone. The GUI never re-populated itself as it wasn't aware of running jobs anymore.

Just leave both running, and if/when you want to close the PSChiaPlotter GUI, use the red X in the upper right - it'll give a safety prompt confirming it. In the meantime, your chia.exe plots will continue until they are done with their current .plot files. You'll just need to wait until then (or cancel them manually if you want and delete .tmp files), before starting the plotter GUI up again and kicking off a new set.

lenith commented 3 years ago

Not sure whether it's doable however may be this is something @MrPig91 wants to look into and make the gui run standalone without keeping PS window open all the time or atleast throw a prompt to user if by mistake someone tries to close the PS.

Another option could be to add some command to bring the gui back from background, may be reload the initial parameter file and current status from log?

MrPig91 commented 3 years ago

I am working on the update to have GUI be separate from the powershell Window that started the GUI process. This also very easily solves my logging issue. I had very little logging in the application because many runspaces (threads) could try to write to the same a log file at the same time which would cause errors and missing logs. I was thinking about using the BlockCollection class to get around this, but instead starting a transcript of this new hidden powershell window makes this seamless. As far as having the a new instance of the GUI pick up where it left off (if closed by accident)... that feature is not in the near future. It is a little bit more complicated then it would seem with how the application was written.

MrPig91 commented 3 years ago

Ended up being a little less straight forward in the end for the logging part, but I just released the latest version where you can now close the starting window. So you are less likely to accidentally close the GUI.