I was experiencing a hard crash to desktop without any message that happened every several minutes. I eventually realized that my hard drive was full and that it was crashing every time it failed to autosave. Clearing space on the drive fixed it. It would be good to have an error message instead of a crash.
This is the only bug I've noticed so far, impressive performance from an in development game. (although I haven't tried the experimental build yet...) Thanks to the devs for a great game.
[10.12] Crash saving when harddisk full
Re: [10.12] Crash saving when harddisk full
Thanks for the report.
This was a nice lesson for me regarding exception handling, exception in destructors handling etc ...
It is fixed for 0.11.16, you will get the error of:
"Writing in the zip failed: No space left on device.", I hope it will be understandable enough.
P.S. The game is also not terminated when this happens, the saving just fails.
This was a nice lesson for me regarding exception handling, exception in destructors handling etc ...
It is fixed for 0.11.16, you will get the error of:
"Writing in the zip failed: No space left on device.", I hope it will be understandable enough.
P.S. The game is also not terminated when this happens, the saving just fails.
Re: [10.12] Crash saving when harddisk full
I still get nightmares of trying to track down a bug caused by an exception thrown from a destructor.kovarex wrote:exception in destructors handling
For any programmer reading this, NEVER throw exceptions from deconstructors or from any code that gets called from a deconstructor.
And I really mean literally never. It's not a soft-suggestion as for "don't use goto". There are zero corner cases where it could be usable and it WILL break everything badly whenever that exception does get thrown.
In my case it was serial port closing handling. Deconstructor simply called a disconnect() function and that function threw exceptions on errors.
Re: [10.12] Crash saving when harddisk full
bla



Last edited by dee- on Fri Feb 13, 2015 12:33 pm, edited 2 times in total.
Re: [10.12] Crash saving when harddisk full
You can throw exceptions in methods called by destructor, but you always need to catch those in the destructor itself, this is a the way we do it, and apparently std does it this way as well.hoho wrote:I still get nightmares of trying to track down a bug caused by an exception thrown from a destructor.kovarex wrote:exception in destructors handling
For any programmer reading this, NEVER throw exceptions from destructor or from any code that gets called from a destructor.
And I really mean literally never. It's not a soft-suggestion as for "don't use goto". There are zero corner cases where it could be usable and it WILL break everything badly whenever that exception does get thrown.
In my case it was serial port closing handling. Destructor simply called a disconnect() function and that function threw exceptions on errors.
Where you have some close method, that you can call explicitly, when you want to handle the error message, but if you don't call it explicitly, it's exception are caught and just discarted.
http://stackoverflow.com/questions/1301 ... uctor?rq=1
Re: [10.12] Crash saving when harddisk full
Thanks for the quick response, and for the advice about destructors!
"Writing in the zip failed: No space left on device." is definitely understandable.
"Saving failed: No space left on device" might be a slightly more idiomatic. No matter what the message is though, it's definitely a major improvement to report the error instead of exiting.
"Writing in the zip failed: No space left on device." is definitely understandable.
"Saving failed: No space left on device" might be a slightly more idiomatic. No matter what the message is though, it's definitely a major improvement to report the error instead of exiting.