New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 591933 link

Starred by 0 users

Issue metadata

Status: Verified
Owner:
Closed: Mar 2016
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Linux , Windows , Chrome
Pri: 1
Type: Bug-Regression



Sign in to add a comment

Regression: Browser crashes on clicking scrollbar in 'Edit bookmark' overlay.

Reported by vvishwak...@etouch.net, Mar 4 2016

Issue description

Version: 50.0.2661.14 (Official Build) c6bd6394a1dce112a7cff87339494d6850b0dfd7-refs/branch-heads/2661@{#74} (32/64-bit)
OS: Linux, Windows (Win 7-Aero enabled)

What steps will reproduce the problem?
1) Launch chrome, show bookmarks bar using 'Ctrl+Shift+B'.
2) Right click on Bookmarks bar, click on 'Add folder', rename the folder with some long name and 'Save'.
3) Right click on Bookmarks bar, select 'Add file' option, & expand Bookmarks bar option.  
4) Click on the vertical scrollbar 4-5 times and observe.

Browser crashes on clicking scrollbar.

Browser should not crash on clicking scrollbar.

This is a Regression issue broken in M-50, below is the bisect info

Manual bisect:
Good build: 50.0.2654.0 
Bad build: 50.0.2655.0 

Crash ID:
Crash ID 0c079ff000000000 (Chrome)
Crash ID 1b4a3d9800000000 (dfe2f829-0ac8-459a-9c3e-b690eb2a8c58)

Narrow bisect URL:
https://chromium.googlesource.com/chromium/src/+log/3c8f3ebf3736574766e042f76f265e5793ef3e51..5def0de596a472b50c5bfb99ec218c36241e4631?pretty=fuller&n=100

Suspecting: r376199

Note: Issue is not seen on Mac OS.

 
bookmarks_actual.mp4
1.3 MB Download
bookmarks_expected.mp4
570 KB Download
Labels: ReleaseBlock-Stable
Stack trace for the crash ID generated:

 CRASHED [EXCEPTION_INT_DIVIDE_BY_ZERO @ 0x000007fedb246022 ] MAGIC SIGNATURE THREAD
0x000007fedb246022	(chrome.dll -base_scroll_bar.cc:512 )	views::BaseScrollBar::CalculateContentsOffset(int,bool)
0x000007fedb246945	(chrome.dll -base_scroll_bar.cc:94 )	views::BaseScrollBar::ScrollToThumbPosition(int,bool)
0x000007fedb247188	(chrome.dll -base_scroll_bar_thumb.cc:96 )	views::BaseScrollBarThumb::OnMouseDragged(ui::MouseEvent const &)
0x000007fedb214cc8	(chrome.dll -view.cc:2239 )	views::View::ProcessMouseDragged(ui::MouseEvent const &)
0x000007fedb21430b	(chrome.dll -view.cc:1020 )	views::View::OnMouseEvent(ui::MouseEvent *)
0x000007fedb5d664c	(chrome.dll -event_handler.cc:29 )	ui::EventHandler::OnEvent(ui::Event *)
0x000007fedb5d6d38	(chrome.dll -event_dispatcher.cc:191 )	ui::EventDispatcher::DispatchEvent(ui::EventHandler *,ui::Event *)
0x000007fedb5d7195	(chrome.dll -event_dispatcher.cc:139 )	ui::EventDispatcher::ProcessEvent(ui::EventTarget *,ui::Event *)
0x000007fedb5d7021	(chrome.dll -event_dispatcher.cc:86 )	ui::EventDispatcherDelegate::DispatchEventToTarget(ui::EventTarget *,ui::Event *)
0x000007fedb5d6de1	(chrome.dll -event_dispatcher.cc:58 )	ui::EventDispatcherDelegate::DispatchEvent(ui::EventTarget *,ui::Event *)
0x000007fedb22ac10	(chrome.dll -root_view.cc:428 )	views::internal::RootView::OnMouseDragged(ui::MouseEvent const &)
0x000007fedb21f9df	(chrome.dll -widget.cc:1229 )	views::Widget::OnMouseEvent(ui::MouseEvent *)
0x000007fedb5d664c	(chrome.dll -event_handler.cc:29 )	ui::EventHandler::OnEvent(ui::Event *)
0x000007fedb5d6d38	(chrome.dll -event_dispatcher.cc:191 )	ui::EventDispatcher::DispatchEvent(ui::EventHandler *,ui::Event *)
0x000007fedb5d7195	(chrome.dll -event_dispatcher.cc:139 )	ui::EventDispatcher::ProcessEvent(ui::EventTarget *,ui::Event *)
0x000007fedb5d7021	(chrome.dll -event_dispatcher.cc:86 )	ui::EventDispatcherDelegate::DispatchEventToTarget(ui::EventTarget *,ui::Event *)
0x000007fedb5d6de1	(chrome.dll -event_dispatcher.cc:58 )	ui::EventDispatcherDelegate::DispatchEvent(ui::EventTarget *,ui::Event *)
0x000007fedb5d72eb	(chrome.dll -event_processor.cc:35 )	ui::EventProcessor::OnEventFromSource(ui::Event *)
0x000007fedb5d6980	(chrome.dll -event_source.cc:73 )	ui::EventSource::DeliverEventToProcessor(ui::Event *)
0x000007fedb5d6a6e	(chrome.dll -event_source.cc:51 )	ui::EventSource::SendEventToProcessor(ui::Event *)
0x000007fedb233874	(chrome.dll -desktop_window_tree_host_win.cc:811 )	views::DesktopWindowTreeHostWin::HandleMouseEvent(ui::MouseEvent const &)
0x000007fedb23ed72	(chrome.dll -hwnd_message_handler.cc:2428 )	views::HWNDMessageHandler::HandleMouseEventInternal(unsigned int,unsigned __int64,__int64,bool)
0x000007fedb242ce7	(chrome.dll -hwnd_message_handler.h:316 )	views::HWNDMessageHandler::_ProcessWindowMessage(HWND__ *,unsigned int,unsigned __int64,__int64,__int64 &,unsigned long)
0x000007fedb2419e7	(chrome.dll -hwnd_message_handler.cc:897 )	views::HWNDMessageHandler::OnWndProc(unsigned int,unsigned __int64,__int64)
0x000007fedb5f0305	(chrome.dll -window_impl.cc:302 )	gfx::WindowImpl::WndProc(HWND__ *,unsigned int,unsigned __int64,__int64)
0x000007fedb5efaca	(chrome.dll -wrapped_window_proc.h:76 )	base::win::WrappedWindowProc<&gfx::WindowImpl::WndProc(HWND__ *,unsigned int,unsigned __int64,__int64)>(HWND__ *,unsigned int,unsigned __int64,__int64)
0x76c69bd0	(USER32.dll + 0x00019bd0 )	UserCallWinProcCheckWow
0x76c698d9	(USER32.dll + 0x000198d9 )	DispatchMessageWorker
0x000007feda8d1b64	(chrome.dll -message_pump_win.cc:367 )	base::MessagePumpForUI::ProcessMessageHelper(tagMSG const &)
0x000007feda8d1751	(chrome.dll -message_pump_win.cc:164 )	base::MessagePumpForUI::DoRunLoop()
0x000007feda8d13f1	(chrome.dll -message_pump_win.cc:50 )	base::MessagePumpWin::Run(base::MessagePump::Delegate *)
0x000007feda8bda42	(chrome.dll -run_loop.cc:35 )	base::RunLoop::Run()
0x000007fedb17a787	(chrome.dll -chrome_browser_main.cc:1809 )	ChromeBrowserMainParts::MainMessageLoopRun(int *)
0x000007fedb95b967	(chrome.dll -browser_main_loop.cc:950 )	content::BrowserMainLoop::RunMainMessageLoopParts()
0x000007fedb957912	(chrome.dll -browser_main_runner.cc:152 )	content::BrowserMainRunnerImpl::Run()
0x000007fedb9002e0	(chrome.dll -browser_main.cc:44 )	content::BrowserMain(content::MainFunctionParams const &)
0x000007fedb2102b5	(chrome.dll -content_main_runner.cc:395 )	content::RunNamedProcessTypeMain(std::basic_string<char,std::char_traits<char>,std::allocator<char> > const &,content::MainFunctionParams const &,content::ContentMainDelegate *)
0x000007fedb2100f2	(chrome.dll -content_main_runner.cc:764 )	content::ContentMainRunnerImpl::Run()
0x000007fedb20d5d8	(chrome.dll -content_main.cc:19 )	content::ContentMain(content::ContentMainParams const &)
0x000007fedb1017dd	(chrome.dll -chrome_main.cc:84 )	ChromeMain
0x000000013ffb0f6e	(chrome.exe -main_dll_loader_win.cc:183 )	MainDllLoader::Launch(HINSTANCE__ *)
0x000000013ffb01af	(chrome.exe -chrome_exe_main_win.cc:230 )	wWinMain
0x000000013ffee297	(chrome.exe -crt0.c:251 )	__tmainCRTStartup
0x76ec59cc	(kernel32.dll + 0x000159cc )	BaseThreadInitThunk
0x76ffb980	(ntdll.dll + 0x0002b980 )	RtlUserThreadStart

Ading release block label, please undo if not the case.
Labels: Stability-Crash hasTestcase
When you create a long bookmark name it forces the horizontal scroll bar to be shown. This forces display of the vertical scroll bar as well but since there's no vertical scrolling necessary the thumb is the entire length of the track. My new logic from r376199 computes the distance the thumb can move by subtracting its size from the total size of the track. Since these are equal in this case it gets 0 and divides by it to determine the scroll distance in the content pane. This can be special cased in the code. I also notice that another division by zero is possible if content_size_ == viewport_size_ in the function above.

I'll take a look at this tomorrow and add tests to cover these edge cases.
Status: Started (was: Assigned)
Fix out for review: https://codereview.chromium.org/1769553003/
Project Member

Comment 5 by bugdroid1@chromium.org, Mar 5 2016

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/5c6639a0a0b75d2696f6b3c9a5a47c8dc6096df8

commit 5c6639a0a0b75d2696f6b3c9a5a47c8dc6096df8
Author: reillyg <reillyg@chromium.org>
Date: Sat Mar 05 02:23:36 2016

Guard against division by zero for useless scroll bars.

This patch adds protection against division by zero when a scroll bar's
thumb is the full size of the track (i.e. the scroll bar is useless).

BUG= 591933 

Review URL: https://codereview.chromium.org/1769553003

Cr-Commit-Position: refs/heads/master@{#379437}

[modify] https://crrev.com/5c6639a0a0b75d2696f6b3c9a5a47c8dc6096df8/ui/views/controls/scrollbar/base_scroll_bar.cc
[modify] https://crrev.com/5c6639a0a0b75d2696f6b3c9a5a47c8dc6096df8/ui/views/controls/scrollbar/base_scroll_bar.h
[modify] https://crrev.com/5c6639a0a0b75d2696f6b3c9a5a47c8dc6096df8/ui/views/controls/scrollbar/scrollbar_unittest.cc

Labels: Merge-Request-50 OS-Chrome
Status: Fixed (was: Started)

Comment 7 by tin...@google.com, Mar 6 2016

Labels: -Merge-Request-50 Merge-Approved-50 Hotlist-Merge-Approved
Your change meets the bar and is auto-approved for M50 (branch: 2661)
Merge out for review: https://codereview.chromium.org/1772023002
If possible, please try to merge your change to M50 branch 2661 before 5:00 PM PST today to catch up with M50 Dev candidate cut @ 5:00 PM today.
Project Member

Comment 10 by bugdroid1@chromium.org, Mar 7 2016

Labels: -merge-approved-50 merge-merged-2661
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/87686973fe8171dfbc515c81e50b9602b9a8cf12

commit 87686973fe8171dfbc515c81e50b9602b9a8cf12
Author: Reilly Grant <reillyg@chromium.org>
Date: Mon Mar 07 23:55:57 2016

Guard against division by zero for useless scroll bars.

This patch adds protection against division by zero when a scroll bar's
thumb is the full size of the track (i.e. the scroll bar is useless).

BUG= 591933 

Review URL: https://codereview.chromium.org/1769553003

Cr-Commit-Position: refs/heads/master@{#379437}

(cherry-picked from commit 5c6639a0a0b75d2696f6b3c9a5a47c8dc6096df8)

R=sky@chromium.org

Review URL: https://codereview.chromium.org/1772023002 .

Cr-Commit-Position: refs/branch-heads/2661@{#115}
Cr-Branched-From: ef6f6ae5e4c96622286b563658d5cd62a6cf1197-refs/heads/master@{#378081}

[modify] https://crrev.com/87686973fe8171dfbc515c81e50b9602b9a8cf12/ui/views/controls/scrollbar/base_scroll_bar.cc
[modify] https://crrev.com/87686973fe8171dfbc515c81e50b9602b9a8cf12/ui/views/controls/scrollbar/base_scroll_bar.h
[modify] https://crrev.com/87686973fe8171dfbc515c81e50b9602b9a8cf12/ui/views/controls/scrollbar/scrollbar_unittest.cc

Labels: TE-Verified-M50 TE-Verified-50.0.2661.18
Fix is working as intended. Rechecked on Verified OS for chrome version: 50.0.2661.18 and adding TE-verified labels. 
Verified the above issue on Win 7, Win 8.1, Win 10 and Linux OS.
Status: Verified (was: Fixed)

Sign in to add a comment