[Bf-committers] Save session recovery on SIGSEGV
Ton Roosendaal
ton at blender.org
Thu Feb 24 12:19:29 CET 2005
Hi,
>> Cool, I wouldn't have thought the state is sane enough still to save
>> a file
>> in that situation.
>
> It should be, assuming that the error didn't arise while making an
> undo push.
>
> It depends on how the undo session saves works; if it simply calls a
> normal save, then yes there could be problems, but if it saves an undo
> push, then there shouldn't be a problem.
>
> Ton, am I right?
Yes, the undo system fills simple data buffers with differences. When
that's done OK a BKE_undo_save_quit() is safe to call since it only
goes over a list and dumps data binary to disk.
In the good old NeoGeo days we had something similar for a while, but
decided to drop the feature because it did more harm than pleasure back
then. The main reason for 'harm' was it then called a regular
file-save, which regularly resulted in corrupted files. By using the
undo system you won't save a corrupt file easily, but is still possible
though (undo 'pushes' can be created on corrupted data before it
detects the corruption). Another reason was it didn't write nice crash
reports (core dumps) anymore.
For such a feature to make it in official releases, we have to look at
the following;
- find out if something similar can be done for Windows; you use a
typical unix feature here (OSX will work btw). Having a unix-only
feature in Blender isn't forbidden, but not preferred. :)
- make sure the signal() for 'crash.blend' saving is switched off
during crucial stages like;
- file saving and reading
- undo pushing/popping
- while saving crash.blend itself!
- find a good way to activate the option, not only as user-preset but
also for developers. Best would be if this signal() trap doesn't bypass
system level debugging (e.g. write core dumps or crash reports. I use
(or enforce!) crashes all the time for debugging.
-Ton-
------------------------------------------------------------------------
--
Ton Roosendaal Blender Foundation ton at blender.org
http://www.blender.org
More information about the Bf-committers
mailing list