Author Topic: Multiple files open saving overwriting wrong file?  (Read 11899 times)

0 Members and 1 Guest are viewing this topic.

Offline 12TimesOverTopic starter

  • Another Day, Another Vendetta
  • Global Moderator
  • *
  • *
  • Posts: 3694
  • Activity:
    0%
  • Reputation Power: 41
  • 12TimesOver is a force to reckon with.12TimesOver is a force to reckon with.12TimesOver is a force to reckon with.12TimesOver is a force to reckon with.12TimesOver is a force to reckon with.12TimesOver is a force to reckon with.12TimesOver is a force to reckon with.12TimesOver is a force to reckon with.
  • Gender: Male
  • Respect: +600
  • Referrals: 2
    • View Profile
Multiple files open saving overwriting wrong file?
« on: May 10, 2011, 10:00:10 AM »
+1
Ok, I have been putting off this one for a bit now because I assumed it was just me being stupid but it's happened enough times now that I think it's worth mentioning.

I have found on several occasions that when I have several script files open and make modifications and save them the scripts overwrite one of the other open scripts. For example, I open scripta, scriptb, make changes to scripta and scriptb, save scripta and scriptb, then later go open scripta and it's the contents of scriptb.

This is a rough example because I haven't experimented enough to actually duplicate it at will to see when it is really happening, for example is it two files open? Three files open? Only when I hit the Save shortcut icon in the toolbar or is it also when I select Save File or Save As under the File menu? I don't know.

And even worse, it certainly is possible that I've screwed up and saved over the wrong files somehow, now three times over the last two days. Now considering that I'm typically very careful to begin with it would be unusual for me to do something like that even once. Of course I'm not immune to doing stupid things so once will surely happen eventually. After that though I am hyper-aware of making sure I'm saving to the right locations and not overwriting files but somehow I go back to edit something I worked on and it's a copy of a different script.

Today this happened where I went to open a 14k Crafter Sub I've been working on only to find that it contained only about 20 lines of a totally different sub I had been working on later in the day. Fortunately I just happened to have a copy of this sub elsewhere but yesterday I had to repeat about an hour's worth of work when it happened to a sub I didn;t have a copy of somewhere else. The third time I was able to recover most of the lost work from the .bak file.

So anyone else have wierdness like this? Like I said, maybe it's just me. I'll try testing some more - with some dummy files of course - and see if I can come up with anything more substantial.

X
When they come for me I'll be sitting at my desk
     with a gun in my hand wearing a bulletproof vest
My, my, my how the time does fly
     when you know you're gonna die by the end of the night

Offline TrailMyx

  • Officially retired from UO
  • Administrator
  • *
  • *
  • Posts: 13310
  • Activity:
    0%
  • Reputation Power: 154
  • TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!
  • Gender: Male
  • Viper!
  • Respect: +3089
  • Referrals: 34
    • View Profile
    • ScriptUO
Re: Multiple files open saving overwriting wrong file?
« Reply #1 on: May 10, 2011, 10:12:01 AM »
+1
I guess I'm not sure I follow what you're seeing.  Are you using the latest version?
Please read the ScriptUO site RULES
Come play RIFT with me!

Offline Endless Night

  • Global Moderator
  • *
  • *
  • Posts: 5467
  • Activity:
    0%
  • Reputation Power: 62
  • Endless Night is awe-inspiring!Endless Night is awe-inspiring!Endless Night is awe-inspiring!Endless Night is awe-inspiring!Endless Night is awe-inspiring!Endless Night is awe-inspiring!Endless Night is awe-inspiring!Endless Night is awe-inspiring!Endless Night is awe-inspiring!Endless Night is awe-inspiring!Endless Night is awe-inspiring!Endless Night is awe-inspiring!
  • Respect: +786
  • Referrals: 1
    • View Profile
Re: Multiple files open saving overwriting wrong file?
« Reply #2 on: May 10, 2011, 10:13:19 AM »
+1
I guess I'm not sure I follow what you're seeing.  Are you using the latest version?

I am not using the latest version and this hasn't happened to me.
Outlaw Josey Wales - "Manwink, A Long Gone Scripty, and Endless are always teasing us with their private sections lol. What there realy saying is scripters rule and users drool."
Briza - "Your a living breathing vortex of usefulness."

Offline TrailMyx

  • Officially retired from UO
  • Administrator
  • *
  • *
  • Posts: 13310
  • Activity:
    0%
  • Reputation Power: 154
  • TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!
  • Gender: Male
  • Viper!
  • Respect: +3089
  • Referrals: 34
    • View Profile
    • ScriptUO
Re: Multiple files open saving overwriting wrong file?
« Reply #3 on: May 10, 2011, 10:19:22 AM »
+1
I just tried creating 3 different files, and named the header of each the name of the file to keep track.  I tried all kinds of combinations of closing, opening, overwriting, etc.

So perhaps if you can come up with a step-by-step demonstration, I'll see if I can re-create your issue.  Seems to work fine for any combination of files I throw at it.
« Last Edit: May 10, 2011, 10:21:31 AM by TrailMyx »
Please read the ScriptUO site RULES
Come play RIFT with me!

Offline 12TimesOverTopic starter

  • Another Day, Another Vendetta
  • Global Moderator
  • *
  • *
  • Posts: 3694
  • Activity:
    0%
  • Reputation Power: 41
  • 12TimesOver is a force to reckon with.12TimesOver is a force to reckon with.12TimesOver is a force to reckon with.12TimesOver is a force to reckon with.12TimesOver is a force to reckon with.12TimesOver is a force to reckon with.12TimesOver is a force to reckon with.12TimesOver is a force to reckon with.
  • Gender: Male
  • Respect: +600
  • Referrals: 2
    • View Profile
Re: Multiple files open saving overwriting wrong file?
« Reply #4 on: May 10, 2011, 10:39:22 AM »
+1
Yeah, like I said I wouldn't have even mentioned it if it hadn't happened several times now but that still doesn't mean I'm not subject to a chair-to-keyboard interface issue. Definitely don't want to sound the alarms, this was mostly just a "feeler" to see if other's have had similar wierdness.

Oh, and I'm using 239.

I'll try to pay closer attention moving forward so I can tell you if I think this really is an .exe bug rather than a XIIx bug...

X
When they come for me I'll be sitting at my desk
     with a gun in my hand wearing a bulletproof vest
My, my, my how the time does fly
     when you know you're gonna die by the end of the night

Offline TrailMyx

  • Officially retired from UO
  • Administrator
  • *
  • *
  • Posts: 13310
  • Activity:
    0%
  • Reputation Power: 154
  • TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!
  • Gender: Male
  • Viper!
  • Respect: +3089
  • Referrals: 34
    • View Profile
    • ScriptUO
Re: Multiple files open saving overwriting wrong file?
« Reply #5 on: May 10, 2011, 10:46:17 AM »
+1
It may actually be doing what it was programmed to do, but needs a popup to warn you from doing something you might regret.  So if you can find the golden combination (or bug) just lemme know. 

The next version of this I publish won't be locked up (obfuscated) so it will be easier for me to spin.  (Also will be snoopable by Reflector so you can see how crappy my code is)
Please read the ScriptUO site RULES
Come play RIFT with me!

Offline 12TimesOverTopic starter

  • Another Day, Another Vendetta
  • Global Moderator
  • *
  • *
  • Posts: 3694
  • Activity:
    0%
  • Reputation Power: 41
  • 12TimesOver is a force to reckon with.12TimesOver is a force to reckon with.12TimesOver is a force to reckon with.12TimesOver is a force to reckon with.12TimesOver is a force to reckon with.12TimesOver is a force to reckon with.12TimesOver is a force to reckon with.12TimesOver is a force to reckon with.
  • Gender: Male
  • Respect: +600
  • Referrals: 2
    • View Profile
Re: Multiple files open saving overwriting wrong file?
« Reply #6 on: July 07, 2011, 07:23:10 AM »
+1
Ok, I don't have a ton of better info but it just happened to me again for the first time since my original post so I thought I would post the steps I noticed before I forget.

1) I had a script open and was editing it - "A:\Easyuo\Development\XIIxOveR's Cartography Trainer\XIIxOveR's Cartography Trainer 4.0.txt"
2) I wanted a piece of information from another script so, without saving the Cart trainer yet I clicked on the "Open File" icon in the toolbar and browsed to "A:\Easyuo\Development\XIIxOveR's Miner for Dummies\XIIxOveR's Miner for Dummies 3.0.txt"
3) When the file opened up it did not open a second tab with the Miner script, it merely changed the name of already open tab from XIIxOveR's Cartography Trainer to XIIxOveR's Miner for Dummies but the content was that of the Cartography script still.
4) I did a CTRL+A and CTRL+C to copy the contents of the open window so I wouldn't lose my changes and closed it out without saving.
5) I then browsed to the Miner for Dummies file and sure enough it was now a copy of what I had open in the Cartography Trainer window instead of being the Miner for Dummies script. I had not saved ANYTIHNG to this file yet the last modified date was this morning when this happened.

This is something I've done many times without issue so I don't know what to do to reproduce this at will but it is DEFINITELY not me being stupid and overwriting the other file (which is what I was assuming after reporting it initially). I had not even hit "Save" at any point this time and when I opened the second script it didn't open in a second tab.

Fortunately I was able to grab the same version of my overwritten script from the thread here on ScriptUO.

X
When they come for me I'll be sitting at my desk
     with a gun in my hand wearing a bulletproof vest
My, my, my how the time does fly
     when you know you're gonna die by the end of the night

Offline TrailMyx

  • Officially retired from UO
  • Administrator
  • *
  • *
  • Posts: 13310
  • Activity:
    0%
  • Reputation Power: 154
  • TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!
  • Gender: Male
  • Viper!
  • Respect: +3089
  • Referrals: 34
    • View Profile
    • ScriptUO
Re: Multiple files open saving overwriting wrong file?
« Reply #7 on: July 07, 2011, 07:59:12 AM »
+1
I tried a combination like that, but I still can't reproduce what you are seeing.  That's pretty odd, no?

Maybe it's because the directory changed?  I'll have to give that a looksie.
« Last Edit: July 07, 2011, 08:15:00 AM by TrailMyx »
Please read the ScriptUO site RULES
Come play RIFT with me!

Offline 12TimesOverTopic starter

  • Another Day, Another Vendetta
  • Global Moderator
  • *
  • *
  • Posts: 3694
  • Activity:
    0%
  • Reputation Power: 41
  • 12TimesOver is a force to reckon with.12TimesOver is a force to reckon with.12TimesOver is a force to reckon with.12TimesOver is a force to reckon with.12TimesOver is a force to reckon with.12TimesOver is a force to reckon with.12TimesOver is a force to reckon with.12TimesOver is a force to reckon with.
  • Gender: Male
  • Respect: +600
  • Referrals: 2
    • View Profile
Re: Multiple files open saving overwriting wrong file?
« Reply #8 on: July 07, 2011, 08:53:30 AM »
+1
I just duplicated it!! Same exact steps, different script that I opened for additional information.

1) I was editing the same Cart script from the same path.
2) I wanted to get some syntax from another script so clicked "Open File" button without saving the Cart script
3) I browsed to my Treasure Hunter's Helper script and opened
4) Treasure Hunter's Helper became the Cartography trainer and, again, saved with the current date/time even though I never hit Save

X
When they come for me I'll be sitting at my desk
     with a gun in my hand wearing a bulletproof vest
My, my, my how the time does fly
     when you know you're gonna die by the end of the night

Offline 12TimesOverTopic starter

  • Another Day, Another Vendetta
  • Global Moderator
  • *
  • *
  • Posts: 3694
  • Activity:
    0%
  • Reputation Power: 41
  • 12TimesOver is a force to reckon with.12TimesOver is a force to reckon with.12TimesOver is a force to reckon with.12TimesOver is a force to reckon with.12TimesOver is a force to reckon with.12TimesOver is a force to reckon with.12TimesOver is a force to reckon with.12TimesOver is a force to reckon with.
  • Gender: Male
  • Respect: +600
  • Referrals: 2
    • View Profile
Re: Multiple files open saving overwriting wrong file?
« Reply #9 on: July 07, 2011, 08:56:43 AM »
+1
Woot! Duplicated it again, this time under controlled testing! I can now duplicate at will.

1) Created an emty text file under "A:\EasyUO\Development\XIIxOveR's Random Stuff\XIIxOveR's Test File Issue Script.txt"
2) Opened Cart script, same path as before - "A:\Easyuo\Development\XIIxOveR's Cartography Trainer\XIIxOveR's Cartography Trainer 4.0.txt"
3) Opened test file from step 1, opened correctly with no issues.
4) Closed test file from step 1
5) Added text "blahblahblah" randomly to the Cartography script
6) Opened test text file and it was replaced byt the content of the Cart file and saved - e.g. duplicated the issue

So it seems to relate to only when the first script has been modified but not yet saved when opening the next script. I also don;t know if the lengthy path names of similarly named folders, etc plays any role however my gut is with the save or auto-save function/s.

X
« Last Edit: July 07, 2011, 09:02:11 AM by 12TimesOver »
When they come for me I'll be sitting at my desk
     with a gun in my hand wearing a bulletproof vest
My, my, my how the time does fly
     when you know you're gonna die by the end of the night

Offline 12TimesOverTopic starter

  • Another Day, Another Vendetta
  • Global Moderator
  • *
  • *
  • Posts: 3694
  • Activity:
    0%
  • Reputation Power: 41
  • 12TimesOver is a force to reckon with.12TimesOver is a force to reckon with.12TimesOver is a force to reckon with.12TimesOver is a force to reckon with.12TimesOver is a force to reckon with.12TimesOver is a force to reckon with.12TimesOver is a force to reckon with.12TimesOver is a force to reckon with.
  • Gender: Male
  • Respect: +600
  • Referrals: 2
    • View Profile
Re: Multiple files open saving overwriting wrong file?
« Reply #10 on: July 07, 2011, 09:10:13 AM »
+1
ROFL I am now having issues duplicating it again. I did it a number of times in a row, not sure what is different now.

Out of curiosity, how often does the .bak file update? I'm wondering if there is an element of timing with the issue. Are there any other mechanisms that are timing-based (e.g. auto-save, etc)?
When they come for me I'll be sitting at my desk
     with a gun in my hand wearing a bulletproof vest
My, my, my how the time does fly
     when you know you're gonna die by the end of the night

Offline TrailMyx

  • Officially retired from UO
  • Administrator
  • *
  • *
  • Posts: 13310
  • Activity:
    0%
  • Reputation Power: 154
  • TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!
  • Gender: Male
  • Viper!
  • Respect: +3089
  • Referrals: 34
    • View Profile
    • ScriptUO
Re: Multiple files open saving overwriting wrong file?
« Reply #11 on: July 07, 2011, 09:39:39 AM »
+1
The .bak files are generated automatically by the editor control; I'm unsure when they fire though.

Anyhow, are you saying that when you open the other script, the existing script tab is replaced with the new one?  Or do you end up with 2 tabs?
Please read the ScriptUO site RULES
Come play RIFT with me!

Offline 12TimesOverTopic starter

  • Another Day, Another Vendetta
  • Global Moderator
  • *
  • *
  • Posts: 3694
  • Activity:
    0%
  • Reputation Power: 41
  • 12TimesOver is a force to reckon with.12TimesOver is a force to reckon with.12TimesOver is a force to reckon with.12TimesOver is a force to reckon with.12TimesOver is a force to reckon with.12TimesOver is a force to reckon with.12TimesOver is a force to reckon with.12TimesOver is a force to reckon with.
  • Gender: Male
  • Respect: +600
  • Referrals: 2
    • View Profile
Re: Multiple files open saving overwriting wrong file?
« Reply #12 on: July 07, 2011, 09:53:33 AM »
+1
1) opened ScriptA, editor shows 1 tab with the path to ScriptA listed
2) made changes to ScriptA, didn't save
3) opened ScriptB, editor still shows 1 tab but now with the path to ScriptB and the contents of ScriptA
When they come for me I'll be sitting at my desk
     with a gun in my hand wearing a bulletproof vest
My, my, my how the time does fly
     when you know you're gonna die by the end of the night

Tags: