Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Crash when I close a tab #34785

Closed
errodriguez opened this issue Dec 8, 2023 · 6 comments · Fixed by brave/brave-core#21326
Closed

Crash when I close a tab #34785

errodriguez opened this issue Dec 8, 2023 · 6 comments · Fixed by brave/brave-core#21326
Assignees
Labels
crash OS/macOS priority/P2 A bad problem. We might uplift this to the next planned release. QA/No release-notes/exclude

Comments

@errodriguez
Copy link

IMPORTANT: Your crash has already been automatically reported to our crash system. Please file this bug only if you can provide more information about it.

Brave Version: 1.61.101 Chromium: 120.0.6099.71
Operating System: Mac OS X 14.1.2

URL (if applicable) where crash occurred: NA

Can you reproduce this crash?

Yes. It happens either when I restore my tabs or not. No pattern or something special... it just happens when I close any tab.

What steps will reproduce this crash? (If it's not reproducible, what were you doing just before the crash?)

  1. Launch browser.
  2. Open any page in a new tab.
  3. Close the page.
  4. Browser crashes.

DO NOT CHANGE BELOW THIS LINE
Crash ID: crash/af320100-8bde-260b-0000-000000000000

@errodriguez
Copy link
Author

It happens when you try to open a new tab after closing a previous one.

@errodriguez
Copy link
Author

And... it looks like it only happens if you close the tab using the contextual menu.

@rebron rebron added crash priority/P2 A bad problem. We might uplift this to the next planned release. labels Dec 8, 2023
@rebron rebron added the OS/macOS label Dec 8, 2023
@rebron
Copy link
Collaborator

rebron commented Dec 8, 2023

@errodriguez Do you have the Dark Reader mode extension? Thanks for sending the crash report.

@errodriguez
Copy link
Author

errodriguez commented Dec 8, 2023

No, I don't have that extension. I do have other ones. I installed them some time ago.

@atuchin-m
Copy link
Contributor

The same callstack as in #34783

[ 00 ] TabStripModel::IsTabSelected(int) const ( immediate_crash.h:146 )
[ 01 ] TabStripModel::GetIndicesForCommand(int) const ( tab_strip_model.cc:1786 )
[ 02 ] BraveTabContextMenuContents::IsBraveCommandIdEnabled(int) const ( brave_tab_strip_model.cc:83 )
[ 03 ] BraveTabContextMenuContents::IsCommandIdEnabled(int) const ( brave_tab_context_menu_contents.cc:76 )
[ 04 ] ui::SimpleMenuModel::IsEnabledAt(unsigned long) const ( simple_menu_model.cc:474 )
[ 05 ] -[MenuControllerCocoa validateUserInterfaceItem:] ( menu_controller.mm:313 )
[ 06 ] -[MenuControllerCocoa validateUserInterfaceItem:] ( menu_controller.mm:313 )
[ 07 ] 0x18d02c594
[ 08 ] 0x18d02c080
[ 09 ] 0x18d6bc858
[ 10 ] 0x18d543810
[ 11 ] 0x18d468674
[ 12 ] 0x18d46bee8
[ 13 ] 0x18cf4568c
[ 14 ] 0x18cf44e14
[ 15 ] 0x18d1678f0
[ 16 ] __67-[MenuControllerCocoaDelegateImpl controllerWillAddMenu:fromModel:]_block_invoke ( menu_controller_cocoa_delegate_impl.mm:242 )
[ 17 ] 0x1896e2808
[ 18 ] 0x1897768e8
[ 19 ] 0x189776830
[ 20 ] 0x1896b1488
[ 21 ] 0x18a7a302c
[ 22 ] 0x18cfc90b8
[ 23 ] 0x18d968b2c
[ 24 ] -[NativeWidgetMacNSWindow orderWindow:relativeTo:] ( native_widget_mac_nswindow.mm:504 )
[ 25 ] 0x18d9746b0
[ 26 ] 0x18d08e248
[ 27 ] 0x18cf08aac
[ 28 ] 0x18d08d6c8
[ 29 ] -[NativeWidgetMacNSWindow addChildWindow:ordered:] ( native_widget_mac_nswindow.mm:237 )
[ 30 ] remote_cocoa::NativeWidgetNSWindowBridge::OrderChildren() ( native_widget_ns_window_bridge.mm:1663 )
[ 31 ] remote_cocoa::NativeWidgetNSWindowBridge::SetVisibilityState(remote_cocoa::mojom::WindowVisibilityState) ( native_widget_ns_window_bridge.mm:800 )
[ 32 ] views::NativeWidgetMac::Show(ui::WindowShowState, gfx::Rect const&) ( native_widget_mac.mm:614 )
[ 33 ] views::Widget::Show() ( widget.cc:0 )
[ 34 ] views::WidgetFadeAnimator::FadeIn() ( widget_fade_animator.cc:30 )
[ 35 ] base::sequence_manager::internal::ThreadControllerWithMessagePumpImpl::DoWorkImpl(base::LazyNow*) ( callback.h:154 )
[ 36 ] base::sequence_manager::internal::ThreadControllerWithMessagePumpImpl::DoWork() ( thread_controller_with_message_pump_impl.cc:326 )
[ 37 ] non-virtual thunk to base::sequence_manager::internal::ThreadControllerWithMessagePumpImpl::DoWork() ( thread_controller_with_message_pump_impl.cc:0 )
[ 38 ] base::sequence_manager::internal::ThreadControllerWithMessagePumpImpl::DoWorkImpl(base::LazyNow*) ( callback.h:154 )
[ 39 ] base::sequence_manager::internal::ThreadControllerWithMessagePumpImpl::DoWork() ( thread_controller_with_message_pump_impl.cc:326 )
[ 40 ] non-virtual thunk to base::sequence_manager::internal::ThreadControllerWithMessagePumpImpl::DoWork() ( thread_controller_with_message_pump_impl.cc:0 )
[ 41 ] base::MessagePumpCFRunLoopBase::RunWork() ( message_pump_apple.mm:444 )
[ 42 ] base::apple::CallWithEHFrame(void () block_pointer)

@errodriguez
Copy link
Author

And... it looks like it is time-dependent; if you close one tab and immediately switch to another, the browser will collapse. I've been waiting two or three seconds before closing or moving to another tab, and no crashes until now.

@simonhong simonhong self-assigned this Dec 11, 2023
simonhong added a commit to brave/brave-core that referenced this issue Dec 11, 2023
fix brave/brave-browser#34785

Crash happened at TabStripModel::IsTabSelected().
Maybe this method was called after tab is closed already.
If target tab is not included in tab strip model,
this method should not be called with that tab.
@brave-builds brave-builds added this to the 1.63.x - Nightly milestone Dec 12, 2023
This was referenced Dec 12, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
crash OS/macOS priority/P2 A bad problem. We might uplift this to the next planned release. QA/No release-notes/exclude
Projects
Status: Done
Development

Successfully merging a pull request may close this issue.

5 participants