Developer forums (C::B DEVELOPMENT STRICTLY!) > Development

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

(1/2) > >>

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.

--- End quote ---

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 ?

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

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.

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

Navigation

[0] Message Index

[#] Next page

Go to full version