IDE corrupts scp files
Moderators: Dorian (MJT support), JRL
IDE corrupts scp files
Okay, I've had this happen a couple times now. Running a script with Include files while you've got the include files open in the editor, in a new window, may overwrite the other code with the code from the main script.
For instance, I have a script called LoanSales.scp that includes Database.scp. If I run LoanSales.scp then there's a chance my Database.scp will be overwritten with the contents of LoanSales.scp.
I've also had an issue with stopping a run and the include files remain included as code in the main script.
If you know a way to work around these issues, please share!
For instance, I have a script called LoanSales.scp that includes Database.scp. If I run LoanSales.scp then there's a chance my Database.scp will be overwritten with the contents of LoanSales.scp.
I've also had an issue with stopping a run and the include files remain included as code in the main script.
If you know a way to work around these issues, please share!
Re: IDE corrupts scp files
Wow... this isn't just if it is open in the editor. I tried closing it and running my script and it overwrote the file with the main routines code.
Re: IDE corrupts scp files
In the editor, under the "Debug" menu, uncheck "Save on Run/Debug".
- Marcus Tettmar
- Site Admin
- Posts: 7395
- Joined: Thu Sep 19, 2002 3:00 pm
- Location: Dorset, UK
- Contact:
Re: IDE corrupts scp files
I can't replicate this. SaveOnRun only saves the original file *before* the script is executed and therefore saves it *before* the Include has be actioned.
So the issue is not SaveOnRun. But regardless of that option I can't replicate Include causing a corruption.
I also don't understand how the Included script could be overwritten by the main calling script as you suggest. I just can't see why that would ever happen.
Which version are you using and are you able to provide a screencast demonstrating the problem occurring so that I can try and replicate your steps precisely.
So the issue is not SaveOnRun. But regardless of that option I can't replicate Include causing a corruption.
I also don't understand how the Included script could be overwritten by the main calling script as you suggest. I just can't see why that would ever happen.
Which version are you using and are you able to provide a screencast demonstrating the problem occurring so that I can try and replicate your steps precisely.
Marcus Tettmar
http://mjtnet.com/blog/ | http://twitter.com/marcustettmar
Did you know we are now offering affordable monthly subscriptions for Macro Scheduler Standard?
http://mjtnet.com/blog/ | http://twitter.com/marcustettmar
Did you know we are now offering affordable monthly subscriptions for Macro Scheduler Standard?
Re: IDE corrupts scp files
I have run into this issue several times too.
I actually include the "Include" line twice with the first one commented out so I can easily restore it.
It doesn't happen every time, and no consistent repro.
Often enough to be a real pain though.
I actually include the "Include" line twice with the first one commented out so I can easily restore it.
It doesn't happen every time, and no consistent repro.
Often enough to be a real pain though.
Re: IDE corrupts scp files
I think unchecking save on run helped a lot, although it is still happening from time to time. I'm backing up my scripts twice a day just in case.Which version are you using and are you able to provide a screencast demonstrating the problem occurring so that I can try and replicate your steps precisely.
I think I can reproduce it by setting breakpoints and not realizing my scripts is still running. Then I try to save or do something and that was when it was getting corrupted. I think...
Running version 14.3
Just today I had a weird thing happen to my "Group". It seemed to add an empty SCP file to the group and when I deleted the odd SCP file entry from the group, it deleted the whole macro group and directory. Fortunately I was able to retrieve it from the recycle bin. Maybe this is tied to using group?
I haven't figured out how to reproduce it reliably just yet. When I do, you'll be the first to know!
Re: IDE corrupts scp files
This morning had a new symptom. In one of my include files I had hidden the top subroutine by pressing the '-' sign. Ran the program, it aborted due to an error. Then I went into my main program, with the Include statements, and it had been overwritten by the include file, including the closed subroutine.
I exited MS all the way then went back in, problem still there. Then I clicked on the "+" sign to display the closed subroutine and my main program came back, entirely intact.
So... I'm kind of wondering if this issue only happens to programs that abort? I'm also wondering if the issue is that the files are okay, but the IDE is confused and displaying the wrong contents in the file you're editing? Maybe a cache somewhere?
I exited MS all the way then went back in, problem still there. Then I clicked on the "+" sign to display the closed subroutine and my main program came back, entirely intact.
So... I'm kind of wondering if this issue only happens to programs that abort? I'm also wondering if the issue is that the files are okay, but the IDE is confused and displaying the wrong contents in the file you're editing? Maybe a cache somewhere?
- Marcus Tettmar
- Site Admin
- Posts: 7395
- Joined: Thu Sep 19, 2002 3:00 pm
- Location: Dorset, UK
- Contact:
Re: IDE corrupts scp files
Interesting - still unable to replicate but will keep trying :-/
Marcus Tettmar
http://mjtnet.com/blog/ | http://twitter.com/marcustettmar
Did you know we are now offering affordable monthly subscriptions for Macro Scheduler Standard?
http://mjtnet.com/blog/ | http://twitter.com/marcustettmar
Did you know we are now offering affordable monthly subscriptions for Macro Scheduler Standard?
Re: IDE corrupts scp files
Here's an example of one of the weird things I'm experiencing. I "closed" up some of the functions in another file included by this file. Ran the program, hit a breakpoint, stepped through a bit of code and then hit the big red X to stop executing.
I saw my main program file has overwritten my included file and switching over to the main file I saw what's in the image I've uploaded. All those closed code sections are appearing in the main program file.
My main program file has about 5 Include files in it, if that makes a difference in reproducing things.
Oh yeah, one other thing. This screenshot was after I exited without saving and then restarted and reopened the main program file. It still has those weird artifacts in there. I click on the "+" and they go away.
I saw my main program file has overwritten my included file and switching over to the main file I saw what's in the image I've uploaded. All those closed code sections are appearing in the main program file.
My main program file has about 5 Include files in it, if that makes a difference in reproducing things.
Oh yeah, one other thing. This screenshot was after I exited without saving and then restarted and reopened the main program file. It still has those weird artifacts in there. I click on the "+" and they go away.
- Marcus Tettmar
- Site Admin
- Posts: 7395
- Joined: Thu Sep 19, 2002 3:00 pm
- Location: Dorset, UK
- Contact:
Re: IDE corrupts scp files
Are you able to zip up all the script files (with include files) and send to support? Include the breakpoints and explain which lines to step through ...
Marcus Tettmar
http://mjtnet.com/blog/ | http://twitter.com/marcustettmar
Did you know we are now offering affordable monthly subscriptions for Macro Scheduler Standard?
http://mjtnet.com/blog/ | http://twitter.com/marcustettmar
Did you know we are now offering affordable monthly subscriptions for Macro Scheduler Standard?
Re: IDE corrupts scp files
Yes, I'll get to that today for you. There's a lot of stuff that will break like database stuff, applications you don't have, etc. Do you want the image files?
I still can't reproduce it reliably, so I'm not sure I can tell you exactly how to do it. But hopefully I can spend some time experimenting today.
I still can't reproduce it reliably, so I'm not sure I can tell you exactly how to do it. But hopefully I can spend some time experimenting today.
Re: IDE corrupts scp files
Was able to produce the issue by doing this:
Started debugging and then switched to another tab, tried to edit the file because I forgot I was debugging. It wouldn't let me update the tab (include file). Hit the red-x to stop the debugger. Main file overwrote contents of the tab.
Exited without saving and restarted. Everything looks good again.
Started debugging and then switched to another tab, tried to edit the file because I forgot I was debugging. It wouldn't let me update the tab (include file). Hit the red-x to stop the debugger. Main file overwrote contents of the tab.
Exited without saving and restarted. Everything looks good again.
- Marcus Tettmar
- Site Admin
- Posts: 7395
- Joined: Thu Sep 19, 2002 3:00 pm
- Location: Dorset, UK
- Contact:
Re: IDE corrupts scp files
How did you manage to switch tabs? When I am debugging I am unable to even switch tabs. If I stop debugging the other tabs are left alone.
Marcus Tettmar
http://mjtnet.com/blog/ | http://twitter.com/marcustettmar
Did you know we are now offering affordable monthly subscriptions for Macro Scheduler Standard?
http://mjtnet.com/blog/ | http://twitter.com/marcustettmar
Did you know we are now offering affordable monthly subscriptions for Macro Scheduler Standard?
Re: IDE corrupts scp files
Okay, some combination of **BREAKPOINT**, hitting F8/F9 and hitting another breakpoint. I'll try to pin it down exactly. But I'm able to switch back and forth between tabs during debugging. It is pretty disastrous to do and usually only happens when I forget I'm in debugging mode.
Okay, here's how it went down:
1) hit break point, step through a few lines
2) F9 to continue execution
3) Focus is given to another window
4) Breakpoint stops execution
5) Move cursor back to MS and now I can switch tabs.
Okay, here's how it went down:
1) hit break point, step through a few lines
2) F9 to continue execution
3) Focus is given to another window
4) Breakpoint stops execution
5) Move cursor back to MS and now I can switch tabs.
Re: IDE corrupts scp files
After I figured this out, and replicated to make sure I was right, I had a really bad thing happen. Not only did one of my files get corrupted, but I couldn't connect to the database and the Year> function (all the date functions) started returning garbled characters. I stopped MS and reloaded everything, still kept acting badly. Then I stopped the msched.exe in background and reloaded again. Still a problem.
I deleted the .dat file in the directory and restarted again. This time it worked okay.
What is the .dat file?
I deleted the .dat file in the directory and restarted again. This time it worked okay.
What is the .dat file?