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

Issue 657219 link

Starred by 3 users

Issue metadata

Status: Fixed
Owner:
Last visit > 30 days ago
Closed: Oct 2016
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: All
Pri: 3
Type: Bug

Blocking:
issue 625296



Sign in to add a comment

chrome://net-export crashes if you Start Logging a 2nd time with DCHECKs on

Project Member Reported by wangyix@chromium.org, Oct 19 2016

Issue description

Version: Chromium 56.0.2895.0
OS: Goobuntu

What steps will reproduce the problem?
(1) Build chromium with dcheck_always_on=true, run it, go to chrome://net-export.
(2) Click "Start Logging to Disk", pick any folder to save in.
(3) Click "Stop Logging"
(4) Click "Start Logging to Disk" again, and it crashes.


The particular DCHECK causing this is
//src/chrome/browser/ui/webui/net_export_ui.cc line 314:

DCHECK(!select_file_dialog_)

 
Description: Show this description
Description: Show this description

Comment 3 by eroman@chromium.org, Oct 19 2016

Components: Internals>Network>Logging
Labels: -OS-Linux OS-All

Comment 4 by mmenke@chromium.org, Oct 19 2016

Owner: mmenke@chromium.org
Status: Assigned (was: Untriaged)
I'll do this.  Doing a lot of small fixes this week, this seems to fit the bill.

Comment 5 by mmenke@chromium.org, Oct 19 2016

Cc: -eroman@chromium.org mmenke@chromium.org
Owner: eroman@chromium.org
Reassigning to eroman, who suggested this as a starter but for Yixin.

Note that the fix should handle cancellation, multiple messages sent from JS at once (Like a double click on the button before we manage show the modal dialog).  Not sure if it's possible to reasonably write tests for this or not.

Comment 6 by eroman@chromium.org, Oct 19 2016

Owner: wangyix@chromium.org

Comment 7 by mmenke@chromium.org, Oct 20 2016

So, to go into a bit more detail:

The problem is that the select_file_dialog_ refptr is never cleared.  So to fix this, we need to clear it when the dialog is closed (Both when it's cancelled without selecting a path, and when a path is selected.  Not that there's currently no callback implemented by net-export in the cancellation case).

Also, where the DCHECK is now, we should instead not show the dialog again if select_file_dialog_ is non-NULL.  With the above change, that will only happen if the user manages to click the button twice before we show the dialog once.  We really don't want to show two dialogs at once, so should just not show a dialog when that happens.
Blocking: 625296
Project Member

Comment 9 by bugdroid1@chromium.org, Oct 25 2016

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

commit bfe6949954d4ed616ae69479b17f79142317c722
Author: wangyix <wangyix@google.com>
Date: Tue Oct 25 18:38:25 2016

- Removed a DCHECK that prevented "start logging" a second time.
- Parent window is now blocked when the save dialog pops up.
- The SelectFileDialog instance is now cleaned up as soon as the user saves or cancels.

BUG= 657219 

Review-Url: https://codereview.chromium.org/2440173003
Cr-Commit-Position: refs/heads/master@{#427422}

[modify] https://crrev.com/bfe6949954d4ed616ae69479b17f79142317c722/chrome/browser/ui/webui/net_export_ui.cc

Status: Fixed (was: Assigned)

Sign in to add a comment