Code::Blocks Forums

User forums => Using Code::Blocks => Topic started by: Thoth on September 22, 2024, 09:13:02 pm

Title: Workspace Stopped Opening Project File
Post by: Thoth on September 22, 2024, 09:13:02 pm
Hello People,

I have a workspace file that no longer opens one of the projects in the workspace.

The Code::Blocks log window shows:

Opening /SG3Data/CodeTemp/ins_LPOCode/LPOCheck/CodeBlocks/lpo_check.cbp
Unable to open "/CodeTemp/ins_LPOCode/LPOCheck/CodeBlocks/lpo_check.cbp" during opening workspace "/CodeTemp/ins_LPOCode/LPOCheck/CodeBlocks/lpo_check.workspace"

Attempting to open the project file directly also fails with:
Opening /SG3Data/CodeTemp/ins_LPOCode/LPOCheck/CodeBlocks/lpo_check.cbp
Opening file '/CodeTemp/ins_LPOCode/LPOCheck/CodeBlocks/lpo_check.cbp' failed!

I was able to open the workspace from the "Start Here" window, the recent projects item, and by double-clicking it in nemo.

I have checked the permissions of the directories and files involved and everything looks as it should.

I note there is no option to add a project to a workspace and using the open option fails.

I am using:
Name                   : Code::Blocks
Version                : svn-r13046
SDK Version            : 2.23.0
Starting Code::Blocks svn build  rev 13046 2022-12-27, 22:00:27 - wx3.2.1 - gcc 12.2.0 (Linux, unicode) - 64 bit

If anyone has any suggestions, please let me know.


=thoth=




Title: Re: Workspace Stopped Opening Project File
Post by: stahta01 on September 22, 2024, 09:34:41 pm
The steps I use to fix this issue when I have it.

1. Open the CB Workspace
2. Open the CB Project
3. Reorder projects in workspace if needed
4. Save As the Workspace Edit: Save Workspace should also work

Tim S.
Title: Re: Workspace Stopped Opening Project File
Post by: Thoth on September 23, 2024, 01:49:54 am
Hello stahta01,

Thank you for replying.

I had previously tried that. Once I saved the workspace the project that was not being opened was no longer in the workspace list.

I ended up taking a similar project, copying it to the appropriate directory, and making changes to it.

After that I was able to open the workspace normally.


=thoth=
Title: Re: Workspace Stopped Opening Project File
Post by: Miguel Gimenez on September 23, 2024, 12:31:39 pm
Probably the project was corrupted.
Title: Re: Workspace Stopped Opening Project File
Post by: Thoth on September 25, 2024, 05:48:51 am
Hello Miguel,

That was my thought at first.

However, a binary comparison of the project file and the bad project file showed them as being the same.
I also encountered this issue with a different workspace today. I ended up copying the first good project, renaming it and changing it.


=thoth=