Page 1 of 3

Exit XYcopy upon close of XYplorer

Posted: 18 Jul 2010 22:51
by zer0
Under certain conditions, XYcopy.exe remains running after one exits XYplorer. Having trawled the changelog, I did notice that if XYplorer is exited while a file op is in progress then XYcopy will try to finish it, thereby keeping XYcopy.exe running. This causes a problem when updating using an installer version as it tries to replace XYcopy.exe (even if it's the same version), but cannot do so as it is running. Further, I'm sure there are ways to make -- not necessarily intentionally -- XYcopy try to do an op that it cannot do, but will keep trying, thus keeping XYcopy.exe running. Manual termination of that process remedies the situation.

So I suppose there are a couple of wishes here:
- Have installer only replace files that are newer than existing ones.
- Have a tweak (or a GUI drop-down list in Config, plenty of space in File Ops ;)) that sets out the desired action -- exit/keep running -- applied to XYcopy when XYplorer is exited.

Having the former would allow updating while a file op is in progress, while having the latter would take care of situations when XYcopy gets "stuck". Worth the effort, Don? :)

P.S. Yes, I know that I can update using a portable version, but I'm weird like that :P

Re: Exit XYcopy upon close of XYplorer

Posted: 19 Jul 2010 00:47
by nas8e9
zer0 wrote:Further, I'm sure there are ways to make -- not necessarily intentionally -- XYcopy try to do an op that it cannot do, but will keep trying, thus keeping XYcopy.exe running. Manual termination of that process remedies the situation.
I'm not sure about XYcopy.exe encountering a problem and then retrying without popping up some UI. After all, it's just a helper program that calls the same shell file functions as Windows Explorer. Have you actually seen a case where XYcopy.exe specifically or shell file operations generally, get stuck without reporting back? Also, XYcopy.exe definitely shows the shell UI for the file operation on Windows 7 (not sure about XP), which includes a Cancel button. You mean hitting the Cancel button doesn't cause XYcopy.exe to terminate?

If the latter is true, could that be because you have several jobs still in the queue at the time of closing XYplorer? I'm not completely sure what XYcopy.exe is meant to do when XYplorer.exe quits: should it process the entire queue at the time of closing XYplorer.exe or should it just complete the current job? I suspect the latter. (I seem to remember Don posting about how the XYcopy.exe instance that processes the queue, only gets one job at the time from the parent process.)
- Have a tweak (or a GUI drop-down list in Config, plenty of space in File Ops ;)) that sets out the desired action -- exit/keep running -- applied to XYcopy when XYplorer is exited.
I'm not sure that's a simple request in that cancelling a job has huge potential to leave your files and folders in an inconsistent state (some *were* copied/moved/deleted, some not). The native UI shows a cancel button so it's possible in principle; I'm not sure however whether operations can be cancelled by the application calling the shell file functions. Since the queue version of XYcopy.exe by definition (well, probably; see above) will only process the job it currently has (although if memory serves, you do have some very long running jobs), it should in most cases complete fairly quickly. Again, I'd personally be uncomfortable with cancelling a job midway: I'm not a huge fan of inconsistency in my file system... :)

I have no opinion with regard to your installer request, but my gut feeling is that modifying XYcopy behaviour is best left until XYcopy 2.0 (with full UI control for XYplorer, among other things) comes along. I'm definitely interested in your experiences with regard to the shell file functions going wrong.

Re: Exit XYcopy upon close of XYplorer

Posted: 19 Jul 2010 11:15
by zer0
nas8e9 wrote:I'm not sure about XYcopy.exe encountering a problem and then retrying without popping up some UI. After all, it's just a helper program that calls the same shell file functions as Windows Explorer. Have you actually seen a case where XYcopy.exe specifically or shell file operations generally, get stuck without reporting back? Also, XYcopy.exe definitely shows the shell UI for the file operation on Windows 7 (not sure about XP), which includes a Cancel button. You mean hitting the Cancel button doesn't cause XYcopy.exe to terminate?
I have encountered numerous situations when XYcopy.exe gets stuck. They are difficult to reproduce as I don't notice that XYcopy.exe is still running until after XYplorer is closed. And, as the XYcopy log is not retained between sessions, it's impossible to determine which job caused the problem.

As for the shell UI, it never appears for those stuck jobs. This leads me to recall that they get stuck in a "Queued" state and never come out of it.
nas8e9 wrote:If the latter is true, could that be because you have several jobs still in the queue at the time of closing XYplorer? I'm not completely sure what XYcopy.exe is meant to do when XYplorer.exe quits: should it process the entire queue at the time of closing XYplorer.exe or should it just complete the current job? I suspect the latter. (I seem to remember Don posting about how the XYcopy.exe instance that processes the queue, only gets one job at the time from the parent process.)
Personally, I never intentionally close XYplorer while there are jobs in the queue. I assume that if there is no shell UI showing, no jobs are running. With the Background Bar being a small button that is relegated way outside of the peripheral vision, it's difficult to notice which state it is in.
nas8e9 wrote:
- Have a tweak (or a GUI drop-down list in Config, plenty of space in File Ops ;)) that sets out the desired action -- exit/keep running -- applied to XYcopy when XYplorer is exited.
I'm not sure that's a simple request in that cancelling a job has huge potential to leave your files and folders in an inconsistent state (some *were* copied/moved/deleted, some not). The native UI shows a cancel button so it's possible in principle; I'm not sure however whether operations can be cancelled by the application calling the shell file functions. Since the queue version of XYcopy.exe by definition (well, probably; see above) will only process the job it currently has (although if memory serves, you do have some very long running jobs), it should in most cases complete fairly quickly. Again, I'd personally be uncomfortable with cancelling a job midway: I'm not a huge fan of inconsistency in my file system... :)
In my experience, jobs only get stuck in a queued state. Therefore, perhaps, such an option should cancel queued jobs.

Alternatively, maybe a pop-up that alerts a user that jobs are queued/running when he/she tries to exit XYplorer? We already have a tweak for such a pop-up when closing XYplorer via X in top RHC. Having a version tailored to situations when jobs are running would be appreciated. Its caption could be "There are background jobs queued/running. Are you sure you want to exit XYplorer?" :)

Re: Exit XYcopy upon close of XYplorer

Posted: 19 Jul 2010 12:44
by admin
Currently I have no complaints here (apart from yours now), and I myself (using BP all the time all over the day) never experienced any issue (BTW, this feature has been outstandingly bug free ever since).

I have to conclude that the current behavior suits the vast majority of users.

And, as nas8e9 said, the time for changes will be when XYcopy 2.0 comes (no, I have no date).

Re: Exit XYcopy upon close of XYplorer

Posted: 19 Jul 2010 13:20
by zer0
To at least allow me to investigate the situations when a job gets stuck in a queued state, would you please be kind enough to implement a tweak to keep the log of jobs between sessions? Knowing details of a job would allow me to trace back my steps and narrow down the cause(s).

Re: Exit XYcopy upon close of XYplorer

Posted: 19 Jul 2010 13:26
by nas8e9
zer0 wrote:Alternatively, maybe a pop-up that alerts a user that jobs are queued/running when he/she tries to exit XYplorer? We already have a tweak for such a pop-up when closing XYplorer via X in top RHC. Having a version tailored to situations when jobs are running would be appreciated. Its caption could be "There are background jobs queued/running. Are you sure you want to exit XYplorer?" :)
+1. After cancelling the exit, one could open the Background Jobs window and see what's happening (or supposed to happen).

Re: Exit XYcopy upon close of XYplorer

Posted: 19 Jul 2010 14:35
by admin
nas8e9 wrote:
zer0 wrote:Alternatively, maybe a pop-up that alerts a user that jobs are queued/running when he/she tries to exit XYplorer? We already have a tweak for such a pop-up when closing XYplorer via X in top RHC. Having a version tailored to situations when jobs are running would be appreciated. Its caption could be "There are background jobs queued/running. Are you sure you want to exit XYplorer?" :)
+1. After cancelling the exit, one could open the Background Jobs window and see what's happening (or supposed to happen).
There is such a message (with option to Cancel exit) when jobs are pending in queue:

Code: Select all

There are 5 jobs pending in the background queue. If you exit now they will not be executed.

Do you want to exit anyway?
When no jobs are pending but the last job(s) have been started and are being processed then there is no message. Why should there be one?

And what's RHC?

Re: Exit XYcopy upon close of XYplorer

Posted: 19 Jul 2010 14:51
by nas8e9
admin wrote:There is such a message (with option to Cancel exit) when jobs are pending in queue:

Code: Select all

There are 5 jobs pending in the background queue. If you exit now they will not be executed.

Do you want to exit anyway?
When no jobs are pending but the last job(s) have been started and are being processed then there is no message. Why should there be one?
In the case zer0 describes, it would be very handy. I appreciate that makes only one fool, but it might make this problem (if more people have this, but don't know they have it) noticeable: the problem here seems to be a stalled/dormant XYcopy.exe instance; if people close XYplorer without being prompted such an instance is still around and then reboot or shut down, no one notices. *If* this problem is more prevalent, it would flush it out.
And what's RHC?
RIght Hand Corner?

Re: Exit XYcopy upon close of XYplorer

Posted: 19 Jul 2010 14:57
by admin
XYcopy closes itself when its job is completed and the XYplorer instance that called it (the mothership) is not there anymore. I've never seen this fail, and I don't see how the message about the last job could help here.

Re: Exit XYcopy upon close of XYplorer

Posted: 19 Jul 2010 15:07
by nas8e9
admin wrote:XYcopy closes itself when its job is completed and the XYplorer instance that called it (the mothership) is not there anymore. I've never seen this fail, and I don't see how the message about the last job could help here.
I have the same experience and this seems to be the first forum report. My previous post was more about wondering whether other people have the problem zer0 describes *without knowing it*. Adding a prompt might flush that problem out into the open. OTOH, by itself it's only a nuisance when updating for the OP; if there are no reports of it being a symptom of failed background jobs (which would be a much bigger problem) it may not be worth the bother.

Re: Exit XYcopy upon close of XYplorer

Posted: 19 Jul 2010 18:28
by zer0
admin wrote:XYcopy closes itself when its job is completed and the XYplorer instance that called it (the mothership) is not there anymore. I've never seen this fail, and I don't see how the message about the last job could help here.
I'm not making this stuff up, I have no reason to. I will try to be more vigilant and pay more attention to Background Bar to see if it's "in progress" when no shell UI is shown.

Having said that, it would help to have the jobs' log preserved across sessions. So, if I closed XYplorer to update and XYcopy is "stuck" again, I can re-open it and see details of a job that's queued and isn't being processed and resolve the situation. Simply killing XYcopy.exe makes me none the wiser why it got stuck :(

Re: Exit XYcopy upon close of XYplorer

Posted: 20 Jul 2010 11:05
by admin
Check out v9.30.0003... 8)

Re: Exit XYcopy upon close of XYplorer

Posted: 20 Jul 2010 11:43
by zer0
admin wrote:Check out v9.30.0003... 8)
I got excited when reading the changelog, but my euphoria subsided when I took it for a spin. I don't want to sound ungrateful, but it won't be of [much] help to me as occasional troublesome jobs are never triggered and remain queued. Thus, they won't be shown in the log :(

Re: Exit XYcopy upon close of XYplorer

Posted: 20 Jul 2010 12:15
by admin
zer0 wrote:
admin wrote:Check out v9.30.0003... 8)
I got excited when reading the changelog, but my euphoria subsided when I took it for a spin. I don't want to sound ungrateful, but it won't be of [much] help to me as occasional troublesome jobs are never triggered and remain queued. Thus, they won't be shown in the log :(
No, problem, now we can log anything. I just have to add 2 lines of code. Wait for next version...

Re: Exit XYcopy upon close of XYplorer

Posted: 16 Sep 2010 15:23
by zer0
Last night, I was bitten once again by XYcopy hanging and, while I have not yet had time to investigate the cause of the latest instalment, there are a handful of improvements I would like to see:

1) Logging when a job is completed.
2) Merge of logging entries into one succinct entry per job.
3) <curitem> level of detail (per file) when multiple files are actioned in one job.

Hopefully, the above need no justification, but just in case they do I'm happy to elaborate :) Thanks in advance! 8)