Code::Blocks Forums

User forums => Using Code::Blocks => Topic started by: lehe on February 03, 2009, 09:28:42 am

Title: Error Saving Files
Post by: lehe on February 03, 2009, 09:28:42 am
I have two systems on my laptop: Windows XP and Ubuntu 8.10
My CB svn5432 is in Ubuntu. My program is saved in the hard drive of Windows and can be accessed from Ubuntu.
Before yesterday everything is fine. Since then, any change to my program under CB always fail to proceed, giving an Error Saving Files message window saying "File ... could not be saved...". If I copy my program to the part of hard drive for Ubuntu, then change to the copy can be saved. And any change to my program made under gedit and other editors can be saved. How can I fix this problem in CB? Thanks!
Title: Re: Error Saving Files
Post by: dje on February 03, 2009, 09:48:38 am
Hi!

I have no answer but I think your C::B version will help devs that can help you.

Dje
Title: Re: Error Saving Files
Post by: lehe on February 03, 2009, 09:54:42 am
Mine svn 5432
Title: Re: Error Saving Files
Post by: Jenna on February 03, 2009, 10:06:10 am
How much disk-space is free, when the error occurs?

How large are the files ?

Do you have any *.cbTemp-files in the directory after the saving does not work ?

Did the error started when after updating C::B, or does it start with a version, that worked before?
Title: Re: Error Saving Files
Post by: lehe on February 03, 2009, 03:04:49 pm
I think my disk is still plentifully free. Root is just used 54% with total 7.3G, home 6% with 5.5G, Windows C drive 64% with 45G (FAT32) and Windows D drive 75% with 31.3G (NTFS). Windows D drive is where my program is stored.

I have tried some programs. The files of my program can be as small as one C file of size 1.1KB and as big as 55 header and source files of total size 123.9KB

I do have some *.cbTemp-files in the same directory for the file I failed to make change to. Looks like my change was stored in these temporary files and failed to write into my code file. Does it mean something?

I didn't quite notice this happened along with the upgrade. But I remembered with 8.02, there was no such problem. Then I upgraded to svn5382 and subsequently to svn5432. It seems to me the problem came around 5382.

Thanks!
Title: Re: Error Saving Files
Post by: Jenna on February 03, 2009, 04:10:49 pm
Is the original-file unchanged, or is it cleared ?

If it is unchanged, you most likely do not have write-access to the file (not the file-system).

I'm not sure if writing to ntfs-partitions from linux works reliable in the meantime.

I still use FAT32-partitions for shared filesystems.

The filemanager-code (where the tempfile is created and the original file should be overwritten) is not changed since revision 5104, so the error is most likely a problem with access-rights.
Title: Re: Error Saving Files
Post by: lehe on February 03, 2009, 05:58:41 pm
Thanks!
What does it mean "Is the original-file unchanged, or is it cleared ?"
If I try to modify the content of my code file, the file appears to be changed, but attempts to save fails leaving a "*" on the tab of the file in CB editor. At the meantime, the .cbTemp file for my code file is created under the same directory to store the version before my modification. After I force to quit CB without saving, the .cbTemp file remains where it was.

The problem didn't happen with other editors, like gedit.
Title: Re: Error Saving Files
Post by: Jenna on February 03, 2009, 06:43:30 pm
Thanks!
What does it mean "Is the original-file unchanged, or is it cleared ?"

I wanted to know, whether you have an empty file or just an unchenged one, if you open it with another editor.

But what's about the file permissions and odes it happen on any other partition, or only on the ntfs-partition ?
Title: Re: Error Saving Files
Post by: lehe on February 03, 2009, 07:15:42 pm
If opened with gedit, it is unchanged just as it was, not empty.

On my Windows FAT32 disk, which is also my Windows system disk, when I create a new project, I got this error "Couldn't save project /windows-c/opencv/helloworld_linux/helloworld_linux.cbp (Maybe the file is write-protected?)". Subsequently saving changes to the code files fails. The same thing happens to my Windows NTFS disk.

Title: Re: Error Saving Files
Post by: jabahpureza on March 04, 2010, 08:39:45 pm
I've got the exactly same problem here.

When I open a saved project from a NFTS partition I can't save any change! For every file I change and try to save I get this "Error Saving Files" window.
When I copy the same project to a GNU/Linux partition I can save it normally.

But when I run code:blocks as root "gksudo codeblocks" this problem disappears.

Is it a code::blocks bug or what?

thank you very much!
jjR
Title: Re: Error Saving Files
Post by: stahta01 on March 04, 2010, 10:33:22 pm
I've got the exactly same problem here.

When I open a saved project from a NFTS partition I can't save any change! For every file I change and try to save I get this "Error Saving Files" window.
When I copy the same project to a GNU/Linux partition I can save it normally.

But when I run code:blocks as root "gksudo codeblocks" this problem disappears.

Is it a code::blocks bug or what?

thank you very much!
jjR

The above is the example of a permission problem.

Tim S.
Title: Re: Error Saving Files
Post by: schizofrenikh on March 29, 2011, 09:09:35 pm
I think the problem is here
https://bugs.launchpad.net/ubuntu/+source/ntfs-3g/+bug/124795?comments=all
I posted a comment in the bottom because this is how i suppose the problem looks like.
Am I right about the CodeBlocks trying to change the modification time? Or is it trying to do some other not really necessary operation on the file which gedit doesn't try to do?
Title: Re: Error Saving Files
Post by: Jenna on March 29, 2011, 09:43:27 pm
I think the problem is here
https://bugs.launchpad.net/ubuntu/+source/ntfs-3g/+bug/124795?comments=all
I posted a comment in the bottom because this is how i suppose the problem looks like.
Am I right about the CodeBlocks trying to change the modification time? Or is it trying to do some other not really necessary operation on the file which gedit doesn't try to do?
It's not C::B itself, but the wxWidgets function it uses:
http://forums.codeblocks.org/index.php/topic,10735.msg73563.html#msg73563 (http://forums.codeblocks.org/index.php/topic,10735.msg73563.html#msg73563)
http://forums.codeblocks.org/index.php/topic,10263.msg70971.html#msg70971 (http://forums.codeblocks.org/index.php/topic,10263.msg70971.html#msg70971)
Title: Re: Error Saving Files
Post by: schizofrenikh on March 30, 2011, 10:46:01 am
Thank you for reply.

Well, now I will try searching at wxWidgets forums. Maybe they have found some solution.