Page 1 of 1
Please allow us to save our workspace state on an IDE crash
Posted: Thu Dec 25, 2008 12:34 pm
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.
Posted: Sun Jan 18, 2009 12:49 am
by Hroudtwolf
This is a good idea.
+1
Posted: Sun Jan 18, 2009 1:14 pm
by Trond
-1
Fix the crashes instead.
Posted: Sun Jan 18, 2009 1:37 pm
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.
Posted: Sun Jan 18, 2009 4:30 pm
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.
Posted: Sun Jan 18, 2009 8:35 pm
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.
Posted: Mon Jan 19, 2009 2:07 am
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

Posted: Wed Mar 11, 2009 1:35 pm
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.
Posted: Sun Mar 15, 2009 12:27 am
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

Posted: Sun Mar 15, 2009 7:47 am
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.
Posted: Sun Mar 15, 2009 3:02 pm
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.
Posted: Sun Mar 15, 2009 3:47 pm
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
Posted: Sun Mar 15, 2009 6:01 pm
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.
Posted: Sun Mar 15, 2009 7:33 pm
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.

Posted: Tue Mar 17, 2009 12:20 am
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