News:

The new Release 25.03 is out! You can download binaries for Windows and many major Linux distros here .

Main Menu

[SOLVED]Multiple instances, ver 16.0.1. Is this feature operative?

Started by Aaron, August 05, 2016, 02:59:41 PM

Previous topic - Next topic

Aaron

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.

MortenMacFly

Compiler logging: Settings->Compiler & Debugger->tab "Other"->Compiler logging="Full command line"
C::B Manual: [url="https://www.codeblocks.org/docs/main_codeblocks_en.html"]https://www.codeblocks.org/docs/main_codeblocks_en.html[/url]
C::B FAQ: [url="https://wiki.codeblocks.org/index.php?title=FAQ"]https://wiki.codeblocks.org/index.php?title=FAQ[/url]

Aaron

Thanks Morten

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

Running Win 7 Pro, SP 1.

BlueHazzard

works for me to.. win 7 sp1

can you restart your pc and try again?

Aaron


oBFusCATed

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!]

Aaron

QuoteHave you tried to disable the "use already running instance if possible"?

YES, and it worked Great!!

Thank you.

tilmannreh

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

BlueHazzard

What operating system are you using?

YEAAA  1000 posts

tilmannreh

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

BlueHazzard

i can't reproduce this on win7 with latest trunk

can you give me a step by step guide?

Quote from: tilmannreh on October 27, 2016, 08:33:28 AM
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)

Quote from: tilmannreh on October 27, 2016, 08:33:28 AM
(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...

tilmannreh

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

BlueHazzard

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...

Quote from: tilmannreh on October 27, 2016, 10:03:32 PM
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?

Jenna

Quote from: BlueHazzard 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 just tested it here on Fedora with the actual trunk and it works as expected (two instances of C::B).

Quote from: BlueHazzard on October 27, 2016, 11:31:03 PM
Quote from: tilmannreh on October 27, 2016, 10:03:32 PM
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.

BlueHazzard

The only culprit line i can think of is this:
src\app.cpp:629

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?