News:

When registered with our forums, feel free to send a "here I am" post here to differ human beings from SPAM bots.

Main Menu

"Show close on all tabs" bug. Causes many crashes.

Started by ptDev, April 16, 2010, 03:06:58 PM

Previous topic - Next topic

ptDev

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

Jenna

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.

MortenMacFly

Quote from: jens on April 16, 2010, 07:40:10 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: [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]

Jenna

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]

MortenMacFly

Quote from: jens on April 18, 2010, 12:39:19 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: [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]

Jenna

Quote from: MortenMacFly on April 18, 2010, 04:01:45 PM
Quote from: jens on April 18, 2010, 12:39:19 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.

MortenMacFly

Quote from: jens on April 20, 2010, 01:46:56 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: [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]

Jenna

Quote from: MortenMacFly on April 20, 2010, 04:14:03 PM
Quote from: jens on April 20, 2010, 01:46:56 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 !

Jenna