ScriptUO

Scripting Resources & Utilities => ScriptUO Application => Bug discussion => Topic started by: 12TimesOver on July 28, 2008, 02:42:33 AM

Title: Auto revert?
Post by: 12TimesOver on July 28, 2008, 02:42:33 AM
Morning,

Issue - made modifications to a script, got pulled away for a little while, came back and my changes had been reverted back. I tested this a couple of times with the same result. Unfortunately, because of RL and kids, etc I never was able to narrow down how long it took for the changes to revert but this happened several times.

Fortunately I had only changed three lines of code without saving, LOL!

Let me know if there is more info I can put together, I'll try to test again today with the hope of narrowing down the time it takes to revert the text. I also don't know if this was related to inactivity verse just a period of time going by.

XII
Title: Re: Auto revert?
Post by: TrailMyx on July 28, 2008, 08:24:13 AM
Morning,

Issue - made modifications to a script, got pulled away for a little while, came back and my changes had been reverted back. I tested this a couple of times with the same result. Unfortunately, because of RL and kids, etc I never was able to narrow down how long it took for the changes to revert but this happened several times.

Fortunately I had only changed three lines of code without saving, LOL!

Let me know if there is more info I can put together, I'll try to test again today with the hope of narrowing down the time it takes to revert the text. I also don't know if this was related to inactivity verse just a period of time going by.

XII

So that's just 1) make changes.  2) walk away?  Wow, I can't even begin to think of what's going on there since this is an event-based program.  Yes, please lemme know if you find any more information about that.

Also, check and see if a ".bak" file was created with your missing information....
Title: Re: Auto revert?
Post by: TrailMyx on July 28, 2008, 08:58:35 AM
I've got a couple experiments running now, but so far nothing strange like what you are seeing.  Was it long code?  Did you run any of the features, or can you do this just by loading a script, making a change and then walking away?
Title: Re: Auto revert?
Post by: 12TimesOver on July 28, 2008, 09:47:24 AM
I'll do some more testing. Funny thing is there have been several occasions where I've opened a script up to continue editing and said "That's wierd, I thought i changed that" but never thought anything about it.

The script I was playing with was my rewrite of SM's Library donator. In fact, the reason I noticed to begin with was because of my search for a string (see other thread) in which I modified each returned value. Then I went on to work on other things as I was cooking dinner, etc but it was a couple hours before I got back to it. The "Save File" button was greyed out and a search for the string which I modified revealed my modifications no longer existed.

I also have a bad habit of closing files and clicking "Yes" at the "Do you want to save your file" message which didn't pop up like it usually does. With that in mind, this could easily be a combination of user error with a program "functional process" issue.

I'll let you know what I come up with.

XII
Title: Re: Auto revert?
Post by: 12TimesOver on July 28, 2008, 10:41:40 AM
Aha, I figured it out. The reason I discovered it is due to my inappropriate reliance on text editors to warn me to save when I close them rather than saving before Closing the app.

The bug is that hitting Cancel in the Find/Replace window resets the "file has been modified" logic so that the program doesn't recognize it is having been edited. I am losing my work because, like an idiot, I just close the app and expect to hit "Yes, I'm an idiot and I want you to save my work before you close" button. Because I didn't recall that I hadn't saved my work yet it never occurred to me that the message didn't pop up when I closed even though I hadn't saved yet.

Does that make sense?

Steps to reproduce:

1) Open a script or create a new one
2) Modify the script
3) Note that the "Quick Save" icon is active but don't save the file yet
4) Open the Find/Replace window
5) Hit "Cancel" in the Find/Replace window
6) Notice that the "Quick Save" icon is now inactive (grey). The application doesn't know that the file still hasn't been saved.

XII

Title: Re: Auto revert?
Post by: TrailMyx on July 28, 2008, 12:12:52 PM
Ah, ok.  That's a known issue then, and has annoyed me more than once.  The stuff isn't "deleted" but not saved.  Ok, I have been meaning to fix that ever since I introduced the new editor.  It has some filthy quirks, and one of them is determining if the file has actually changed in a passive way.  I was relying on one method, but that's not 100% in some instances so I have to come up with something else.  Thanks you for the info, though.  I'll make sure when I fix it that it takes your particular troubleshooting data into mind.

You'll also notice this bug with a different face.  If you do a save as, save file and then close it you'll still be prompted that the file needs saving even though there has been no changes made.
Title: Re: Auto revert?
Post by: 12TimesOver on July 28, 2008, 12:30:57 PM
Yep, I know exactly what you're talking about with that one too.

XII
Title: Re: Auto revert?
Post by: TrailMyx on September 07, 2008, 02:39:37 PM
Bah, I forgot to fix this error!! 
Title: Re: Auto revert?
Post by: 12TimesOver on September 08, 2008, 02:19:02 AM
LOL, good thing I'm in the habit now of saving constantly now!!  ;)
Title: Re: Auto revert?
Post by: TrailMyx on September 08, 2008, 08:12:45 AM
LOL, good thing I'm in the habit now of saving constantly now!!  ;)

Funny thing is that it was fixed because of some work I was doing that wasn't associated with this error, but I pulled that idea.  Oh well, at least I understand the reason for the error and lets just say it's a silly one but a pain in the ass.
Title: Re: Auto revert?
Post by: dagon on August 29, 2009, 01:19:13 PM
This PROBLEM just got me.
I was working on a script for hours this morning, first script I've done, learning the language as I went along.... THINKING that the script was saved when the save button greyed out. THINKING that it was saved when I closed and it didn't prompt to save.

Come back to find that NOTHING has been saved.

EXTREMELY AGGRIVATING

My fault, but also ScriptUO's.

I'm severely aggrivated! I worked HARD on scripting what I had been doing. Now I have to do it all over again and hope that I get it right.

Sorry but an important bug such as this is more than a year old and still not fixed, remove ScriptUO from the internet if you can't maintain it. I don't mean to come off sounding rude or anything but this is just so bad.
Title: Re: Auto revert?
Post by: UOMaddog on August 29, 2009, 03:01:33 PM
This PROBLEM just got me.
I was working on a script for hours this morning, first script I've done, learning the language as I went along.... THINKING that the script was saved when the save button greyed out. THINKING that it was saved when I closed and it didn't prompt to save.

Come back to find that NOTHING has been saved.

EXTREMELY AGGRIVATING

My fault, but also ScriptUO's.

I'm severely aggrivated! I worked HARD on scripting what I had been doing. Now I have to do it all over again and hope that I get it right.

Sorry but an important bug such as this is more than a year old and still not fixed, remove ScriptUO from the internet if you can't maintain it. I don't mean to come off sounding rude or anything but this is just so bad.

Anyone other than me thinking BanHammer?
Title: Re: Auto revert?
Post by: Toptwo on August 29, 2009, 03:11:28 PM

Sorry but an important bug such as this is more than a year old and still not fixed, remove ScriptUO from the internet if you can't maintain it. I don't mean to come off sounding rude or anything but this is just so bad.

Anyone other than me thinking BanHammer?

  I was ok with everything he said up to this point. I believe ppl have a right to speak thier mind about things, and I didnt even think it to rude up until this point. However this sentance was a little over the top...not sure I would go all the way to the BanHammer as much as a stern warning (which Maddog and I are attempting to do here) Of course any final decision does not rest in our hands.

  I dont think we want to be known for breaking out the banhammer every time somebody says something a little offensive, but I think people should take the time to THINK about what they are saying!

  To Dagon I can say this..I can understand your frustration, I think everybody here has lost work on the computer before, and it sucks. But if you truely feel that this site should be taken off the internet, then there is a very easy solution. Close the site on your web browser, and don't ever come back...no more aggravation for you...no more aggravation for us...problem solved!
Title: Re: Auto revert?
Post by: UOMaddog on August 29, 2009, 03:26:49 PM
Yea, I was fine up through "My fault, but also ScriptUO's"

The next line seemed like whining/bitching, and the final sentence pushed me over the edge! And the "don't mean to come off sounding rude" wasn't comforting in any way shape or form.

It's kinda like saying: "No offense, but you're ugly!" It just doesn't work!
Title: Re: Auto revert?
Post by: TrailMyx on August 29, 2009, 07:24:36 PM
I do apologize dagon for the loss.  It's not a bug really (i.e. a crash), but a design flaw that's pretty hard to fix due to very little feedback regarding dirty/clean changes from the new editor control.  Back when I used the RichTextEdit control, there was no question about there being unsaved changes, but with this new one, it has to be micromanaged from the outside world.

Frankly, I haven't had the time to work on something that seems to be so simple to fix, but in reality would take me a weekend.  So that's why we post issues like this for you to be aware of.  Plenty of people use SUO successfully, knowing there are limitations.  

Also remember what you paid for SUO.  It's free if you've forgotten.  I'm not Microsoft and don't have 1000s of programmers at my command to fix issues, so you have to also keep that in mind when using software you find on the internet.

I have also lost work to this "bug", so I do understand that it's frustrating.  However, I've lost work in just about any editor I've ever used for one reason or another.  Ever have EasyUO just lock up on you and the only thing you can do is CTRL-ALT-DELETE to stop the service?  I've lost more work that way than I ever have with SUO.  

This issue is the first one I'll be correcting when I can get back to SUO development.  Superslayer has found a few actual crash issues that need to be fixed also.  

Title: Re: Auto revert?
Post by: dagon on August 30, 2009, 07:30:18 PM
As a new script writer I just downloaded SUO and went at it, I didn't browse the forum for bugs to know what I might have to watch out for. So a couple suggestions:

1) Distribute a summary of known bugs with the program

2) Disable any disabling of the toolbar save button - it gives a false impression that the document has been saved. (When I ran the auto-indent and syntax checker the button greyed, I thought cool! it saved for me!)

3) Enable shortcuts! CTRL+S is save in every program in existence!

4) I did see that when you save a file a backup is also created, ok that's useful I guess, how about expanding that into automatic periodic document saves that save your work no matter what with datestamped filenames.  Either do it automatically and have the end user manage the saved data, or include built in options for management. Number of saves, frequency, etc.

And, more important than the rest

5) A better-than-nothing way of detecting changes in the document, if you can't come up with something more efficient and accurate, is to go along these lines.. ill go with an existing script file as the example

a) existing document is opened and loaded as normal..... but also loaded into and kept in memory in a variable

b) variable is then stripped of all line breaks and space characters

c) in a timer the existing document that is being worked on is run through the same process as the variable holding the original document.. and all line breaks and spaces are removed

d) current document is then compared to original document .. if they match no changes.. no save button, etc. if they dont match then there are changes and activate the save button (and/or autosave to temp file)

it's dirty, but it works. and off the top of my head the only two problems i could see ever arising out of this method is if/when someone actually changes a string from having one space character to two or more space characters.. for display formatting or whatever. since all spaces are removed the function will not know the difference and the save will not be activated for changes to spaces within senteces. and also for the script layout it self, if someone writes an unformatted script then uses the auto indent feature those changes will not be recognized, but thats where manual saving comes in

aside from that line breaks and spaces have no bearing on the actual content of the script, which really is more important than anything else..
Title: Re: Auto revert?
Post by: TrailMyx on August 30, 2009, 07:51:24 PM
Well again I can't stress enough about reading the forum regarding known issues.  That's the main reason this forum exists.

Otherwise, you are making lots of assumptions that are just not available in the current context.  If the current problems are that easy to solve, I guarantee you I would have them fixed already.  When you rely on a canned editor to maintain changes, you are also relying on the feedback that editor control gives regarding changes.  Since this editor doesn't give that kind of indication back, I have to override nearly every windows signal to manage every keystroke and determine if the text actually changed.  It's hard to explain the complexity with this control, so you just have to trust me when I say that if it was easy, I would have done it already. 

Actually, what I'll do to is add you to the beta section so you can see the progression as the program has been developed so you can have a taste of what has happened during the development.
Title: Re: Auto revert?
Post by: 12TimesOver on September 01, 2009, 02:59:13 AM
Yep, you stumbled upon a doosy Dagon and I have been there before. "File" + "Save File" = no more issues since I brought this problem up originally. Some of us have to learn the hard way, sounds like you and I are similar in that regard. I never leave autosave functionality in charge of my work when I use MS Word, why in the world did I assume this would be fine when using ScriptUO? Inevitably learning the hard way was in my future, that's why.

You are free to use whatever scripting program you wish, go code in EasyUO if you like. TM has presented a package "AS IS" and most of us prefer it miles and miles over writing in EasyUO even with it's issues. BTW, we are all aware of these issues simply because we did read the bug forums not because someone handed us a list. We also know that there is nobody forcing us to use this platform, however, we chose to use it anyhow.

There are millions of far worse executables on the Internet than ScriptUO###.exe so comments like "remove ScriptUO from the Internet if you can't maintain it" come across as plain ignorant. I don't believe the connotations of this statement necessarily represent you, maybe you don't realize how arrogantly you are coming across? In either regard, I'll bet you won't have this issue anymore now that you know to hit Save manually now and again.

Looking forward to checking out your first script Dagon! Don't let something like lost work get in your way, some of us have lost hundreds of hours of work due to stupider things than this. We mourn for a bit, maybe decide to quit UO, then we pick back up and trudge forward until the only memory of the event is the lesson learned.

XII
Title: Re: Auto revert?
Post by: TrailMyx on September 07, 2009, 02:44:00 AM
Yet another example of a development system eating my work happened today.  I was using SharpDevelop (their new beta 3 version) because it really does do a better job creating executables more optimized.  I was implementing the "Favorites" changes that just went into the 234 beta version.  When all of the sudden, the whole development system locked up and I had to 3-finger salute it.  When I got back, all my work had been reverted to a previous save point.  Thankfully, all the new form files were untouched, but the modifications to the existing files had reverted. 

I got pissed, got up and made a pot of coffee, and sat back down while the changes were still fresh in my head and re-composed all the interface code to enable the new Favorites form.  It took an additional 3 hours, but it got published.  I'm not entirely sure why it reverted like that because when you do a full compile, the development system saves everything for you.  I'm still confused.  However, that's just one example of 100s in my past of having to go back a bit in the development process.  It's a necessary evil, but I'll still use this new tool just because it's so much better than VCS, bugs and all.
Title: Re: Auto revert?
Post by: welgill on September 07, 2009, 04:38:04 AM
@dagon From the sounds of your um... post I would say your pretty young. And I know that teachers since my old rear was in school using 5 1/4 in floppies on an apple IIe have ALWAYS ppounded into peoples heads save save save data loss is noones fault but your own. Then there is the other old addage about always reading the docs for a new piece of software which in this case is these forums.You yourself pointed out the age of this post so you have had ample time to read it. Sorry you lost data but umm back up your work.