News:

Accounts with zero posts and zero activity during the last months will be deleted periodically to fight SPAM!

Main Menu

multiple instance block after system reset

Started by spiderkarma, June 02, 2008, 07:45:09 PM

Previous topic - Next topic

spiderkarma

After an undesired and sudden system reset while running Code::Blocks on Linux, I'm unable to start the IDE - "another program instance is already running". How can I fix this?

Thanks.

spiderkarma

Is there a lock that can be removed or some other fix?

Info from DerMeister in IRC:

Yes, there is some sort of lock-file but usually code::blocks detects if this is outdated and tells you that it was removed.
I think it should be the file /tmp/Code::Blocks-<your-user-name-here>.
It contains the pid of the codeblocks process... Perhaps you have a process with this id running after restarting your box and codeblocks now believes that there is another instance running...

If you remove that file Code::Blocks should work again.

Jenna

The first thing is to look if real no instance of C::B is running. Some window-managers (or more exact their session-managers) try to restart programs that have been opened on last shutdown.
You can try to kill it if there is an instance running  by either "killall codeblocks" or "killall -9 codeblocks" to force killing, or by "kill [-9] <pid_of_running_codeblocks_process>" .

If none is running you can have a look for "/tmp/codeblocks*", but that should not matter, even if it exists.
And normally on linux the tmp-directory is cleaned up on boot, so nothing should stay there from before your crash.

If that does not work, you can edit your "default.conf" in "~/.codeblocks/" and change <SINGLE_INSTANCE bool="1" /> to <SINGLE_INSTANCE bool="0" /> to allow multiple instances of C::B running at the same time.

If all that does not work try to delete (or better rename) the "~/.codeblocks/" directory.