Author Topic: Keep getting prompt to reload file when window loses focus (Windows 7, CB 17.12)  (Read 667 times)

Offline Chrushev

  • Single posting newcomer
  • *
  • Posts: 7
Keep getting this window: https://imgur.com/a/ELVLe on Windows 7 with CB 17.12 whenever CB goes into background.

I am running same version on Windows 10 on another PC and have no issues like this, only the Win 7 installation.


Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 10806
    • Travis build status
What are the time stamps of the file that are reported as modified?
Do you reload them?
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]

Offline Chrushev

  • Single posting newcomer
  • *
  • Posts: 7
What are the time stamps of the file that are reported as modified?
Do you reload them?

Im not sure what you mean? Timestamps are current it doesnt seem to matter if I click yes or not it does it again next time the window is out of focus.

Offline BlueHazzard

  • Lives here!
  • ****
  • Posts: 1830
Codeblocks should show this dialog only if the time stamps of the file differ from the time stamp the file had before codeblocks is going out of focus. So if the time stamp of the file is newer then you or codeblocks modified the file there is something other modifying the file (anti virus, drop box, other file sync things....)

Offline Chrushev

  • Single posting newcomer
  • *
  • Posts: 7
Codeblocks should show this dialog only if the time stamps of the file differ from the time stamp the file had before codeblocks is going out of focus. So if the time stamp of the file is newer then you or codeblocks modified the file there is something other modifying the file (anti virus, drop box, other file sync things....)

Seems like CB itself is modifying the file. I have a bunch of code opened, saved it, had 24 hours go by without touching it and no message.

I added a few blank lines (pressed enter a few times and didnt save). Changed focus, come back and that window is up and timestamp is changed to today. Its definitely done by CB. Because the file retained yesterday's timestamp until I added a few lines in CB. Nothing else interacted with file, and I didnt save, so AV or whatever else on the PC still saw it as yesterday's file, only CB knew of the changes.
« Last Edit: February 09, 2018, 02:53:51 am by Chrushev »

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 10806
    • Travis build status
Is the time stamp in the future after a save?
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]

Offline Chrushev

  • Single posting newcomer
  • *
  • Posts: 7
Is the time stamp in the future after a save?

I dont think so. Think its right when the message pops up.

EDIT - Whats interesting is that if I click yes to reload, then it reloads the last file that was saved (yesterday) without the extra lines.

So its more like a file is saved. Then i change code in CB without saving, and it keeps wanting to revert back to that saved file and timestamps are being changed to current time on the file every time it does a check.
« Last Edit: February 09, 2018, 04:00:27 am by Chrushev »

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 10806
    • Travis build status
Does it happen with all file? Can you create a new file in another folder and tells us if it does it?
What happens if you try with an older build 16.01, older night build?
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]

Offline Chrushev

  • Single posting newcomer
  • *
  • Posts: 7
Does it happen with all file? Can you create a new file in another folder and tells us if it does it?
What happens if you try with an older build 16.01, older night build?

Create a file in another folder via CB? ive done multiple projects from scratch and this issue happened every time (new folder for each project).
Im in the middle of doing some development so cant really be uninstalling/trying new IDEs.

Offline BlueHazzard

  • Lives here!
  • ****
  • Posts: 1830
You are the only one with this problem, so it has to be something on your pc...

Was this always the same? Did it worked some time, or was it always with this behavior?

You can use this microsoft tool to monitor if a other program modifies the file.
https://technet.microsoft.com/en-us/sysinternals/bb896645.aspx

Add a filter via Filter->Filter->Select path from the drop down menu -> Add the path to the file in the text entry and click "Add"

If again only codeblocks accesses the file we have to think about something else....

Offline Chrushev

  • Single posting newcomer
  • *
  • Posts: 7
You are the only one with this problem, so it has to be something on your pc...

Was this always the same? Did it worked some time, or was it always with this behavior?

You can use this microsoft tool to monitor if a other program modifies the file.
https://technet.microsoft.com/en-us/sysinternals/bb896645.aspx

Add a filter via Filter->Filter->Select path from the drop down menu -> Add the path to the file in the text entry and click "Add"

If again only codeblocks accesses the file we have to think about something else....

Ran Process Monitor, looks like Windows Indexing is doing it? SearchProtocolHost.exe is accessing the file while its in background. This only happens when CB is in the background window (another window is focused).

Screenshot --> https://i.imgur.com/87Qo8ek.png

Offline BlueHazzard

  • Lives here!
  • ****
  • Posts: 1830
Have you set the filter to the project path, or to a specific source file?
It would be suspicious if the windows indexer modifies the file...

Can you try to exclude the project path from the indexer? https://www.sevenforums.com/tutorials/17854-index-locations-add-remove.html

Do you have a other drive, where you can try to create a project?

There seems that the WS modifies the date time code of some files... (PST and more bellow there are reports for other files to)
https://social.technet.microsoft.com/Forums/windows/en-US/36748ed1-595f-4d85-98f6-442662752cf9/searchprotocolhostexe-appears-to-be-modifying-pst-file?forum=w7itprogeneral
but there is no solution in this thread