Author Topic: Error saving file  (Read 392 times)

Offline Blacksheep

  • Single posting newcomer
  • *
  • Posts: 6
Error saving file
« on: November 01, 2017, 03:40:09 pm »
Hi all,

after applying the latest Windows Creator update (the one with the exploit protection) c::b no longer overwrites an existing file (error saving file). If the file is being deleted the file can be written but the next attempt to overwrite the file is quitted then again with error writing file.

Steps done to narrow down the problem:
- Disabled Exploit protection -> No success
- The file permissions checked (local disk with NTFS) -> Everything is fine
- Created a new project, changed a file and try to save -> no success

Other IDEs tested does not have the issue, e.g. CodeLite

So be careful if you plan to apply the creator update to your productive system. I suspect that this will cause this behaviour

Offline BlueHazzard

  • Lives here!
  • ****
  • Posts: 1540
Re: Error saving file
« Reply #1 on: November 01, 2017, 05:14:26 pm »
i can not find anything about this on the net. Have you some resources where i can read about this? (i can not find anyone complaining on stack or other forums)
i do not have windows 10 but i would like to help other people with this...

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 10356
Re: Error saving file
« Reply #2 on: November 01, 2017, 08:52:47 pm »
What version of codeblocks are you using?
<debugger plugin maintainer>
(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 Miguel Gimenez

  • Multiple posting newcomer
  • *
  • Posts: 54
Re: Error saving file
« Reply #3 on: November 01, 2017, 09:24:39 pm »
Microsoft decided some folders (like My documents) should be protected from non secure apps, so you can't update your files without their consent. This is called Controlled Folder Access and supposedly is disable by default. The second link explains how to activate it, but of course it also serves to deactivate it. F**k Microsoft  >:(.

https://www.theregister.co.uk/2017/10/23/fyi_windows_10_ransomware_protection/
https://betanews.com/2017/10/24/windows-10-fall-creators-update-controlled-folder-access/

Offline Blacksheep

  • Single posting newcomer
  • *
  • Posts: 6
Re: Error saving file
« Reply #4 on: November 02, 2017, 12:12:12 am »
What version of codeblocks are you using?

The stock 16.01. Downloaded again today and reinstalled without success.

Update:
- I played around with the settings in Windows Defender Control Center and explicit deactivated all settings -> No success
- Providing all rights in Exploit Settings for codeblocks.exe -> No success
- Tested directory outside of "My Documents", e.g. D:\Code -> No success

I am at the end of my knowledge here.

Maybe I will try to monitor tomorrow with sysinternals. Until the problem is solved I am coding now on linux only (the windows machine is just for testing)

« Last Edit: November 02, 2017, 12:21:19 am by Blacksheep »

Offline Blacksheep

  • Single posting newcomer
  • *
  • Posts: 6
Re: Error saving file
« Reply #5 on: November 02, 2017, 12:16:21 am »
Microsoft decided some folders (like My documents) should be protected from non secure apps, so you can't update your files without their consent. This is called Controlled Folder Access and supposedly is disable by default. The second link explains how to activate it, but of course it also serves to deactivate it. F**k Microsoft  >:(.

https://www.theregister.co.uk/2017/10/23/fyi_windows_10_ransomware_protection/
https://betanews.com/2017/10/24/windows-10-fall-creators-update-controlled-folder-access/

Basically this feature is a good one. Any executable not being trusted is not able to manipulate files (e.g. encrypt). I am not sure if this is really the reason for the observed behaviour, it's just my assumption. I will tomorrow setup a VM with Win 10 and test again if the problem really happens after installing the latest windows creator update.

By the way: The windows creator update is being rolled out since some days. If I am right the problem will affect many users running win 10

Offline Blacksheep

  • Single posting newcomer
  • *
  • Posts: 6
Re: Error saving file
« Reply #6 on: November 02, 2017, 09:37:52 am »
Hm, I tried to reproduce the problem in a VM.

- Installed latest Win10 iso in a VM
- Installed codeblocks

I can save changed files without issues. So the problem appears to be local

Thanks for reading and commenting

Offline 0_0

  • Single posting newcomer
  • *
  • Posts: 7
Re: Error saving file
« Reply #7 on: November 06, 2017, 12:23:25 pm »
Hm, I tried to reproduce the problem in a VM.

- Installed latest Win10 iso in a VM
- Installed codeblocks

I can save changed files without issues. So the problem appears to be local

Thanks for reading and commenting

I think I encountered the same problem as you did. I have checked that microsoft windows 10 is updated already.

How do you use a vm?

Offline Blacksheep

  • Single posting newcomer
  • *
  • Posts: 6
Re: Error saving file
« Reply #8 on: November 12, 2017, 10:14:36 pm »
I installed Virtualbox (virtualbox.org), created a VM, mounted a Windows10 Iso as a DVD in the VM and so on.

Offline BlueHazzard

  • Lives here!
  • ****
  • Posts: 1540
Re: Error saving file
« Reply #9 on: November 13, 2017, 09:43:48 am »
isn't the creator update rolled out only in batches? Can you confirm that you have the update installed?
I personally don't think this is the main cause of this problem, because it would make the pc rater useless if i can not modify any files created by other programs....


Offline Blacksheep

  • Single posting newcomer
  • *
  • Posts: 6
Re: Error saving file
« Reply #10 on: November 13, 2017, 11:09:49 pm »
I can confirm that the Creator Update is implemented because of the options for exploit protection coming with the update exist on my system.

I personally believe that something in Windows has changed that c::b is running into this issue. We will see how many users report this issue in the future. It is definetely not a permission issue. This has been meanwhile checked several times. And if that would be a permission issue c::b would not be able to create a file. But c::b has only issues with overwriting existing files even if they are created just before by c::b itself.