Author Topic: multiple instance block after system reset  (Read 13950 times)

Offline spiderkarma

  • Single posting newcomer
  • *
  • Posts: 3
multiple instance block after system reset
« on: June 02, 2008, 07:45:09 pm »
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.

Offline spiderkarma

  • Single posting newcomer
  • *
  • Posts: 3
Re: multiple instance block after system reset
« Reply #1 on: June 02, 2008, 10:29:22 pm »
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.

Offline Jenna

  • Administrator
  • Lives here!
  • *****
  • Posts: 7255
Re: multiple instance block after system reset
« Reply #2 on: June 02, 2008, 10:58:51 pm »
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
Code
<SINGLE_INSTANCE bool="1" />
to
Code
<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.