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

Issue 706369 link

Starred by 2 users

Issue metadata

Status: Verified
Owner:
Closed: May 2017
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Linux
Pri: 3
Type: Bug



Sign in to add a comment

std::length_error when location.reload() in the print preview.

Project Member Reported by arthurso...@chromium.org, Mar 29 2017

Issue description

Chromium:59.0.3055.0 (Developer Build) (64-bit)
Revision:991596180e69f17e1bc3828061b420821194031d
OS:Linux
Build:Release

What steps will reproduce the problem?
(1) Hit Ctrl + P
(2) Right click in the print-preview, select 'inspect'
(3) Type location.reload() in the console (1 or 2 times)

terminate called after throwing an instance of 'std::length_error'
  what():  basic_string::append
Received signal 6
#0 0x2b5f432621e7 base::debug::StackTrace::StackTrace()
#1 0x2b5f43261d5f base::debug::(anonymous namespace)::StackDumpSignalHandler()
#2 0x2b5f48c93330 <unknown>
#3 0x2b5f4f193c37 gsignal
#4 0x2b5f4f197028 abort
#5 0x2b5f4eca3535 __gnu_cxx::__verbose_terminate_handler()
#6 0x2b5f4eca16d6 <unknown>
#7 0x2b5f4eca1703 std::terminate()
#8 0x2b5f4eca1922 __cxa_throw
#9 0x2b5f4ecf33a7 std::__throw_length_error()
#10 0x2b5f4ecfe19d std::string::append()
#11 0x2b5f43271f6e base::JSONWriter::BuildJSONString()
#12 0x2b5f43272563 base::JSONWriter::BuildJSONString()
#13 0x2b5f43271e3d base::JSONWriter::Write()
#14 0x2b5f422cb878 content::WebUI::GetJavascriptCall()
#15 0x2b5f422cc4b4 content::WebUIImpl::CallJavascriptFunctionUnsafe()
#16 0x2b5f44c72569 PrintPreviewHandler::SendInitialSettings()
#17 0x2b5f432b61fa base::(anonymous namespace)::PostTaskAndReplyRelay::RunReplyAndSelfDestruct()
#18 0x2b5f432e40bf base::debug::TaskAnnotator::RunTask()
#19 0x2b5f4327a9cd base::MessageLoop::RunTask()
#20 0x2b5f4327ace8 base::MessageLoop::DeferOrRunPendingTask()
#21 0x2b5f4327b206 base::MessageLoop::DoWork()
#22 0x2b5f4327c40a base::(anonymous namespace)::WorkSourceDispatch()
#23 0x2b5f49cabe04 g_main_context_dispatch
#24 0x2b5f49cac048 <unknown>
#25 0x2b5f49cac0ec g_main_context_iteration
#26 0x2b5f4327c2f6 base::MessagePumpGlib::Run()
#27 0x2b5f4327a6f7 base::MessageLoop::RunHandler()
#28 0x2b5f43297d5e base::RunLoop::Run()
#29 0x2b5f43172df8 ChromeBrowserMainParts::MainMessageLoopRun()
#30 0x2b5f41fc9b53 content::BrowserMainLoop::RunMainMessageLoopParts()
#31 0x2b5f41fccb9d content::BrowserMainRunnerImpl::Run()
#32 0x2b5f41fc53b8 content::BrowserMain()
#33 0x2b5f42f2dc4c content::ContentMainRunnerImpl::Run()
#34 0x2b5f43f949ff service_manager::Main()
#35 0x2b5f42f2ccc2 content::ContentMain()
#36 0x2b5f41b870c1 ChromeMain
#37 0x2b5f4f17ef45 __libc_start_main
#38 0x2b5f41b86f2d <unknown>
  r8: 000000000000000a  r9: 00002b5f48ac8980 r10: 0000000000000008 r11: 0000000000000202
 r12: 00000f3e7a956ec0 r13: 0000000000000001 r14: 00007ffd350d4828 r15: 00002b5f4ef463c0
  di: 000000000002486d  si: 000000000002486d  bp: 00000f3e7a7e9258  bx: 00002b5f4f51f868
  dx: 0000000000000006  ax: 0000000000000000  cx: ffffffffffffffff  sp: 00007ffd350d4508
  ip: 00002b5f4f193c37 efl: 0000000000000202 cgf: 0000000000000033 erf: 0000000000000000
 trp: 0000000000000000 msk: 0000000000000000 cr2: 0000000000000000
[end of stack trace]

Interestingly, I can't reproduce the bug in Debug mode. There is probably a timing issue.
 
out-12.ogv
2.1 MB View Download
Owner: thestig@chromium.org
Status: Assigned (was: Untriaged)
Labels: -Pri-2 Pri-3
At r463855 here. If I call location.reload() twice, the tab that initiates print preview navigates to chrome://print and the popup devtools console goes away. I can't repro in a debug builder either, but I'll keep looking.

FWIW, I don't think this situation can occur unless the user goes into the inspector and do this. However, if they do, really all bets are off because they can mess up print preview in any number of ways.
Owner: arthurso...@chromium.org
Can't repro in a release ASAN build either. Can you try with ASAN and see if something is going horribly wrong? Feel free to punt back to me if you can get more info.
Status: Verified (was: Assigned)
I can no more reproduce it.
Now[r468603] I get what is described in #2.
I tried ASAN [60.0.3094.0 r470142 Debug]. I didn't get anything.

The bug can probably be closed.

Sign in to add a comment