File corrupted after crash

Hi, today my phpstorm become unresponsive while editing a file and it caused the hole windows to become unresponsive , so i had to restart the windows by force (case restart button).

After booting when i started phpstorm got some errors about corrupted config files.

Cannot load settings from file 'C:\Users\Exlord\.PhpStorm2016.2\config\options\window.manager.xml': Error on line 1: Content is not allowed in prolog.

Cannot load settings from file 'C:\Users\Exlord\.PhpStorm2016.2\config\options\recentProjectDirectories.xml': Error on line 1: Content is not allowed in prolog.

Cannot load settings from file 'C:\Users\Exlord\.PhpStorm2016.2\config\options\feature.usage.statistics.xml': Error on line 1: Content is not allowed in prolog.

Cannot load settings from file 'projectname\.idea\workspace.xml': Error on line 1: Content is not allowed in prolog.
Please correct the file content

then opened the file that i was working on and it was empty :((, well not empty there is one line of unreadable data


The local history is empty and i don't have any backups of this since it is a new file that i have been working for a week :((
The safe write was not checked too.
I uploaded the file to

Is there a way to restore its content?

Vladimir Luchansky


Without safe write we work with files directly. System crash could interrupt Java write stream and cause file corruption - as any crash of any system, this situation is unpredictable and circumstances are totally unforeseen.

We already have a ticket related to settings lost (those XML config files) submitted to our tracker here: <>. Our team is investigating the cause of this. You can vote for it in order to move it up in the queue and receive notifications regarding the progress of the feature. See more information on working with tracker at <>.

However, project files are not affected by this and should be completely safe with "Safe Write" option - it creates a temporary file with changes which is merged into main file afterwards so all read/write operations are performed with temporary file.

Now, unfortunately, nothing can be done about recovering this file. If local history is empty, we cannot track it back.

I would advise to enable "Safe write" and configure a version control system (like Git, Subversion or similar) and integrate PhpStorm with it.
Version control can help you with code base tracking and also works like a granular backup solution for it and can save code from unpredictable crashes in future.

It is also worth to check the hardware and ensure that everything is OK with hard drive, its controller and everything else - this hang might be actually an alarm bell.



Tanks for the response. I had disabled "safe write" because i was getting lots of "file cache conflict" ->, and i thought that "safe write" was causing it. but it didn't and i am still getting "file cache conflict" while working on a file.

I have git but since this was a new file in a new module i was waiting to finish it to commit :(

I am working on a SSD and i checked/optimized it with windows build in tools no errors were reported.

Tanks anyway.


Do you use a network share/mount as a project directory?


I have identical problem. After power off I ended up with corrupted local history and file filled up with zeroes. I have "safe write" turned on and it still didn't help. Notepad++ have similar issue, so it may be Windows problem

And one more thread


Thanks for sharing



I deleted the .idea/ folder (a desperate attempt to make Idea "understand" a Gradle project it understood before switching a branch)...

...then I realized with it I also deleted all my Run/Debug configurations. All files under .idea/ provide their Local History, with one exception: workspace.xml.



Please sign in to leave a comment.