Message Boards Message Boards

2
|
3460 Views
|
7 Replies
|
3 Total Likes
View groups...
Share
Share this post:

Can you recover an unsaved Mathematica notebook if computer crashes

Posted 10 months ago

I spent a lot of time creating a Mathematica notebook and the computer had crashed due to a power loss - but I had never saved the notebook to a file. Is there any way to recover the work?

I did a little investigating after the fact and when you create a "New" notebook from the file menu, and you see a notebook window open up, I don't see any "file" associated with the Mathematica process using the Terminal command "lsof -p processid" where process_id is the number of the process that Mathematica is running as (this is on macOS Ventura and Mathematica 14 if it matters).

Any suggestions or ideas (besides the obvious "use the File/Save" command often)??

Does anyone have any idea why such a serious bug hasn't been fixed in decades???

Thanks...

-bob

ps - this has been a bug/feature for as long as I've used Mathematica - since version 5 or 6, and probably forever - I simply had forgotten about the problem due to not using Mathematica in a long time. Can anyone refer me to a web page that discusses what is really happening when you do a "File/New/Notebook" menu command? What sort of entity is really created if it's not a file yet? Is there any Terminal commands that might give any information or details about the entity that just got created? Thanks again...

POSTED BY: Bob Freeman
7 Replies

If you haven't saved the notebook, there is no file to recover.

POSTED BY: Jason Biggs
Posted 10 months ago

That seems to me to be a big bug!!! How many lost hours of work this has cost people is probably staggering. Why not have some sort of recovery capability. Many other programs can do this so why not Mathematica??? From simple apps like Notes to sophisticated ones like Photoshop.

Why in the world has this never been addressed??

Thanks...

POSTED BY: Bob Freeman
Posted 10 months ago

Autosaving does nothing until the file is first saved. I have been using Mathematica for years - but not very often and had simply forgotten this wonderful Mathematica feature. My bad. But this seems like such a glaring red flag bug that I simply can't understand why it's never been fixed.

Thanks...
-bob

POSTED BY: Bob Freeman
Posted 10 months ago

I'm here because Mathematica crashed and I lost some work (although I'd already copied the results I needed, so it didn't really matter too much). Most other popular software (e.g. Microsoft Word) saves an autorecover file in a dedicated folder before the file has been saved for the first time. This feature would be really useful in Mathematica.

POSTED BY: Thomas B

If you have regular backups of your system, it'll be easy to find any temporary files left over by Mathematica by comparing directory listings pre- and post-incident.

On Windows, if you're using a backup system that can mount the backup images as volumes - e.g. Macrium Reflect - you can get the directory listing of the temporary folder:

% on the backup image volume, let's say it's D:
cd d:\Users\%username%\
dir d: /s /b sortorder:N > %userprofile%\temp_pre.txt
% same on the main volume, say it's C:
cd %userprofile%
dir c: /s /b sortorder:N > %userprofile%\temp_post.txt

Then you can use your favorite file differentiating tool to compare the two files and see if you can spot anything useful. SmartSynchronize is "free-to-use" (and otherwise well worth the money), and cross platform, so you can use that to inspect a user-friendly difference of the two directory listings.

Of course, you could do all that in Wolfram language as well.

Posted 10 months ago

I'm on a Mac - the reply from Jason Biggs of Wolfram, says the problem is because there is no file until the notebook is saved. So the window that is open on your computer that says "Untitled-1" is not a file apparently. Sure has the appearance of one to me.

I've looked around for any indications of some open file but there does not appear to be anything.

Am guessing that what you see on the screen is just in memory and there is simply nothing on disk yet that could be recovered.

This is just simply hard to believe to me that this bug hasn't been fixed long long ago. Very bad user interface in my opinion. How many hours of peoples time has been lost to this one bug is just hard to fathom that Wolfram has not long ago addressed this.

Thanks for the suggestion - if anyone has any ideas on what can be done on macOS please let us know.

-bob

POSTED BY: Bob Freeman
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard

Group Abstract Group Abstract