Canceling the system print dialog leaves printing in a bad state |
||||
Issue description- from any web page bring up the print dialog (CTRL-P) - from the print dialog, bring the system print dialog (SHIFT-CTRL-P) - press Cancel on the system print dialog - bring the print dialog again (CTRL-P) Expected: the print dialog shows up Actual: nothing happens At this point closing the browser leaves a bunch of Chrome processes around. I bisected it to https://chromium-review.googlesource.com/c/chromium/src/+/704262
,
Dec 19 2017
Actually just realized that the DCHECK above happens regardless of trying to open a new preview dialog, if you wait long enough. Maybe a different issue introduced later? I'm on r524741. Looking at the task manager, it looks like a printing utility service starts up when the "Cancel" button is pressed on the system dialog. Will look into why that is happening. Also added some logging. I think the issue with the preview dialog not getting removed from the map in print preview dialog controller (and therefore not coming back up) may be unrelated to the system dialog specifically. I can reproduce the problem by printing to a local printer and hitting print before the preview is fully loaded. By contrast, if I wait for the preview to load and then hit ctrl + shift + P I see the dialog get removed as expected, and if I subsequently hit ctrl+P fast enough that the error hasn't happened yet, it looks like another dialog is getting created. So there appear to be 2 problems here: The DCHECK above which does seem to be related to cancelling the system dialog, and the dialog not getting destroyed if printing/system dialog happens before print preview is loaded. Working on a fix for the second of the two now.
,
Dec 19 2017
The DCHECK issue is due to the fact that the call to SystemDialogCancelled() was only made due to a message from PrintRenderFrameHelper that was no longer sent when we stopped doing the second run through the renderer in that CL. Have a fix for both problems in progress.
,
Dec 20 2017
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/3276e3b9c843443403653c84cc02231424eccd6b commit 3276e3b9c843443403653c84cc02231424eccd6b Author: rbpotter <rbpotter@chromium.org> Date: Wed Dec 20 01:02:33 2017 Printing: Fix problems with system dialog and hidden preview Bug: 796057 Change-Id: Ifda86af778af0fabf1153189a193c92b36727a1c Reviewed-on: https://chromium-review.googlesource.com/834690 Reviewed-by: Lei Zhang <thestig@chromium.org> Commit-Queue: Rebekah Potter <rbpotter@chromium.org> Cr-Commit-Position: refs/heads/master@{#525207} [modify] https://crrev.com/3276e3b9c843443403653c84cc02231424eccd6b/chrome/browser/printing/print_view_manager_base.cc [modify] https://crrev.com/3276e3b9c843443403653c84cc02231424eccd6b/chrome/browser/ui/webui/print_preview/print_preview_handler.cc
,
Dec 20 2017
,
Jan 2 2018
Tested the issue on Windows 10 using Chrome version M65 - 65.0.3309.0 as per the issue mentioned in original comment by following the below steps: 1. Launched the Chrome browser. 2. Navigate to any web page. Eg.: www.yahoo.com 3. Try to perform the keyboard action Ctrl+P. 4. Perform the keyboard action Shft+Ctrl+P. 5. Click on the "Cancel" button. 6. Perform the keyboard action Ctrl+P. 7. Observed that Print Preview page is displayed. Attached the screencast for reference. jcivelli@/ rbpotter@ -- Could you please let us know whether it is the intended behavior or not. Please let us know if anything is missed. Thanks in advance!
,
Jan 2 2018
It looks like it's working from watching the screencast: you can close the system print dialog and then reopen it.
,
Jan 3 2018
Updating TE-Verified labels as issue is working as expected. Thanks! |
||||
►
Sign in to add a comment |
||||
Comment 1 by rbpotter@chromium.org
, Dec 19 2017When I try this on Windows 10 I get a DCHECK when trying to bring up the dialog a second time: [7284:17568:1219/090446.213:ERROR:pdf_to_emf_converter.cc(537)] Failed to convert PDF: Connection to PdfToEmfConverterFactory error. [7284:17568:1219/090446.215:FATAL:circular_deque.h(860)] Check failed: size(). Backtrace: base::debug::StackTrace::StackTrace [0x0000000000923028+104] (C:\users\rbpotter\chromium\src\base\debug\stack_trace_win.cc:286) base::debug::StackTrace::StackTrace [0x0000000000921CCF+31] (C:\users\rbpotter\chromium\src\base\debug\stack_trace.cc:199) logging::LogMessage::~LogMessage [0x0000000000997913+131] (C:\users\rbpotter\chromium\src\base\logging.cc:581) base::circular_deque<printing::(anonymous namespace)::PdfConverterImpl::GetPageCallbackData>::pop_front [0x000000000E0674CB+171] (C:\users\rbpotter\chromium\src\base\containers\circular_deque.h:861) std::queue<printing::(anonymous namespace)::PdfConverterImpl::GetPageCallbackData,base::circular_deque<printing::(anonymous namespace)::PdfConverterImpl::GetPageCallbackData> >::pop [0x000000000E064E03+19] (c:\users\rbpotter\chromium\src\third_party\depot_tools\win_toolchain\vs_files\1180cb75833ea365097e279efb2d5d7a42dee4b0\vc\tools\msvc\14.11.25503\include\queue:134) printing::`anonymous namespace'::PdfConverterImpl::OnPageDone [0x000000000E06471F+831] (C:\users\rbpotter\chromium\src\chrome\browser\printing\pdf_to_emf_converter.cc:526) printing::`anonymous namespace'::PdfConverterImpl::OnFailed [0x000000000E06384E+542] (C:\users\rbpotter\chromium\src\chrome\browser\printing\pdf_to_emf_converter.cc:541) base::internal::FunctorTraits<void (printing::(anonymous namespace)::PdfConverterImpl::*)(const std::basic_string<char,std::char_traits<char>,std::allocator<char> > &),void>::Invoke<base::WeakPtr<printing::(anonymous namespace)::PdfConverterImpl>,std::bas [0x000000000E069CC8+72] (C:\users\rbpotter\chromium\src\base\bind_internal.h:211) base::internal::InvokeHelper<1,void>::MakeItSo<void (printing::(anonymous namespace)::PdfConverterImpl::*)(const std::basic_string<char,std::char_traits<char>,std::allocator<char> > &),base::WeakPtr<printing::(anonymous namespace)::PdfConverterImpl>,std:: [0x000000000E069BF4+100] (C:\users\rbpotter\chromium\src\base\bind_internal.h:317) base::internal::Invoker<base::internal::BindState<void (printing::(anonymous namespace)::PdfConverterImpl::*)(const std::basic_string<char,std::char_traits<char>,std::allocator<char> > &),base::WeakPtr<printing::(anonymous namespace)::PdfConverterImpl>,st [0x000000000E069B3F+111] (C:\users\rbpotter\chromium\src\base\bind_internal.h:368) base::internal::Invoker<base::internal::BindState<void (printing::(anonymous namespace)::PdfConverterImpl::*)(const std::basic_string<char,std::char_traits<char>,std::allocator<char> > &),base::WeakPtr<printing::(anonymous namespace)::PdfConverterImpl>,st [0x000000000E0699D7+71] (C:\users\rbpotter\chromium\src\base\bind_internal.h:336) base::OnceCallback<void ()>::Run [0x000000000545E2BF+95] (C:\users\rbpotter\chromium\src\base\callback.h:65) mojo::InterfaceEndpointClient::NotifyError [0x0000000005472A35+341] (C:\users\rbpotter\chromium\src\mojo\public\cpp\bindings\lib\interface_endpoint_client.cc:326) mojo::internal::MultiplexRouter::ProcessNotifyErrorTask [0x000000000549874A+778] (C:\users\rbpotter\chromium\src\mojo\public\cpp\bindings\lib\multiplex_router.cc:800) mojo::internal::MultiplexRouter::ProcessTasks [0x0000000005493BFD+845] (C:\users\rbpotter\chromium\src\mojo\public\cpp\bindings\lib\multiplex_router.cc:711) mojo::internal::MultiplexRouter::OnPipeConnectionError [0x0000000005491C1F+863] (C:\users\rbpotter\chromium\src\mojo\public\cpp\bindings\lib\multiplex_router.cc:682) base::internal::FunctorTraits<void (mojo::internal::MultiplexRouter::*)(),void>::Invoke<mojo::internal::MultiplexRouter *> [0x00000000054A2101+65] (C:\users\rbpotter\chromium\src\base\bind_internal.h:211) base::internal::InvokeHelper<0,void>::MakeItSo<void (mojo::internal::MultiplexRouter::*const &)(),mojo::internal::MultiplexRouter *> [0x00000000054A202D+93] (C:\users\rbpotter\chromium\src\base\bind_internal.h:294) base::internal::Invoker<base::internal::BindState<void (mojo::internal::MultiplexRouter::*)(),base::internal::UnretainedWrapper<mojo::internal::MultiplexRouter> >,void ()>::RunImpl<void (mojo::internal::MultiplexRouter::*const &)(),const std::tuple<base:: [0x00000000054A1FA7+87] (C:\users\rbpotter\chromium\src\base\bind_internal.h:368) base::internal::Invoker<base::internal::BindState<void (mojo::internal::MultiplexRouter::*)(),base::internal::UnretainedWrapper<mojo::internal::MultiplexRouter> >,void ()>::Run [0x00000000054A1E9D+61] (C:\users\rbpotter\chromium\src\base\bind_internal.h:350) base::OnceCallback<void ()>::Run [0x000000000545E2BF+95] (C:\users\rbpotter\chromium\src\base\callback.h:65) mojo::Connector::HandleError [0x000000000545B50B+443] (C:\users\rbpotter\chromium\src\mojo\public\cpp\bindings\lib\connector.cc:540) mojo::Connector::OnHandleReadyInternal [0x000000000545D30F+223] (C:\users\rbpotter\chromium\src\mojo\public\cpp\bindings\lib\connector.cc:372) mojo::Connector::OnWatcherHandleReady [0x000000000545D21B+27] (C:\users\rbpotter\chromium\src\mojo\public\cpp\bindings\lib\connector.cc:353) base::internal::FunctorTraits<void (mojo::Connector::*)(unsigned int),void>::Invoke<mojo::Connector *,unsigned int> [0x0000000005460585+69] (C:\users\rbpotter\chromium\src\base\bind_internal.h:211) base::internal::InvokeHelper<0,void>::MakeItSo<void (mojo::Connector::*const &)(unsigned int),mojo::Connector *,unsigned int> [0x00000000054604BD+77] (C:\users\rbpotter\chromium\src\base\bind_internal.h:294) base::internal::Invoker<base::internal::BindState<void (mojo::Connector::*)(unsigned int),base::internal::UnretainedWrapper<mojo::Connector> >,void (unsigned int)>::RunImpl<void (mojo::Connector::*const &)(unsigned int),const std::tuple<base::internal::Un [0x0000000005460440+112] (C:\users\rbpotter\chromium\src\base\bind_internal.h:368) base::internal::Invoker<base::internal::BindState<void (mojo::Connector::*)(unsigned int),base::internal::UnretainedWrapper<mojo::Connector> >,void (unsigned int)>::Run [0x000000000546030D+93] (C:\users\rbpotter\chromium\src\base\bind_internal.h:350) base::RepeatingCallback<void (unsigned int)>::Run [0x000000000563B966+102] (C:\users\rbpotter\chromium\src\base\callback.h:94) mojo::SimpleWatcher::DiscardReadyState [0x000000000563B7E0+32] (C:\users\rbpotter\chromium\src\mojo\public\cpp\system\simple_watcher.h:195) base::internal::FunctorTraits<void (*)(const base::RepeatingCallback<void (unsigned int)> &, unsigned int, const mojo::HandleSignalsState &),void>::Invoke<const base::RepeatingCallback<void (unsigned int)> &,unsigned int,const mojo::HandleSignalsState &> [0x00000000056429D1+97] (C:\users\rbpotter\chromium\src\base\bind_internal.h:166) base::internal::InvokeHelper<0,void>::MakeItSo<void (*const &)(const base::RepeatingCallback<void (unsigned int)> &, unsigned int, const mojo::HandleSignalsState &),const base::RepeatingCallback<void (unsigned int)> &,unsigned int,const mojo::HandleSignal [0x00000000056428E6+102] (C:\users\rbpotter\chromium\src\base\bind_internal.h:294) base::internal::Invoker<base::internal::BindState<void (*)(const base::RepeatingCallback<void (unsigned int)> &, unsigned int, const mojo::HandleSignalsState &),base::RepeatingCallback<void (unsigned int)> >,void (unsigned int, const mojo::HandleSignalsSt [0x0000000005642848+136] (C:\users\rbpotter\chromium\src\base\bind_internal.h:368) base::internal::Invoker<base::internal::BindState<void (*)(const base::RepeatingCallback<void (unsigned int)> &, unsigned int, const mojo::HandleSignalsState &),base::RepeatingCallback<void (unsigned int)> >,void (unsigned int, const mojo::HandleSignalsSt [0x00000000056426F8+120] (C:\users\rbpotter\chromium\src\base\bind_internal.h:350) base::RepeatingCallback<void (unsigned int, const mojo::HandleSignalsState &)>::Run [0x000000000564D78F+127] (C:\users\rbpotter\chromium\src\base\callback.h:94) mojo::SimpleWatcher::OnHandleReady [0x000000000564D3CF+415] (C:\users\rbpotter\chromium\src\mojo\public\cpp\system\simple_watcher.cc:276) base::internal::FunctorTraits<void (mojo::SimpleWatcher::*)(int, unsigned int, const mojo::HandleSignalsState &),void>::Invoke<const base::WeakPtr<mojo::SimpleWatcher> &,const int &,const unsigned int &,const mojo::HandleSignalsState &> [0x000000000564E677+135] (C:\users\rbpotter\chromium\src\base\bind_internal.h:211) base::internal::InvokeHelper<1,void>::MakeItSo<void (mojo::SimpleWatcher::*const &)(int, unsigned int, const mojo::HandleSignalsState &),const base::WeakPtr<mojo::SimpleWatcher> &,const int &,const unsigned int &,const mojo::HandleSignalsState &> [0x000000000564E456+166] (C:\users\rbpotter\chromium\src\base\bind_internal.h:317) base::internal::Invoker<base::internal::BindState<void (mojo::SimpleWatcher::*)(int, unsigned int, const mojo::HandleSignalsState &),base::WeakPtr<mojo::SimpleWatcher>,int,unsigned int,mojo::HandleSignalsState>,void ()>::RunImpl<void (mojo::SimpleWatcher: [0x000000000564E36C+188] (C:\users\rbpotter\chromium\src\base\bind_internal.h:368) base::internal::Invoker<base::internal::BindState<void (mojo::SimpleWatcher::*)(int, unsigned int, const mojo::HandleSignalsState &),base::WeakPtr<mojo::SimpleWatcher>,int,unsigned int,mojo::HandleSignalsState>,void ()>::Run [0x000000000564E0DD+61] (C:\users\rbpotter\chromium\src\base\bind_internal.h:350) base::OnceCallback<void ()>::Run [0x00000000008A35EE+94] (C:\users\rbpotter\chromium\src\base\callback.h:65) base::debug::TaskAnnotator::RunTask [0x000000000092770A+778] (C:\users\rbpotter\chromium\src\base\debug\task_annotator.cc:55) base::internal::IncomingTaskQueue::RunTask [0x00000000009D5261+209] (C:\users\rbpotter\chromium\src\base\message_loop\incoming_task_queue.cc:129) base::MessageLoop::RunTask [0x00000000009E01A8+968] (C:\users\rbpotter\chromium\src\base\message_loop\message_loop.cc:391) base::MessageLoop::DeferOrRunPendingTask [0x00000000009E0C90+80] (C:\users\rbpotter\chromium\src\base\message_loop\message_loop.cc:406) base::MessageLoop::DoWork [0x00000000009E0FD1+529] (C:\users\rbpotter\chromium\src\base\message_loop\message_loop.cc:447) base::MessagePumpForUI::DoRunLoop [0x00000000009EE02D+77] (C:\users\rbpotter\chromium\src\base\message_loop\message_pump_win.cc:173) base::MessagePumpWin::Run [0x00000000009ED1FB+219] (C:\users\rbpotter\chromium\src\base\message_loop\message_pump_win.cc:58) base::MessageLoop::Run [0x00000000009DF8B1+529] (C:\users\rbpotter\chromium\src\base\message_loop\message_loop.cc:344) base::RunLoop::Run [0x0000000000AE725B+507] (C:\users\rbpotter\chromium\src\base\run_loop.cc:133) ChromeBrowserMainParts::MainMessageLoopRun [0x000000000A423C3A+362] (C:\users\rbpotter\chromium\src\chrome\browser\chrome_browser_main.cc:1945) content::BrowserMainLoop::RunMainMessageLoopParts [0x0000000016AEE2A2+466] (C:\users\rbpotter\chromium\src\content\browser\browser_main_loop.cc:1195) content::BrowserMainRunnerImpl::Run [0x0000000016B01C3C+332] (C:\users\rbpotter\chromium\src\content\browser\browser_main_runner.cc:141) content::BrowserMain [0x0000000016AE2A26+262] (C:\users\rbpotter\chromium\src\content\browser\browser_main.cc:46) content::RunNamedProcessTypeMain [0x000000001A0ABD5C+220] (C:\users\rbpotter\chromium\src\content\app\content_main_runner.cc:427) content::ContentMainRunnerImpl::Run [0x000000001A0ACC3E+590] (C:\users\rbpotter\chromium\src\content\app\content_main_runner.cc:710) content::ContentServiceManagerMainDelegate::RunEmbedderProcess [0x000000001A0A7E0A+42] (C:\users\rbpotter\chromium\src\content\app\content_service_manager_main_delegate.cc:51) service_manager::Main [0x000000002EB08440+1296] (C:\users\rbpotter\chromium\src\services\service_manager\embedder\main.cc:456) content::ContentMain [0x000000001A0ABBC2+82] (C:\users\rbpotter\chromium\src\content\app\content_main.cc:19) ChromeMain [0x000000000789E633+419] (C:\users\rbpotter\chromium\src\chrome\app\chrome_main.cc:128) MainDllLoader::Launch [0x0000000140030FA4+1124] (C:\users\rbpotter\chromium\src\chrome\app\main_dll_loader_win.cc:199) wWinMain [0x0000000140023F87+1127] (C:\users\rbpotter\chromium\src\chrome\app\chrome_exe_main_win.cc:230) Is there a specific revision I should try? Or were you on a release build?