Constant File Cache Conflict

Hi All,

I'm currently trying out PhpStorm via the evaluation period. However, I'm experiencing a rather annoying issue.

I keep getting the "File Cache Conflict" popup. It doesn't show up on every save, but it's relatively regular. But, the only difference between the two when I look at the diff is the last characters I've typed since I last saved the file. I habitually press CTRL+S every few lines of code.

However, I also noticed that the version on the disk on the diff window has 'LF' above it, but the one in memory has the 'CRLF' label above it. That to me looks like the files have different line endings, but I wasn't sure because it didn't show in the diff.

If that is the case, then it appears that there is some external program that is changing the line endings in the background.

 

Has anybody else experienced this? What could it be?

 

Thanks in advance,

Caelan.

14 comments

Do you access your files over network and/or using a VCS?

0

@Eugene Morozov, the files are located in C:/wamp64/www/*/. And yes, it is a Git repository. But whenever the above error occurs, I haven't actually interacted with Git.

Now, unless PhpStorm does something with Git in the background, then I'm not sure how that could be related. Although I know Git does convert between line endings for me when I commit and push, but I didn't think Git could do anything without my knowledge without some kind of Git service running.

If you have any ideas, I'd be happy to give them a go.

0

Is there a chance to upload anywhere your idea.log (help > Shot log in ...) file right after this reoccurs and share with us?

0

@Dmitry, of course.

It has just literally happened. Here is an excerpt from the log file containing every entry since I started the IDE this morning. After having a look through myself, there is high frequency of the following warning:

2016-09-15 09:26:10,108 [2129093]   WARN - codeglance.EditorPanelInjector - I07: Injection skipped. Looks like we have already injected something here. 

I'm not sure what that means, though.

0

Still getting this constantly, can't figure out what it is. It's really annoying.

0

I have some new info. Before, when I looked at the diff between the file system content and the memory content were the last characters I'd typed since my last save, and that the line endings were different between the two.

Now, I've set PhpStorm to use LF instead of CRLF, and now when the file cache conflict occurs, the only difference is literally the last characters I've typed since my last save.

I'm using Windows 10 x64, latest version from date of posting this, I'm using the latest version of PhpStorm, the only plugins I have is the .ignore plugin, and CodeGlance code minimap. I'm using the trial version to see if I like it, and so far I've been confronted with constant file cache conflict pop ups.

 

What on earth is going on here, does anybody have any ideas?

0

Could you please try to disable CodeGlance plugin? 

`codeglance.EditorPanelInjector - I07: Injection skipped. Looks like we have already injected something here.`

doesn't look nice.

0

@Dmitry, OK, I've disabled CodeGlance. I've been using PhpStorm for the last couple of days without it, and I still get the occasional File Cache Conflict. Not as often, but still enough to be annoying every now and then.

A little earlier, it occurred when I created a new file "element-size.js". And it happened again just now, but when I saved a change.

I have set PhpStorm to use CRLF line endings, as I'm developing on a Windows environment. However, same as before, when I look at the diff between the disk version and the memory version, the only differences are the last characters I typed since saving last, and the line endings. The disk version always shows as LF, but the memory copy is CRLF.

Log excerpt file here.

What on earth could be changing line endings?

0

>What on earth could be changing line endings?

Since you are on Windows ... I may suggest to use Process Monitor (or another similar tool) and see what processes accessing those files.

https://technet.microsoft.com/en-gb/sysinternals/bb896645

1

Interesting, I did not know about that piece of software.

And, it turns out, something completely unexpected was causing this.

 

A process named "Cmdagent.exe" was reading/writing to the file. I've also noticed a pattern to it; it only happens when I save twice in quick succession. I guess Comodo must have a file watcher that scans newly created files.

And from the event log, it looks like PhpStorm and Cmdagent are grappling to do something with the same file in a very short period of time.

0

From what I see you are using intermediate temp file ("Safe write" option -- look in Settings for it using search box) -- file gets saved in that temp file, then original file gets deleted and temp file gets renamed to a proper name.

Try disabling that option -- IDE will write new content into the same file straight away -- see if it will do any differently.

Also try disabling that Cmdagent (Comodo?) for a while (or add PhpStorm into a white/exclusion list) to check for the same.

0

@Andriy, I thought PhpStorm might be doing an atomic save, since it is creating new files every time.

I have added PhpStorm to the exclusion list. If Comodo, for whatever reason, decides it doesn't want to respect that, I'll try disabling atomic save.

0

Little clarification on AV exclusion list.

I'm using KAV (Kaspersky) .. and here when white listing an app I also have an option to ignore any files opened by that app.

I do not know how Comodo works here ... but if initial white listing (executable app) will not do much -- try also white listing whole project folder.

0

@Andriy, I have:

  • Disabled atomic save
  • Added C:\wamp64\www\* to the live file system scanner whitelist for Comodo
  • Added the PhpStorm application to the application whitelist for Comodo

However, Comodo still reads/writes those files. But that's a separate issue, and I've been thinking of switching AV anyway,

Cheers for all the help, much appreciated.

0

Please sign in to leave a comment.