Jump to content
Don Lee

Duplicate operation on script seems to duplicate wrong script

Recommended Posts

(Retro 10.2.0 (201) on Mac OS X 10.8.4, Mac Mini 16 GB mem)


I have had several incidents where I have duplicated a script while it was running, presuming that the script would be copied, and i could tweak the duplicate without disturbing the original, running script.


I have stopped doing this because it seems to screw up the original script in strange ways.


Thinking about what I have seen, though, I think I know what's happening.  The "duplicate" button does indeed duplicate the script, but names the original as "copy", which leads me to modify the original, and leave the copy unchanged.


I have seen errors in the logs, backups written to the wrong media set, and other strange happenings.


This most recent incident would be fully explained by this scenario.


I encourage the folks at Retro to try this on a long-running script.  I bet I'm right.


BTW - changing a running script should either be disallowed, or fixed so the running script cannot be screwed up, or at least a warning would be nice....



Share this post

Link to post
Share on other sites

I am convinced that this is a bug.  I've been watching the behavior when I do this, and it sure seems like that's what's happening.


When you do a duplicate of a script, the script that ends up highlighted is the *original*, not the duplicate.  I think the code is wrong, and it is only noticed when the dup is on a running script (which messes it up), or if for some other reason someone cares which script it really is.

Share this post

Link to post
Share on other sites

I had another incident with this today.


I wanted to split a media set into 2012 and 2013 snapshots, and created a script to copy the 2012 backups to a 2012 set. I selected the backups and started the original script.


While the script was running, I duplicated it, and changed the destination media set and snapshots to be copied in the duplicate script. The running script finished later, but copied the wrong snapshots - a subset of what I selected in the 2013 script, not the snaps from 2012 in the original script.


I have seen ths before. If I wait until the first script is done, it works fine. It appears that when you do a duplicate, the "duplicate" with the new name is really the original, and the original becomes the duplicate. If you change the "duplicate" while the "original" is running, the running script does strange things.


I do not consider this a critical bug, but I do think it is serious, and should be easy to fix. (says me, who knows nothing about the code . ;-> )


It also seems to me that changing a script while it is running should not affect the "live" operation. Either a copy of the script should be used, or the script should be locked somehow while it is "live".

Share this post

Link to post
Share on other sites

This bug is easy to reproduce, and is obvious.


Start a long running script. Call it LongRun


Once running, go to the Scripts pane, and click "duplicate".


Re-name the duplicate script. Call it LongRunDuplicate. Make changes if you wish.


Go back to the "Activities" pane, and see that LongRunDuplicate is the one running!


I can't see how this could be a good thing. My experince has been that if I make changes to the "duplicate", it screws up the execution of the running script... sometimes.


This should be fixed.

Share this post

Link to post
Share on other sites

We haven't been able to reproduce this issue. What we do see is that after one duplicates a script, the console continues to highlight the original script instead of the new duplicate copy. However, changing the script after it's running should not affect the currently running activity.

Share this post

Link to post
Share on other sites

I can't reproduce it with 11 now, either.


Maybe I was drunk at the time.


If it reappears, I'll re-report it, with directions to reproduce.



Share this post

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now