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

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13438
    • Travis build status
Re: [SOLVED]Multiple instances, ver 16.0.1. Is this feature operative?
« Reply #15 on: October 28, 2016, 12:48:52 am »
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.

I don't see this as good idea. Nor I see how this is useful? If you have two projects in the workspace you'll for sure want to edit files from both projects at the same time. This is how I do it all the time. If I want to find which is the project or where the files is on the hard disk I'm using the tooltip in the notebook.

p.s. for single row tabs it is a limitation in our tab/notebook control we're using, so even if we wanted to add it, we can't without massive modifications to this control.
p.p.s. probably we could try assigning different colors to different projects and use those for the tabs, but this will require some non-portable tab drawing, which I'm not sure we want to do. Probably we could draw some icons...
p.p.p.s another options is to print the name of the project before the filename. Something like project1:main.cpp.
(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 tilmannreh

  • Multiple posting newcomer
  • *
  • Posts: 17
Re: [SOLVED]Multiple instances, ver 16.0.1. Is this feature operative?
« Reply #16 on: October 28, 2016, 08:15:19 am »
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.

OK, making this configurable surely is a good idea.
Do we still need to post this suggestion elsewhere, or did you already note it on some improvement suggestion list?

Thanks, Tilmann

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13438
    • Travis build status
Re: [SOLVED]Multiple instances, ver 16.0.1. Is this feature operative?
« Reply #17 on: October 28, 2016, 09:11:34 am »
Do we still need to post this suggestion elsewhere, or did you already note it on some improvement suggestion list?

It is only in the forum at the moment of time. To make it a feature request you need to post it on the tracker on the sf.net page. But then you'll have to find someone willing to implement it.
(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 tilmannreh

  • Multiple posting newcomer
  • *
  • Posts: 17
Re: [SOLVED]Multiple instances, ver 16.0.1. Is this feature operative?
« Reply #18 on: October 29, 2016, 10:22:47 am »
It's not too important for me right now.

I would rather see the bug fixed so that clicking on two project files allows me to open two instances...
Then, at least for me, there's no need to change handling of multiple projects in the same workspace since I don't use it.

Offline BlueHazzard

  • Developer
  • Lives here!
  • *****
  • Posts: 3021
Re: [SOLVED]Multiple instances, ver 16.0.1. Is this feature operative?
« Reply #19 on: October 30, 2016, 01:35:53 pm »
i tried to debug this, but was not successful on windows...

Something else:
Code
#ifdef __WXMSW__
            m_DDE = !parser.Found(_T("no-dde"));
            m_Assocs = !parser.Found(_T("no-check-associations"));
#else
            m_DDE = !parser.Found(_T("no-ipc"));
#endif
isn't this confusing? On windows the command line parameter is "no-dde" and on unix "no-ipc"... Shouldn't this be interchangeable?

Offline BlueHazzard

  • Developer
  • Lives here!
  • *****
  • Posts: 3021
Re: [SOLVED]Multiple instances, ver 16.0.1. Is this feature operative?
« Reply #20 on: October 30, 2016, 03:00:59 pm »
Ok after more testing i came to the following result:
1) After some code analysis i could not find any bug
2) I tried different approaches to debug this and i was not successful to reproduce the bug
3) After checking what .exe files are started by double clicking from the explorer i noticed that it started some old codeblocks version
4) I deleted all registry items that where related with opening codeblocks from the explorer and now all is working as expected. All the settings work as intended

TL;DR: Codeblocks works fine, no bugs related to DDE. Windows was messing up (but i don't know how and why)

Offline stahta01

  • Lives here!
  • ****
  • Posts: 7190
    • My Best Post
Re: [SOLVED]Multiple instances, ver 16.0.1. Is this feature operative?
« Reply #21 on: October 30, 2016, 05:44:09 pm »
Ok after more testing i came to the following result:
1) After some code analysis i could not find any bug
2) I tried different approaches to debug this and i was not successful to reproduce the bug
3) After checking what .exe files are started by double clicking from the explorer i noticed that it started some old codeblocks version
4) I deleted all registry items that where related with opening codeblocks from the explorer and now all is working as expected. All the settings work as intended

TL;DR: Codeblocks works fine, no bugs related to DDE. Windows was messing up (but i don't know how and why)

Problem is likely in the CB Installer from what you described.
IIRC, both 8.02 and 10.?? installers did more registry stuff in Windows; likely if you had either installed you would have gotten weird issues like this.

I will try installing the current stable release and a nightly to see if the problem happens.
Then, if it fails to happen will install multiple CB stable releases and see if I see it.

Be a few days/weeks before I start; still working on a CB coding change in CompilerFactory.

Tim S.
 
C Programmer working to learn more about C++ and Git.
On Windows 7 64 bit and Windows 10 32 bit.
On Debian Stretch, compiling CB Trunk against wxWidgets 3.0.
--
When in doubt, read the CB WiKi FAQ. http://wiki.codeblocks.org

Offline tilmannreh

  • Multiple posting newcomer
  • *
  • Posts: 17
Re: [SOLVED]Multiple instances, ver 16.0.1. Is this feature operative?
« Reply #22 on: October 30, 2016, 07:24:36 pm »
Problem is likely in the CB Installer from what you described.
IIRC, both 8.02 and 10.?? installers did more registry stuff in Windows; likely if you had either installed you would have gotten weird issues like this.

This is interesting. Indeed, I was using 8.02 and 10.05 before.
I will test with a fresh install of the current version and then report if the problem is reproducible.

Offline tilmannreh

  • Multiple posting newcomer
  • *
  • Posts: 17
Re: [SOLVED]Multiple instances, ver 16.0.1. Is this feature operative?
« Reply #23 on: November 11, 2016, 12:32:50 pm »
Hello again, and sorry for the delay. Other really urgent work got in the way...

Meanwhile, I did a fresh install (CB 16.0.1) on another W7Pro computer. The bug is reproducible there as well, CB never opens a second instance when another project is opened by double-click on the .cbp file.

However, at a W8.1 laptop I uninstalled CB, then cleaned the registry from all CB related entries, and did a fresh new install of CB 16.0.1 as well. Interestingly, here a second instance is opened if I do exactly the above.

This is really weird.  :-\

Offline tilmannreh

  • Multiple posting newcomer
  • *
  • Posts: 17
Re: [SOLVED]Multiple instances, ver 16.0.1. Is this feature operative?
« Reply #24 on: November 14, 2016, 10:26:07 pm »
Hello once more...

I found out that somewhere in the W8.1 system there were residues from the previous CB installation(s). So I uninstalled it again, and then manually deleted *every* entry in the registry and *all* folders and files below C:\Users that contained anything about CB.

After having done a fresh installation of CB 16.0.1 on that W8.1 laptop again, it behaves exactly like the fresh installation on the W7Pro computer before (with the bug being persistant).

So in fact there is no difference between these two Windows versions, and the bug appears perfectly reproducible to me. Opening a second project by just double-clicking the .cbp file in a shell like Total Commander does *not* open a second instance of CB even though this should happen according to the settings.

On the other hand, the W8.1 laptop with the "uncomplete" deinstallation before CB installation didn't show that buggy behaviour - so it appears to be somehow related to data in the registry and/or the "Users" files in Windows indeed. This also explains why this bug obviously doesn't show in Linux.

If there's anything I could test for further analysis, let me know.
« Last Edit: November 15, 2016, 02:37:27 pm by tilmannreh »

Offline stahta01

  • Lives here!
  • ****
  • Posts: 7190
    • My Best Post
Re: [SOLVED]Multiple instances, ver 16.0.1. Is this feature operative?
« Reply #25 on: November 15, 2016, 01:43:28 am »
My guess it is related to the ddeexec and the entries under it in HKEY_CURRENT_USER\Software\Classes\CodeBlocks.cbp.

Code
HKEY_CURRENT_USER\Software\Classes\CodeBlocks.cbp\shell\open\ddeexec

When, I deleted the ddeexec; then the CB open a second instance when I opened a cbp file.

But, my computer is Windows 10 32 bit and I have a weird CB setup history.

Likely the fix is editing associations.cpp file; but, it should be some who knows DDE.

Tim S.

« Last Edit: November 15, 2016, 01:45:05 am by stahta01 »
C Programmer working to learn more about C++ and Git.
On Windows 7 64 bit and Windows 10 32 bit.
On Debian Stretch, compiling CB Trunk against wxWidgets 3.0.
--
When in doubt, read the CB WiKi FAQ. http://wiki.codeblocks.org

Offline Miguel Gimenez

  • Developer
  • Lives here!
  • *****
  • Posts: 826
Re: [SOLVED]Multiple instances, ver 16.0.1. Is this feature operative?
« Reply #26 on: July 08, 2021, 05:29:15 pm »
UPDATE: this is fixed in r12309 (2021-03-19)

Offline stahta01

  • Lives here!
  • ****
  • Posts: 7190
    • My Best Post
Re: [SOLVED]Multiple instances, ver 16.0.1. Is this feature operative?
« Reply #27 on: July 08, 2021, 05:44:32 pm »
Wow, my guess was completely right in this case and I have no memory of ever making the guess.

Tim S.
C Programmer working to learn more about C++ and Git.
On Windows 7 64 bit and Windows 10 32 bit.
On Debian Stretch, compiling CB Trunk against wxWidgets 3.0.
--
When in doubt, read the CB WiKi FAQ. http://wiki.codeblocks.org