Author Topic: Workspace Stopped Opening Project File  (Read 2666 times)

Offline Thoth

  • Multiple posting newcomer
  • *
  • Posts: 18
Workspace Stopped Opening Project File
« 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=





Offline stahta01

  • Lives here!
  • ****
  • Posts: 7696
    • My Best Post
Re: Workspace Stopped Opening Project File
« Reply #1 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.
« Last Edit: September 23, 2024, 01:31:18 am by stahta01 »
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 Thoth

  • Multiple posting newcomer
  • *
  • Posts: 18
Re: Workspace Stopped Opening Project File
« Reply #2 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=

Offline Miguel Gimenez

  • Developer
  • Lives here!
  • *****
  • Posts: 1640
Re: Workspace Stopped Opening Project File
« Reply #3 on: September 23, 2024, 12:31:39 pm »
Probably the project was corrupted.

Offline Thoth

  • Multiple posting newcomer
  • *
  • Posts: 18
Re: Workspace Stopped Opening Project File
« Reply #4 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=