Author Topic: "Show close on all tabs" bug. Causes many crashes.  (Read 9319 times)

Offline ptDev

  • Almost regular
  • **
  • Posts: 222
"Show close on all tabs" bug. Causes many crashes.
« on: April 16, 2010, 03:06:58 pm »
I just submitted this bug (017097) to berlios.

Quote
Summary:
Manager panel incorrect behaviour

Details
Once the recently added option "Show close on all tabs" from the "Notebook Appearance" settings is checked, the project manager panel also obeys to this setting, and the user may close either of the "Projects",  "Symbols" or the "Resources" tab.

Not only is this behaviour incorrect, since there is no way to bring them back once closed, nor does the application expect this to ever happen, but Code::Blocks can easily crash whenever an event that would update any of the missing tabs is triggered.

The option should explicitly exclude the Manager tabs. Or any core plugin essential tabs, for that matter.

Confirmed under Windows, with svn revision 6202, built using wxWidgets 2.8.10 and MinGW-TDM 4.4.1-2.

Workaround: Uncheck "Show close on all tabs".

How to reproduce a crash:

1) Start C::B with the mentioned "Show close on all tabs" option turned on.
2) Close the "Projects" tab. Open a recently opened project. C::B will crash.
OR
2) Close any Manager tab. Close C::B. It will crash on shutdown.

I think it's very noticeable, but probably simple to fix. (I just don't have the time to look into the source right now, sorry).

Offline Jenna

  • Administrator
  • Lives here!
  • *****
  • Posts: 7255
Re: "Show close on all tabs" bug. Causes many crashes.
« Reply #1 on: April 16, 2010, 07:40:10 pm »
Confirmed !

And fixed in my working copy.

@ the other devs:
what do you think about a close button on the message tabs, that toggles the appropriate button, and the possibility to "close" (toggle) the message tabs by mosue-middle-click ?
I also have a patch for this in my working copy, that could (should?) be applied before the release.

Offline MortenMacFly

  • Administrator
  • Lives here!
  • *****
  • Posts: 9694
Re: "Show close on all tabs" bug. Causes many crashes.
« Reply #2 on: April 17, 2010, 09:50:30 pm »
what do you think about a close button on the message tabs, that toggles the appropriate button, and the possibility to "close" (toggle) the message tabs by mosue-middle-click ?
It's very helpful if you don't have many tabs. In addition you are very used to it if you are a firefox user.
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 Jenna

  • Administrator
  • Lives here!
  • *****
  • Posts: 7255
Re: "Show close on all tabs" bug. Causes many crashes.
« Reply #3 on: April 18, 2010, 12:39:19 pm »
This bug should be fixed before the release, that's obviously.

My question is, should I also change (fix) the behaviour of "closing" tabs in the message-pane ?
The problem here is, that "closed" (better hidden) tabs, will reappear at any new start of C::B, because their state is not saved, and that might lead to "bug-reports" about not saved state of tabs in message-pane.
And saving it would need some more changes and should be tested for a longer time, while just toggling the tabs, as I do in my patch, only uses the toggle-mechanism, that is known to work.

I attach a patch, that fixes the bug and changes the "close_tabs_in_message_pane"-behaviour.

The bugfix is the part in void MainFrame::DoUpdateEditorStyle(cbAuiNotebook* target, const wxString& prefix, long defaultStyle) and the call of this function for the editor-notebook. The part for the message-notebook is part of the changed behaviour for the infopane's (as well as all changes to infopane.*).

I personally would like to attach it before the release (even if we are in a feature-freeze), because it's something between a bug-fix and new feature.

[attachment deleted by admin]
« Last Edit: April 19, 2010, 06:21:32 am by jens »

Offline MortenMacFly

  • Administrator
  • Lives here!
  • *****
  • Posts: 9694
Re: "Show close on all tabs" bug. Causes many crashes.
« Reply #4 on: April 18, 2010, 04:01:45 pm »
I personally would like to attach it before the release (even if we are in a feature-freeze), because it's something between a bug-fix and new feature.
It's definitely a bugfix for the management panes, so you'd have my OK. I'll apply it in my local copy but from what I see it should just work.
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 Jenna

  • Administrator
  • Lives here!
  • *****
  • Posts: 7255
Re: "Show close on all tabs" bug. Causes many crashes.
« Reply #5 on: April 20, 2010, 01:46:56 pm »
I personally would like to attach it before the release (even if we are in a feature-freeze), because it's something between a bug-fix and new feature.
It's definitely a bugfix for the management panes, so you'd have my OK. I'll apply it in my local copy but from what I see it should just work.

If there are no objections, I will commit it friday or this weekend.

Offline MortenMacFly

  • Administrator
  • Lives here!
  • *****
  • Posts: 9694
Re: "Show close on all tabs" bug. Causes many crashes.
« Reply #6 on: April 20, 2010, 04:14:03 pm »
If there are no objections, I will commit it friday or this weekend.
I am heavily overloaded atm, so I didn't have time to try yet... but I'll report if I did until Friday.
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 Jenna

  • Administrator
  • Lives here!
  • *****
  • Posts: 7255
Re: "Show close on all tabs" bug. Causes many crashes.
« Reply #7 on: April 20, 2010, 05:30:26 pm »
If there are no objections, I will commit it friday or this weekend.
I am heavily overloaded atm, so I didn't have time to try yet... but I'll report if I did until Friday.

If anybody else has tested it, please post if there are any problems !

Offline Jenna

  • Administrator
  • Lives here!
  • *****
  • Posts: 7255
Re: "Show close on all tabs" bug. Causes many crashes.
« Reply #8 on: May 01, 2010, 10:46:17 am »
Should be fixed in trunk (svn r6206).