Please allow us to save our workspace state on an IDE crash

Got an idea for enhancing PureBasic? New command(s) you'd like to see?
Mistrel
Addict
Addict
Posts: 3415
Joined: Sat Jun 30, 2007 8:04 pm

Please allow us to save our workspace state on an IDE crash

Post by Mistrel »

When the PureBasic IDE crashes the state is lost (tabs, undo/redo). It would be a great improvement if PureBasic could backup the state of the IDE and offer to restore it the next time it loads.
User avatar
Hroudtwolf
Addict
Addict
Posts: 803
Joined: Sat Feb 12, 2005 3:35 am
Location: Germany(Hessen)
Contact:

Post by Hroudtwolf »

This is a good idea.

+1
Trond
Always Here
Always Here
Posts: 7446
Joined: Mon Sep 22, 2003 6:45 pm
Location: Norway

Post by Trond »

-1
Fix the crashes instead.
User avatar
Deeem2031
Enthusiast
Enthusiast
Posts: 216
Joined: Sat Sep 20, 2003 3:57 pm
Location: Germany
Contact:

Post by Deeem2031 »

I would prever a IDE that probably crashes but you still can save your sources instead of a IDE that probably does not crash but your sources are gone. What I want to say: You can never be sure that you fixed all bugs. So +1 for the feature request.
irc://irc.freenode.org/#purebasic
freak
PureBasic Team
PureBasic Team
Posts: 5940
Joined: Fri Apr 25, 2003 5:21 pm
Location: Germany

Post by freak »

Since you never know what state the IDE is in after a crash, attempting to save the sources could potentially erase them alltogether. Its better to lose the recent changes than losing the whole file.
quidquid Latine dictum sit altum videtur
Mistrel
Addict
Addict
Posts: 3415
Joined: Sat Jun 30, 2007 8:04 pm

Post by Mistrel »

If you save the state of the IDE continually after an action has been performed you can always roll back to the previous action on a crash.

I find that I rarely close the PureBasic IDE unless it crashes. And because it does not continually save its tab state I have to reload my entire project and make a point to close and re-open it again to "save" my tab states, at least for the time being.

I'm not interested in having the IDE try to save my files on a crash because I might be in the middle of breaking it to test something else. My request is just the IDE state specifically. This shouldn't damage any files on a crash because no data should be written.
User avatar
pdwyer
Addict
Addict
Posts: 2813
Joined: Tue May 08, 2007 1:27 pm
Location: Chiba, Japan

Post by pdwyer »

+1

Tronds idea would be nice in a perfect world, but along with "expect the best" comes "prepare for the worst". Having the open files change after a crash is annoying. If you are getting a crash then you tend to get a few at a time as you are hitting the same issue.

"Fix the crashes as well" I could understand but why "instead" ? Why not do this?

Assumably there is a function that saves the state and is called on IDE close, just call it on file open too :)
Paul Dwyer

“In nature, it’s not the strongest nor the most intelligent who survives. It’s the most adaptable to change” - Charles Darwin
“If you can't explain it to a six-year old you really don't understand it yourself.” - Albert Einstein
Kazmirzak
User
User
Posts: 92
Joined: Fri Jun 18, 2004 5:44 pm
Location: Germany

Post by Kazmirzak »

Yes. Everytime a new file is opened the configuration file of pb should be updated. In a crash no single tab would be lost.
Franky
Enthusiast
Enthusiast
Posts: 213
Joined: Sat Apr 26, 2003 2:58 pm

Post by Franky »

Where´s the problem with saving the sources into a special directory on crash? So when restarting, you can take a look at those files opened, when the crash happens and if they´re ok, you just save them as normal files.
No Problem IMHO :roll:

But OK, we also thought, a line-connector like ":" is a linesplitter would not be THAT hard :?
Give Up everything but trying!
Mistrel
Addict
Addict
Posts: 3415
Joined: Sat Jun 30, 2007 8:04 pm

Post by Mistrel »

I don't care about losing unsaved data when the IDE crashes, since it could be corrupt or contain arbitrary code that is out of sync with the rest of the project. I only care about the state of the IDE (tabs, settings, etc) and this should be the only relevant information. It's up to the user to save their code and keep it up to date.
Kazmirzak
User
User
Posts: 92
Joined: Fri Jun 18, 2004 5:44 pm
Location: Germany

Post by Kazmirzak »

Code is saved every time you hit the compile button, so we don't really need a code-recovery mechanism. In a crash, code recovery is actually more harmful than it does good, as the files are very likely to show some corruption.
User avatar
Hroudtwolf
Addict
Addict
Posts: 803
Joined: Sat Feb 12, 2005 3:35 am
Location: Germany(Hessen)
Contact:

Post by Hroudtwolf »

How many times do you compile your sources while programming? ^^
Each 5-10 seconds?

It can quite of course happens, that I push the compile button maximum 1 times in the hour.
And crashes happens not only while compiling.

At least, autosaving to tempory files would be necessary.

Regards

Wolf
Kazmirzak
User
User
Posts: 92
Joined: Fri Jun 18, 2004 5:44 pm
Location: Germany

Post by Kazmirzak »

I think a good option for you would be to have an autosave feature like in OpenOffice: autosave code every 10 minutes ... so in any case you will always fall back to a very recent version. Agree on that.

Additionally to the autosave of files there could be an outosave for the pb config file, and all tab related issues are solved as well.
Mistrel
Addict
Addict
Posts: 3415
Joined: Sat Jun 30, 2007 8:04 pm

Post by Mistrel »

Kazmirzak wrote:I think a good option for you would be to have an autosave feature like in OpenOffice: autosave code every 10 minutes ... so in any case you will always fall back to a very recent version. Agree on that.

Additionally to the autosave of files there could be an outosave for the pb config file, and all tab related issues are solved as well.
Autosave would wreak havok on my source files, since I occasionally cut large blocks of code and frequently break things while hunting bugs, then revert back and paste the working code. I'd hate for my source to save unexpectedly. I find this kind of feature a little frightening, actually. But I'm sure someone would like it.

Ctrl-S is your friend. :)
Kazmirzak
User
User
Posts: 92
Joined: Fri Jun 18, 2004 5:44 pm
Location: Germany

Post by Kazmirzak »

make auto-save optional ;-)

all right I'll end the discussion here, from my point everything was said and maybe Fred will find the time to implement the one or the other.

Cheers :-)
Jürgen
Post Reply