Author Topic: Error saving file  (Read 32070 times)

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13413
    • Travis build status
Re: Error saving file
« Reply #15 on: November 21, 2017, 09:59:15 am »
@wadhere: What is the full path for the file you want to 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 wadhere

  • Single posting newcomer
  • *
  • Posts: 7
Re: Error saving file
« Reply #16 on: November 21, 2017, 06:55:34 pm »
Today I checked the situation on a win7 PC. Everything works fine. I checked this with 16.01

The path of the c:b installation itself is: c:\Program Files (x86)\CodeBlocks\
MinGw is also there : c:\Program Files (x86)\CodeBlocks\MinGw\

The test project are at: c:\project_CB\test8\
Please see also the attached screenshot.

In regards of security setting of Win10:
I'm not sure what is meant with "security settings" - i checked this with  AVG Antivirus switched off ... but is does not work.

Every time a file "main.c.save-failed" created when I try to save my changes.

Thanks for reading and commenting






Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13413
    • Travis build status
Re: Error saving file
« Reply #17 on: November 21, 2017, 09:37:59 pm »
OK, this gives some hints what fails.
C::B uses save-to-temp and rename mechanism to prevent data loss.
The .save-failed file is created when the second step fails. So obviously renaming the fail over the original fails.

Can you try to record the save operation with procmon (https://docs.microsoft.com/en-us/sysinternals/downloads/procmon) so we can probably see the error message?
(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 wadhere

  • Single posting newcomer
  • *
  • Posts: 7
Re: Error saving file
« Reply #18 on: November 22, 2017, 07:31:07 pm »
Hello oBFusCATed,
I made the log file, Can I send the files via mail ?

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13413
    • Travis build status
Re: Error saving file
« Reply #19 on: November 22, 2017, 08:16:31 pm »
Nope. You can either attach it to a forum pose or pastebin it on some site pastebin like site.
(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 wadhere

  • Single posting newcomer
  • *
  • Posts: 7
Re: Error saving file
« Reply #20 on: November 22, 2017, 10:17:59 pm »
pls see the fileshare system Wetranfer: https://we.tl/l5VTTPAeKV

filtered log : Process Name "codeblock" ; path: c:\project_CB\

if you need more details or a different filter than please give me a hint

It is too large to attach
Thx

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13413
    • Travis build status
Re: Error saving file
« Reply #21 on: November 22, 2017, 11:49:25 pm »
Sorry but I need text files. I don't have windows, nor a tool which could open these.
(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 BlueHazzard

  • Developer
  • Lives here!
  • *****
  • Posts: 3353
Re: Error saving file
« Reply #22 on: November 23, 2017, 12:28:04 am »
Essentially there is a ACCESS DENIED at renaming "main.c.temp" to "main.c"

Stack trace (does not say anything):
Code
"Frame","Module","Location","Address","Path"
"0","FLTMGR.SYS","FLTMGR.SYS + 0x7682","0xfffff80fe3067682","C:\WINDOWS\System32\drivers\FLTMGR.SYS"
"1","FLTMGR.SYS","FLTMGR.SYS + 0x7228","0xfffff80fe3067228","C:\WINDOWS\System32\drivers\FLTMGR.SYS"
"2","FLTMGR.SYS","FLTMGR.SYS + 0x6e2b","0xfffff80fe3066e2b","C:\WINDOWS\System32\drivers\FLTMGR.SYS"
"3","FLTMGR.SYS","FLTMGR.SYS + 0x6bce","0xfffff80fe3066bce","C:\WINDOWS\System32\drivers\FLTMGR.SYS"
"4","ntoskrnl.exe","ntoskrnl.exe + 0x388d9","0xfffff8006d84f8d9","C:\WINDOWS\system32\ntoskrnl.exe"
"5","ntoskrnl.exe","ntoskrnl.exe + 0x3c7a6","0xfffff8006d8537a6","C:\WINDOWS\system32\ntoskrnl.exe"
"6","ntoskrnl.exe","ntoskrnl.exe + 0x3c6b8","0xfffff8006d8536b8","C:\WINDOWS\system32\ntoskrnl.exe"
"7","ntoskrnl.exe","ntoskrnl.exe + 0x3bd07","0xfffff8006d852d07","C:\WINDOWS\system32\ntoskrnl.exe"
"8","ntoskrnl.exe","ntoskrnl.exe + 0x16f553","0xfffff8006d986553","C:\WINDOWS\system32\ntoskrnl.exe"
"9","ntdll.dll","ntdll.dll + 0xa0324","0x7ff9fcae0324","C:\WINDOWS\SYSTEM32\ntdll.dll"
"10","wow64.dll","wow64.dll + 0x1675e","0x5c3b675e","C:\WINDOWS\System32\wow64.dll"
"11","wow64.dll","wow64.dll + 0x9ca0","0x5c3a9ca0","C:\WINDOWS\System32\wow64.dll"
"12","wow64.dll","wow64.dll + 0x6463","0x5c3a6463","C:\WINDOWS\System32\wow64.dll"
"13","wow64cpu.dll","wow64cpu.dll + 0x1923","0x5c401923","C:\WINDOWS\System32\wow64cpu.dll"
"14","wow64.dll","wow64.dll + 0x1ac12","0x5c3bac12","C:\WINDOWS\System32\wow64.dll"
"15","wow64.dll","wow64.dll + 0xbcf0","0x5c3abcf0","C:\WINDOWS\System32\wow64.dll"
"16","ntdll.dll","ntdll.dll + 0xd5bbd","0x7ff9fcb15bbd","C:\WINDOWS\SYSTEM32\ntdll.dll"
"17","ntdll.dll","ntdll.dll + 0xc75b3","0x7ff9fcb075b3","C:\WINDOWS\SYSTEM32\ntdll.dll"
"18","ntdll.dll","ntdll.dll + 0x7920b","0x7ff9fcab920b","C:\WINDOWS\SYSTEM32\ntdll.dll"
"19","ntdll.dll","ntdll.dll + 0x791be","0x7ff9fcab91be","C:\WINDOWS\SYSTEM32\ntdll.dll"
"20","ntdll.dll","ntdll.dll + 0x6e9dc","0x76f6e9dc","C:\WINDOWS\SysWOW64\ntdll.dll"
"21","KERNELBASE.dll","KERNELBASE.dll + 0x10a647","0x752ea647","C:\WINDOWS\SysWOW64\KERNELBASE.dll"
"22","KERNELBASE.dll","KERNELBASE.dll + 0x10a469","0x752ea469","C:\WINDOWS\SysWOW64\KERNELBASE.dll"
"23","codeblocks.dll","codeblocks.dll + 0xd0b4c","0x61890b4c","C:\Program Files (x86)\CodeBlocks\codeblocks.dll"
"24","codeblocks.dll","codeblocks.dll + 0xdce99","0x6189ce99","C:\Program Files (x86)\CodeBlocks\codeblocks.dll"
"25","codeblocks.exe","codeblocks.exe + 0x7db58","0x47db58","C:\Program Files (x86)\CodeBlocks\codeblocks.exe"
"26","wxmsw28u_gcc_cb.dll","wxmsw28u_gcc_cb.dll + 0x1262","0x6cc41262","C:\Program Files (x86)\CodeBlocks\wxmsw28u_gcc_cb.dll"

function called:
Code
SetRenameInformationFile

i could not find more usefull information...

[EDIT:] There is also this description line
Code
ReplaceIfExists: True, FileName: C:\project_CB\test1\main.c
« Last Edit: November 23, 2017, 12:38:40 am by BlueHazzard »

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13413
    • Travis build status
Re: Error saving file
« Reply #23 on: November 23, 2017, 01:37:17 am »
Is there anything else accessing main.c? What about the indexer? Could it be affecting this?
(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 BlueHazzard

  • Developer
  • Lives here!
  • *****
  • Posts: 3353
Re: Error saving file
« Reply #24 on: November 23, 2017, 10:47:32 am »
i think we will need an other log for this. With a filter for the main.c.temp file
Windows documentation is not quite useful for this, and the error message does not tell anything.

If this is an indexer error, how can we avoid it? Saving directly to the file? Adding delay? Waiting till all processes accessing the file close their handle (and blocking c::b with this)?
what a shitty problem...

Would it help to create the main.c.temp file in advance by the user, or does cb checks for collision?

Offline wadhere

  • Single posting newcomer
  • *
  • Posts: 7
Re: Error saving file
« Reply #25 on: November 23, 2017, 06:44:52 pm »
Ok - I changed the filter. Now all process data related to codeblock.exe should be visible, >90MB
Pls see at aprox 18:34

https://we.tl/KtELGoMFyn

thx


« Last Edit: November 23, 2017, 06:51:34 pm by wadhere »

Offline BlueHazzard

  • Developer
  • Lives here!
  • *****
  • Posts: 3353
Re: Error saving file
« Reply #26 on: November 24, 2017, 09:30:03 pm »
There is not more information. We still don't know what blocks the access to this file. Can you add a filter specially for "C:\project_CB\test\main.c.temp" (if this is possible) don't filter only for codeblocks, so we see all programs that access this file

Offline stahta01

  • Lives here!
  • ****
  • Posts: 7582
    • My Best Post
Re: Error saving file
« Reply #27 on: November 25, 2017, 12:45:34 am »
Likely a dumb question; but, are we sure that "main.c" file has been deleted before "main.c.temp" is renamed to "main.c"?

Tim S.

C Programmer working to learn more about C++ and Git.
On Windows 7 64 bit and Windows 10 64 bit.
--
When in doubt, read the CB WiKi FAQ. http://wiki.codeblocks.org

Offline MortenMacFly

  • Administrator
  • Lives here!
  • *****
  • Posts: 9694
Re: Error saving file
« Reply #28 on: November 25, 2017, 05:43:10 am »
I just tried after updating to 1709. It works for me although all exploit protections are on.

However, in the group policy editor you can define trusted applications. Did you try to add codeblocks to it?
Compiler logging: Settings->Compiler & Debugger->tab "Other"->Compiler logging="Full command line"
C::B Manual: https://www.codeblocks.org/docs/main_codeblocks_en.html
C::B FAQ: https://wiki.codeblocks.org/index.php?title=FAQ

Offline MortenMacFly

  • Administrator
  • Lives here!
  • *****
  • Posts: 9694
Re: Error saving file
« Reply #29 on: November 25, 2017, 05:48:31 am »
I would guess its more an issue with a AV software. For those that experience the same: Two questions:

1.) Do you have a AV software different to the one included with Windows (MS Defender)?
2.) What happens if you temporarily un-install this software? (And I don't mean just de-activate).

The reason for that is that if the protection is an issue, it could also easily interfere with AV solutions not prepared for such.

What I realise besides when activating this protection is that Windows massively slows down, btw.
Compiler logging: Settings->Compiler & Debugger->tab "Other"->Compiler logging="Full command line"
C::B Manual: https://www.codeblocks.org/docs/main_codeblocks_en.html
C::B FAQ: https://wiki.codeblocks.org/index.php?title=FAQ