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

Layout assertion visiting google accounts help page #14783

Closed
jdm opened this issue Dec 30, 2016 · 4 comments
Closed

Layout assertion visiting google accounts help page #14783

jdm opened this issue Dec 30, 2016 · 4 comments

Comments

@jdm
Copy link
Member

@jdm jdm commented Dec 30, 2016

STR: visit http://www.google.com/support/accounts?hl=en

assertion failed: ellipsis_fragments.len() == 1 (thread LayoutThread PipelineId { namespace_id: PipelineNamespaceId(0), index: PipelineIndex(3) }, at /Users/jdm/src/servo/components/layout/fragment.rs:772)
stack backtrace:
   0:        0x10f0c55b1 - backtrace::backtrace::trace::hf69d5756c40bafc7
   1:        0x10f0c5c58 - backtrace::capture::Backtrace::new::h92e5f83ad3bb233c
   2:        0x10ed5c4fc - servo::main::{{closure}}::hf6443ebf81e66199
   3:        0x114361273 - std::panicking::rust_panic_with_hook::h3e771863e3ed8403
   4:        0x10fec2573 - std::panicking::begin_panic::h94258923a88c8674
   5:        0x11003d35a - layout::fragment::Fragment::transform_into_ellipsis::h438ff44d3bf59d07
   6:        0x110056c58 - layout::inline::LineBreaker::push_fragment_to_line::hd83cfdc26114cb54
   7:        0x110057622 - layout::inline::LineBreaker::split_line_at_last_known_good_position::h0c67809371a9c3a9
   8:        0x1100554c8 - layout::inline::LineBreaker::reflow_fragment::h40ff0b65cb4f02a2
   9:        0x110052625 - layout::inline::LineBreaker::reflow_fragments::hf1ae70c705b24d94
  10:        0x110051f82 - layout::inline::LineBreaker::scan_for_lines::h9de4388d261c6025
  11:        0x11005c7cc - <layout::inline::InlineFlow as layout::flow::Flow>::assign_block_size::h5d58d839c7d217d8
  12:        0x11008ff8b - <layout::traversal::AssignBSizes<'a> as layout::flow::PostorderFlowTraversal>::process::h3477b9c360ab6b67
  13:        0x11006aea6 - layout::sequential::traverse_flow_tree_preorder::doit::h9ef088d634ad02b3
  14:        0x11006ae84 - layout::sequential::traverse_flow_tree_preorder::doit::h9ef088d634ad02b3
  15:        0x11006ae84 - layout::sequential::traverse_flow_tree_preorder::doit::h9ef088d634ad02b3
  16:        0x11006ae84 - layout::sequential::traverse_flow_tree_preorder::doit::h9ef088d634ad02b3
  17:        0x11006ae84 - layout::sequential::traverse_flow_tree_preorder::doit::h9ef088d634ad02b3
  18:        0x11006ae84 - layout::sequential::traverse_flow_tree_preorder::doit::h9ef088d634ad02b3
  19:        0x11006ae84 - layout::sequential::traverse_flow_tree_preorder::doit::h9ef088d634ad02b3
  20:        0x11006ae84 - layout::sequential::traverse_flow_tree_preorder::doit::h9ef088d634ad02b3
  21:        0x11006ae84 - layout::sequential::traverse_flow_tree_preorder::doit::h9ef088d634ad02b3
  22:        0x11006ae84 - layout::sequential::traverse_flow_tree_preorder::doit::h9ef088d634ad02b3
  23:        0x11006ae84 - layout::sequential::traverse_flow_tree_preorder::doit::h9ef088d634ad02b3
  24:        0x11006ae84 - layout::sequential::traverse_flow_tree_preorder::doit::h9ef088d634ad02b3
  25:        0x11006ae84 - layout::sequential::traverse_flow_tree_preorder::doit::h9ef088d634ad02b3
  26:        0x11006ac75 - layout::sequential::traverse_flow_tree_preorder::h9f05d6a9353cbd7d
  27:        0x10fdca22a - layout_thread::LayoutThread::solve_constraints::h8dc9cd0782aa6e1f
  28:        0x10fdd2117 - layout_thread::LayoutThread::perform_post_style_recalc_layout_passes::{{closure}}::h7be30c3a18ebf344
  29:        0x10fb9df7f - profile_traits::time::profile::h6c261d3b1b8f3ed4
  30:        0x10fdd1a60 - layout_thread::LayoutThread::perform_post_style_recalc_layout_passes::h479b2d2e6dbf3969
  31:        0x10fdceb63 - layout_thread::LayoutThread::handle_reflow::h72f2ec2961f891a9
  32:        0x10fdc81bd - layout_thread::LayoutThread::handle_request_helper::{{closure}}::hc7d47ef9d243a171
  33:        0x10fb9cf4f - profile_traits::time::profile::h020b1a8ee21efe70
  34:        0x10fdc76d2 - layout_thread::LayoutThread::handle_request_helper::h5d54f483bb96d08d
  35:        0x10fdc63bf - layout_thread::LayoutThread::handle_request::h93b84d371f279dcd
  36:        0x10fdc5315 - layout_thread::LayoutThread::start::h9b0152470f35579a
  37:        0x10fdc171d - <layout_thread::LayoutThread as layout_traits::LayoutThreadFactory>::create::{{closure}}::{{closure}}::he99659b3fbde1add
  38:        0x10fb9c9dd - profile_traits::mem::ProfilerChan::run_with_memory_reporting::hda8d984d87c7a0a2
  39:        0x10fdc1de2 - <layout_thread::LayoutThread as layout_traits::LayoutThreadFactory>::create::{{closure}}::h1be44ea9032c35c8
  40:        0x10fd970bb - <std::panic::AssertUnwindSafe<F> as core::ops::FnOnce<()>>::call_once::h3bcd7ab5878ed8ee
  41:        0x10fc1a1af - std::panicking::try::do_call::ha8f59e88188b6f4c
  42:        0x11436214a - __rust_maybe_catch_panic
  43:        0x10fc19670 - std::panicking::try::hfcf4e4e0772d1f1c
  44:        0x10fc17375 - std::panic::catch_unwind::h75c6658c00c4d757
  45:        0x10fc18250 - std::thread::Builder::spawn::{{closure}}::ha2723455ecd04240
  46:        0x10fcaa669 - <F as alloc::boxed::FnBox<A>>::call_box::hc6c860102f3f90f1
  47:        0x1143601f4 - std::sys::imp::thread::Thread::new::thread_start::h5f22426d80277e16
  48:     0x7fff8e409898 - _pthread_body
  49:     0x7fff8e409729 - _pthread_start
@jdm jdm changed the title Assertion visiting google accounts help page Layout assertion visiting google accounts help page Dec 30, 2016
@jdm
Copy link
Member Author

@jdm jdm commented Dec 30, 2016

The vector in question contains two fragments, instead of 1.

@Ms2ger
Copy link
Contributor

@Ms2ger Ms2ger commented Mar 16, 2017

Also hitting this on google docs

@jdm
Copy link
Member Author

@jdm jdm commented Apr 4, 2017

I finally narrowed down a minimal testcase:

<style>
  @font-face {
      font-family: "Roboto";
      src: url("https://fonts.gstatic.com/s/roboto/v15/d-6IYplOFocCacKzxwXSOJBw1xU1rKptJj_0jans920.woff2");
  }
  #foo {
      max-width: 30px;
      overflow-x: hidden;
      text-overflow: ellipsis;
      font-family: Roboto;
  }
</style>
<div id="foo">English‎</div>
@jdm
Copy link
Member Author

@jdm jdm commented Apr 4, 2017

What happens here is that TextRunScanner::flush_clump_to_list creates an empty RunInfo value to start. This is initialized with a font_index of 0; for the first fragment processed, if a font is selected from the font group that is in a different index, then the mapping is flushed. RunMapping::flush checks for empty mappings, but explicitly allows the case where an empty mapping is passed in and remains empty after transformations. This means that we end up with two mappings, which causes us to generate multiple fragments.

bors-servo added a commit that referenced this issue Apr 4, 2017
Overwrite default RunInfo values with the first real ones encountered.

TextRunScanner::flush_clump_to_list compares the values in the RunInfo object against the ones determined from the current fragment, but these values can be arbitrary defaults that don't mean anything useful.

---
- [X] `./mach build -d` does not report any errors
- [X] `./mach test-tidy` does not report any errors
- [X] These changes fix #14783
- [X] There are tests for these changes

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/16258)
<!-- Reviewable:end -->
@jdm jdm self-assigned this Apr 4, 2017
bors-servo added a commit that referenced this issue Apr 6, 2017
Overwrite default RunInfo values with the first real ones encountered.

TextRunScanner::flush_clump_to_list compares the values in the RunInfo object against the ones determined from the current fragment, but these values can be arbitrary defaults that don't mean anything useful.

---
- [X] `./mach build -d` does not report any errors
- [X] `./mach test-tidy` does not report any errors
- [X] These changes fix #14783
- [X] There are tests for these changes

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/16258)
<!-- Reviewable:end -->
bors-servo added a commit that referenced this issue Apr 11, 2017
Overwrite default RunInfo values with the first real ones encountered.

TextRunScanner::flush_clump_to_list compares the values in the RunInfo object against the ones determined from the current fragment, but these values can be arbitrary defaults that don't mean anything useful.

---
- [X] `./mach build -d` does not report any errors
- [X] `./mach test-tidy` does not report any errors
- [X] These changes fix #14783
- [X] There are tests for these changes

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/16258)
<!-- Reviewable:end -->
bors-servo added a commit that referenced this issue Apr 12, 2017
Overwrite default RunInfo values with the first real ones encountered.

TextRunScanner::flush_clump_to_list compares the values in the RunInfo object against the ones determined from the current fragment, but these values can be arbitrary defaults that don't mean anything useful.

---
- [X] `./mach build -d` does not report any errors
- [X] `./mach test-tidy` does not report any errors
- [X] These changes fix #14783
- [X] There are tests for these changes

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/16258)
<!-- Reviewable:end -->
bors-servo added a commit that referenced this issue Apr 12, 2017
Overwrite default RunInfo values with the first real ones encountered.

TextRunScanner::flush_clump_to_list compares the values in the RunInfo object against the ones determined from the current fragment, but these values can be arbitrary defaults that don't mean anything useful.

---
- [X] `./mach build -d` does not report any errors
- [X] `./mach test-tidy` does not report any errors
- [X] These changes fix #14783
- [X] There are tests for these changes

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/16258)
<!-- Reviewable:end -->
bors-servo added a commit that referenced this issue Apr 13, 2017
Overwrite default RunInfo values with the first real ones encountered.

TextRunScanner::flush_clump_to_list compares the values in the RunInfo object against the ones determined from the current fragment, but these values can be arbitrary defaults that don't mean anything useful.

---
- [X] `./mach build -d` does not report any errors
- [X] `./mach test-tidy` does not report any errors
- [X] These changes fix #14783
- [X] There are tests for these changes

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/16258)
<!-- Reviewable:end -->
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

2 participants
You can’t perform that action at this time.