Author Topic: [SOLVED]Multiple instances, ver 16.0.1. Is this feature operative?  (Read 24390 times)

Offline Aaron

  • Multiple posting newcomer
  • *
  • Posts: 59
I have un-checked the 'Allow only one running instance (will take place after restart) feature.

Restarted Code::Blocks, but only one instance will open. 
The open CB window flickers, but no 2nd CB opens.

Any advice appreciated.
« Last Edit: August 06, 2016, 06:14:42 am by Aaron »

Offline MortenMacFly

  • Administrator
  • Lives here!
  • *****
  • Posts: 9694
Re: Multiple instances, ver 16.0.1. Is this feature operative?
« Reply #1 on: August 05, 2016, 03:24:57 pm »
Works for me.
Compiler logging: Settings->Compiler & Debugger->tab "Other"->Compiler logging="Full command line"
C::B Manual: https://www.codeblocks.org/docs/main_codeblocks_en.html
C::B FAQ: https://wiki.codeblocks.org/index.php?title=FAQ

Offline Aaron

  • Multiple posting newcomer
  • *
  • Posts: 59
Re: Multiple instances, ver 16.0.1. Is this feature operative?
« Reply #2 on: August 05, 2016, 10:14:17 pm »
Thanks Morten

Should I report this as a bug or is there anything else I could try?
Registry?

Running Win 7 Pro, SP 1.

Offline BlueHazzard

  • Developer
  • Lives here!
  • *****
  • Posts: 3353
Re: Multiple instances, ver 16.0.1. Is this feature operative?
« Reply #3 on: August 05, 2016, 11:44:16 pm »
works for me to.. win 7 sp1

can you restart your pc and try again?

Offline Aaron

  • Multiple posting newcomer
  • *
  • Posts: 59
Re: Multiple instances, ver 16.0.1. Is this feature operative?
« Reply #4 on: August 06, 2016, 12:10:14 am »
I just restarted it the second time, same results.

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13413
    • Travis build status
Re: Multiple instances, ver 16.0.1. Is this feature operative?
« Reply #5 on: August 06, 2016, 03:34:36 am »
Have you tried to disable the "use already running instance if possible"?
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]

Offline Aaron

  • Multiple posting newcomer
  • *
  • Posts: 59
Re: Multiple instances, ver 16.0.1. Is this feature operative?
« Reply #6 on: August 06, 2016, 06:14:07 am »
Quote
Have you tried to disable the "use already running instance if possible"?

YES, and it worked Great!!

Thank you.
« Last Edit: August 07, 2016, 02:11:31 am by Aaron »

Offline tilmannreh

  • Multiple posting newcomer
  • *
  • Posts: 17
Re: [SOLVED]Multiple instances, ver 16.0.1. Is this feature operative?
« Reply #7 on: October 27, 2016, 08:33:28 am »
Hello,

unfortunately, there is still a bug in CB: Only if you start it without an argument (i.e. by clicking on the exe or starting it from the start menu), it will open a second instance.

If one instance of CB is already running, clicking on another .cbp file reproducibly opens the second project in the first instance - regardless of the checkboxes - and completely messes everything up. (BTW, it was a *very* bad idea to put the files of all open projects in a single tab row.)

This is a very boring bug that should be fixed soon.
(Generally, it's far more convenient to start programs indirectly by their files, than having to search through the "open file" dialogs if you start the program first... It's really interesting that CB makes a difference here and simply ignores the settings when started with the project file as argument.)

Tilmann

Offline BlueHazzard

  • Developer
  • Lives here!
  • *****
  • Posts: 3353
Re: [SOLVED]Multiple instances, ver 16.0.1. Is this feature operative?
« Reply #8 on: October 27, 2016, 10:48:52 am »
What operating system are you using?

YEAAA  1000 posts
« Last Edit: October 27, 2016, 10:50:33 am by BlueHazzard »

Offline tilmannreh

  • Multiple posting newcomer
  • *
  • Posts: 17
Re: [SOLVED]Multiple instances, ver 16.0.1. Is this feature operative?
« Reply #9 on: October 27, 2016, 04:17:14 pm »
Windows 7 SP1 Pro - sorry, forgot to mention.
(I might do tests on a W8.1 machine to confirm, but I assume this does not depend on the Windows version.)

Tilmann

Offline BlueHazzard

  • Developer
  • Lives here!
  • *****
  • Posts: 3353
Re: [SOLVED]Multiple instances, ver 16.0.1. Is this feature operative?
« Reply #10 on: October 27, 2016, 06:50:13 pm »
i can't reproduce this on win7 with latest trunk

can you give me a step by step guide?

and completely messes everything up.
what does this mean? Can you give a detailed description, or a screenshot (as noted above i can't reproduce this)

(BTW, it was a *very* bad idea to put the files of all open projects in a single tab row.)
Your opinion, i hate it if there are multiple tab rows ;) ... I use the Open file list view, it is  the most clear view than any other form of control...

Offline tilmannreh

  • Multiple posting newcomer
  • *
  • Posts: 17
Re: [SOLVED]Multiple instances, ver 16.0.1. Is this feature operative?
« Reply #11 on: October 27, 2016, 10:03:32 pm »
Hello, first of all thanks for your help!

It's interesting that you can't reproduce this - it's perfectly reproducible for me (and I also just confirmed that with the W8.1 machine).

Step by step guide:
- Take care both of these checkboxes are unchecked. Close CB.
- Open the first project by double-clicking the .cbp project file from whatever shell (I use Total Commander).
   The project and all its open files show up in CB.
   (BTW, it doesn't make a difference if you open the first instance directly or indirectly.)
- Open the second project by double-clicking its .cbp project file.
   The second project and all its open files come up in the same instance of CB.
   It should however open a second instance of CB.

With "messing it up" I mean: when the second project is opened in the same instance, all of its open files are also opened. However, in the tab row there is no way to distinguish between the files of either project. Say, I am working on two independent projects simultaneously (since they communicate with each other, for example), and both of them have files of the same name (say, main.h, main.c, pindef.h etc. pp.). Now all these equally named, but completely different files of two projects (that reside in completely different paths as well) appear side by side in the tabs as if they'd belong to one single project. That truly is a mess.

I don't speak for multiple tab rows. I wanted to emphasize "all files of all projects". If more than one project is opened in a single CB instance, it should always show only the files belonging to the currently selected project. Never all files of all projects, several of them equally named.

Tilmann

Offline BlueHazzard

  • Developer
  • Lives here!
  • *****
  • Posts: 3353
Re: [SOLVED]Multiple instances, ver 16.0.1. Is this feature operative?
« Reply #12 on: October 27, 2016, 11:31:03 pm »
Now we are getting somewhere. Funnily i have unchecked this option all the time, and funnily i never noticed  that it opens the project in the same instance... Here you can say i never saw the wood because of the trees :D

i will try to look into it...

I don't speak for multiple tab rows. I wanted to emphasize "all files of all projects". If more than one project is opened in a single CB instance, it should always show only the files belonging to the currently selected project. Never all files of all projects, several of them equally named.
This would be a interesting feature... Can you post it on SF so it wont get lost?

Offline Jenna

  • Administrator
  • Lives here!
  • *****
  • Posts: 7255
Re: [SOLVED]Multiple instances, ver 16.0.1. Is this feature operative?
« Reply #13 on: October 27, 2016, 11:53:10 pm »
Now we are getting somewhere. Funnily i have unchecked this option all the time, and funnily i never noticed  that it opens the project in the same instance... Here you can say i never saw the wood because of the trees :D

i will try to look into it...

I just tested it here on Fedora with the actual trunk and it works as expected (two instances of C::B).

I don't speak for multiple tab rows. I wanted to emphasize "all files of all projects". If more than one project is opened in a single CB instance, it should always show only the files belonging to the currently selected project. Never all files of all projects, several of them equally named.
This would be a interesting feature... Can you post it on SF so it wont get lost?

I like to have files from different projects in one workspace open side by side.
Such an option should be configurable and off as default, so the current behaviour does not change.

Offline BlueHazzard

  • Developer
  • Lives here!
  • *****
  • Posts: 3353
Re: [SOLVED]Multiple instances, ver 16.0.1. Is this feature operative?
« Reply #14 on: October 28, 2016, 12:19:06 am »
The only culprit line i can think of is this:
src\app.cpp:629
Code
if (m_DDE && !m_Batch && Manager::Get()->GetConfigManager(_T("app"))->ReadBool(_T("/environment/use_ipc"), true))
but why should this fail in msw?

has someone an idea how to debug this?