MantisBT - NetSurf
View Issue Details
0002330NetSurfLayoutpublic2015-07-03 19:402016-02-16 13:51
ReporterHarriet Bazley 
Assigned ToMichael Drake 
PrioritynormalSeveritycrashReproducibilityalways
StatusclosedResolutionfixed 
PlatformARMOSRISC OSOS Version5.19
Product Version3.4 
Target Version3.4Fixed in Version3.4 
Fixed in CI build #
Reported in CI build #2820
URL of problem pagehttps://www.piano-tuners.org/history/piano-tuner-history.html
Summary0002330: Crash on rendering web page
DescriptionI get repeated crashes on attempting to render https://www.piano-tuners.org/history/piano-tuner-history.html - the page downloads, then kills Netsurf when it gets to the 'processing' stage.
Additional InformationIyonix Aria, RISC OS 5.20

The log file indicates that it's a problem with calculating the layout.
TagsNo tags attached.
Attached Files? Log (5,221) 2015-07-03 19:40
https://bugs.netsurf-browser.org/mantis/file_download.php?file_id=297&type=bug
gif abpt-nav-logo.gif (1,438) 2015-07-08 23:17
https://bugs.netsurf-browser.org/mantis/file_download.php?file_id=299&type=bug
gif

html test.html (619) 2015-07-08 23:17
https://bugs.netsurf-browser.org/mantis/file_download.php?file_id=300&type=bug

Notes
(0000869)
Vincent Sanders   
2015-07-05 22:45   
layout assert while calculating descendant bounding boxes

$ ./nsgtk -V rlog https://www.piano-tuners.org/history/piano-tuner-history.html

nsgtk: render/layout.c:5131: layout_calculate_descendant_bboxes: Assertion `(box->width != 2147483647) && (box->height != (-2147483647 - 1))' failed.

adding some debug it seems that box->width is UNKNOWN_WIDTH (height is 0)

Its a recursive call in from the "non float" child loop in layout_calculate_descendant_bboxes (lines circa layout.c:5188 ) but its deep in the box stack
(0000870)
Vincent Sanders   
2015-07-05 23:00   
gdb from the failing box, up

(gdb) p box
$2 = (struct box *) 0x106c570
(gdb) p *box
$1 = {type = BOX_BLOCK, flags = 0, styles = 0x0, style = 0x106c210, x = 0, y = 0, width = 2147483647,
  height = 0, descendant_x0 = 0, descendant_y0 = 0, descendant_x1 = 0, descendant_y1 = 0, margin = {0,
    0, 0, 0}, padding = {0, 0, 0, 0}, border = {{style = CSS_BORDER_STYLE_INHERIT, c = 0, width = 0}, {
      style = CSS_BORDER_STYLE_INHERIT, c = 0, width = 0}, {style = CSS_BORDER_STYLE_INHERIT, c = 0,
      width = 0}, {style = CSS_BORDER_STYLE_INHERIT, c = 0, width = 0}}, scroll_x = 0x0, scroll_y = 0x0,
  min_width = 0, max_width = 2147483647, byte_offset = 0, text = 0x0, length = 0, space = 0, href = 0x0,
  target = 0x0, title = 0x0, columns = 1, rows = 1, start_column = 0, next = 0x0, prev = 0x0,
  children = 0x0, last = 0x0, parent = 0x106c360, inline_end = 0x0, float_children = 0x0,
  next_float = 0x0, float_container = 0x0, clear_level = 0, list_marker = 0x0, col = 0x0, gadget = 0x0,
  usemap = 0x0, id = 0x0, background = 0x0, object = 0x0, object_params = 0x0, iframe = 0x0, node = 0x0}

(gdb) p *box->parent
$3 = {type = BOX_BLOCK, flags = 2112, styles = 0x10981f0, style = 0x106c110, x = 20, y = 0, width = 119,
  height = 59, descendant_x0 = 0, descendant_y0 = 0, descendant_x1 = 119, descendant_y1 = 59, margin = {
    0, 20, 0, 20}, padding = {0, 0, 0, 0}, border = {{style = CSS_BORDER_STYLE_NONE, c = 4287137928,
      width = 0}, {style = CSS_BORDER_STYLE_NONE, c = 4287137928, width = 0}, {
      style = CSS_BORDER_STYLE_NONE, c = 4287137928, width = 0}, {style = CSS_BORDER_STYLE_NONE,
      c = 4287137928, width = 0}}, scroll_x = 0x0, scroll_y = 0x0, min_width = 96, max_width = 96,
  byte_offset = 0, text = 0x10963b0 "abpt logo.gif - 2099 Bytes", length = 26, space = 0, href = 0x0,
  target = 0x0, title = 0x0, columns = 1, rows = 1, start_column = 0, next = 0x0, prev = 0x0,
  children = 0x106c570, last = 0x106c570, parent = 0x106bda0, inline_end = 0x0, float_children = 0x0,
  next_float = 0x0, float_container = 0x0, clear_level = 0, list_marker = 0x0, col = 0x0, gadget = 0x0,
  usemap = 0x0, id = 0x0, background = 0x0, object = 0x10c2be0, object_params = 0x0, iframe = 0x0,
  node = 0x112c960}

(gdb) p *box->parent->parent
$4 = {type = BOX_BLOCK, flags = 2112, styles = 0xe74390, style = 0x106bc50, x = 0, y = 0, width = 159,
  height = 59, descendant_x0 = 0, descendant_y0 = -9, descendant_x1 = 159, descendant_y1 = 59, margin = {
    0, 0, 0, 0}, padding = {0, 0, 0, 0}, border = {{style = CSS_BORDER_STYLE_NONE, c = 4278190080,
      width = 0}, {style = CSS_BORDER_STYLE_NONE, c = 4278190080, width = 0}, {
      style = CSS_BORDER_STYLE_NONE, c = 4278190080, width = 0}, {style = CSS_BORDER_STYLE_NONE,
      c = 4278190080, width = 0}}, scroll_x = 0x0, scroll_y = 0x0, min_width = 96, max_width = 96,
  byte_offset = 0, text = 0x0, length = 0, space = 0, href = 0x0, target = 0x0, title = 0x0,
  columns = 1, rows = 1, start_column = 0, next = 0x106c8b0, prev = 0x0, children = 0x106c360,
  last = 0x106c360, parent = 0x106bac0, inline_end = 0x0, float_children = 0x0, next_float = 0x0,
  float_container = 0x0, clear_level = 0, list_marker = 0x106bf80, col = 0x0, gadget = 0x0,
  usemap = 0x0, id = 0x0, background = 0x0, object = 0x0, object_params = 0x0, iframe = 0x0,
  node = 0x112c810}

(gdb) p *box->parent->parent->parent
$5 = {type = BOX_BLOCK, flags = 2112, styles = 0x1036a00, style = 0x106b970, x = 0, y = 0, width = 159,
  height = 1905, descendant_x0 = 0, descendant_y0 = -9, descendant_x1 = 159, descendant_y1 = 1905,
  margin = {0, 0, 0, 0}, padding = {0, 0, 0, 0}, border = {{style = CSS_BORDER_STYLE_NONE,
      c = 4278190080, width = 0}, {style = CSS_BORDER_STYLE_NONE, c = 4278190080, width = 0}, {
      style = CSS_BORDER_STYLE_NONE, c = 4278190080, width = 0}, {style = CSS_BORDER_STYLE_NONE,
      c = 4278190080, width = 0}}, scroll_x = 0x0, scroll_y = 0x0, min_width = 96, max_width = 348,
  byte_offset = 0, text = 0x0, length = 0, space = 0, href = 0x0, target = 0x0, title = 0x0,
  columns = 1, rows = 1, start_column = 0, next = 0x13d4740, prev = 0x0, children = 0x106bda0,
  last = 0x13d3a00, parent = 0x106b7e0, inline_end = 0x0, float_children = 0x0, next_float = 0x0,
  float_container = 0x0, clear_level = 0, list_marker = 0x0, col = 0x0, gadget = 0x0, usemap = 0x0,
  id = 0x0, background = 0x0, object = 0x0, object_params = 0x0, iframe = 0x0, node = 0x112c5e0}

(gdb) p *box->parent->parent->parent->parent
$6 = {type = BOX_BLOCK, flags = 2112, styles = 0xe95eb0, style = 0x106b690, x = 0, y = 0, width = 159,
  height = 1948, descendant_x0 = 0, descendant_y0 = -9, descendant_x1 = 159, descendant_y1 = 1948,
  margin = {0, 0, 0, 0}, padding = {0, 0, 0, 0}, border = {{style = CSS_BORDER_STYLE_NONE,
      c = 4278190080, width = 0}, {style = CSS_BORDER_STYLE_NONE, c = 4278190080, width = 0}, {
      style = CSS_BORDER_STYLE_NONE, c = 4278190080, width = 0}, {style = CSS_BORDER_STYLE_NONE,
      c = 4278190080, width = 0}}, scroll_x = 0x0, scroll_y = 0x0, min_width = 96, max_width = 348,
  byte_offset = 0, text = 0x0, length = 0, space = 0, href = 0x0, target = 0x0, title = 0x0,
  columns = 1, rows = 1, start_column = 0, next = 0x0, prev = 0x0, children = 0x106bac0,
  last = 0x13d4c00, parent = 0x106b140, inline_end = 0x0, float_children = 0x0, next_float = 0x0,
  float_container = 0x0, clear_level = 0, list_marker = 0x0, col = 0x0, gadget = 0x0, usemap = 0x0,
  id = 0x0, background = 0x0, object = 0x0, object_params = 0x0, iframe = 0x0, node = 0x112c090}

(gdb) p *box->parent->parent->parent->parent->parent
$7 = {type = BOX_BLOCK, flags = 2112, styles = 0xff36a0, style = 0x106aff0, x = 0, y = 0, width = 159,
  height = 1948, descendant_x0 = 0, descendant_y0 = -9, descendant_x1 = 159, descendant_y1 = 1948,
  margin = {0, 0, 0, 0}, padding = {0, 0, 0, 0}, border = {{style = CSS_BORDER_STYLE_NONE,
      c = 4278190080, width = 0}, {style = CSS_BORDER_STYLE_NONE, c = 4278190080, width = 0}, {
      style = CSS_BORDER_STYLE_NONE, c = 4278190080, width = 0}, {style = CSS_BORDER_STYLE_NONE,
      c = 4278190080, width = 0}}, scroll_x = 0x0, scroll_y = 0x0, min_width = 96, max_width = 348,
  byte_offset = 0, text = 0x0, length = 0, space = 0, href = 0x0, target = 0x0, title = 0x0,
  columns = 1, rows = 1, start_column = 0, next = 0x0, prev = 0x0, children = 0x106b7e0,
  last = 0x106b7e0, parent = 0x106b500, inline_end = 0x0, float_children = 0x0, next_float = 0x0,
  float_container = 0x1064be0, clear_level = 0, list_marker = 0x0, col = 0x0, gadget = 0x0,
  usemap = 0x0, id = 0x0, background = 0x0, object = 0x0, object_params = 0x0, iframe = 0x0,
  node = 0x112bb40}
(0000871)
Vincent Sanders   
2015-07-05 23:02   
(gdb) p *box->parent->parent->parent->parent->parent->parent
$8 = {type = BOX_FLOAT_LEFT, flags = NEW_LINE, styles = 0x0, style = 0x0, x = 10, y = 315, width = 159,
  height = 1948, descendant_x0 = 0, descendant_y0 = 0, descendant_x1 = 159, descendant_y1 = 1948,
  margin = {0, 0, 0, 0}, padding = {0, 0, 0, 0}, border = {{style = CSS_BORDER_STYLE_INHERIT, c = 0,
      width = 0}, {style = CSS_BORDER_STYLE_INHERIT, c = 0, width = 0}, {
      style = CSS_BORDER_STYLE_INHERIT, c = 0, width = 0}, {style = CSS_BORDER_STYLE_INHERIT, c = 0,
      width = 0}}, scroll_x = 0x0, scroll_y = 0x0, min_width = 96, max_width = 348, byte_offset = 0,
  text = 0x0, length = 0, space = 2147483647, href = 0x0, target = 0x0, title = 0x0, columns = 1,
  rows = 1, start_column = 0, next = 0x13d63e0, prev = 0x0, children = 0x106b140, last = 0x106b140,
  parent = 0x106b320, inline_end = 0x0, float_children = 0x0, next_float = 0x0,
  float_container = 0x1064be0, clear_level = 0, list_marker = 0x0, col = 0x0, gadget = 0x0,
  usemap = 0x0, id = 0x0, background = 0x0, object = 0x0, object_params = 0x0, iframe = 0x0, node = 0x0}
(gdb) p *box->parent->parent->parent->parent->parent->parent->parent
$9 = {type = BOX_INLINE_CONTAINER, flags = 0, styles = 0x0, style = 0x0, x = 0, y = 0, width = 963,
  height = 0, descendant_x0 = 0, descendant_y0 = 0, descendant_x1 = 963, descendant_y1 = 0, margin = {0,
    0, 0, 0}, padding = {0, 0, 0, 0}, border = {{style = CSS_BORDER_STYLE_INHERIT, c = 0, width = 0}, {
      style = CSS_BORDER_STYLE_INHERIT, c = 0, width = 0}, {style = CSS_BORDER_STYLE_INHERIT, c = 0,
      width = 0}, {style = CSS_BORDER_STYLE_INHERIT, c = 0, width = 0}}, scroll_x = 0x0, scroll_y = 0x0,
  min_width = 96, max_width = 18688, byte_offset = 0, text = 0x0, length = 0, space = 0, href = 0x0,
  target = 0x0, title = 0x0, columns = 1, rows = 1, start_column = 0, next = 0x16ba0a0, prev = 0x0,
  children = 0x106b500, last = 0x13d63e0, parent = 0x106ae60, inline_end = 0x0, float_children = 0x0,
  next_float = 0x0, float_container = 0x0, clear_level = 0, list_marker = 0x0, col = 0x0, gadget = 0x0,
  usemap = 0x0, id = 0x0, background = 0x0, object = 0x0, object_params = 0x0, iframe = 0x0, node = 0x0}
(gdb) p *box->parent->parent->parent->parent->parent->parent->parent->parent
$10 = {type = BOX_BLOCK, flags = 2112, styles = 0x12a15d0, style = 0x106ac10, x = 10, y = 0,
  width = 963, height = 61105, descendant_x0 = 0, descendant_y0 = -9, descendant_x1 = 1005,
  descendant_y1 = 61105, margin = {0, 0, 0, 0}, padding = {0, 0, 0, 0}, border = {{
      style = CSS_BORDER_STYLE_NONE, c = 4278190080, width = 0}, {style = CSS_BORDER_STYLE_NONE,
      c = 4278190080, width = 0}, {style = CSS_BORDER_STYLE_NONE, c = 4278190080, width = 0}, {
      style = CSS_BORDER_STYLE_NONE, c = 4278190080, width = 0}}, scroll_x = 0x0, scroll_y = 0x0,
  min_width = 96, max_width = 18688, byte_offset = 0, text = 0x0, length = 0, space = 0, href = 0x0,
  target = 0x0, title = 0x0, columns = 1, rows = 1, start_column = 0, next = 0x16bd830, prev = 0x0,
  children = 0x106b320, last = 0x16bd650, parent = 0x106aa80, inline_end = 0x0, float_children = 0x0,
  next_float = 0x0, float_container = 0x0, clear_level = 0, list_marker = 0x0, col = 0x0, gadget = 0x0,
  usemap = 0x0, id = 0x12bf640, background = 0x0, object = 0x0, object_params = 0x0, iframe = 0x0,
  node = 0x112b390}
(gdb) p *box->parent->parent->parent->parent->parent->parent->parent->parent->parent
$11 = {type = BOX_BLOCK, flags = 2112, styles = 0x10cb250, style = 0x106a830, x = 0, y = 310,
  width = 963, height = 61105, descendant_x0 = 0, descendant_y0 = -9, descendant_x1 = 1015,
  descendant_y1 = 61105, margin = {0, 0, 0, 0}, padding = {0, 10, 0, 10}, border = {{
      style = CSS_BORDER_STYLE_NONE, c = 4278190080, width = 0}, {style = CSS_BORDER_STYLE_NONE,
      c = 4278190080, width = 0}, {style = CSS_BORDER_STYLE_NONE, c = 4278190080, width = 0}, {
      style = CSS_BORDER_STYLE_NONE, c = 4278190080, width = 0}}, scroll_x = 0x0, scroll_y = 0x0,
  min_width = 116, max_width = 18708, byte_offset = 0, text = 0x0, length = 0, space = 0, href = 0x0,
  target = 0x0, title = 0x0, columns = 1, rows = 1, start_column = 0, next = 0x0, prev = 0x1065740,
  children = 0x106ae60, last = 0x16bd830, parent = 0x10650a0, inline_end = 0x0, float_children = 0x0,
  next_float = 0x0, float_container = 0x0, clear_level = 0, list_marker = 0x0, col = 0x0, gadget = 0x0,
  usemap = 0x0, id = 0x0, background = 0x0, object = 0x0, object_params = 0x0, iframe = 0x0,
  node = 0x112ae80}
(gdb) p *box->parent->parent->parent->parent->parent->parent->parent->parent->parent->parent
$12 = {type = BOX_BLOCK, flags = 2112, styles = 0x1077700, style = 0x1064d70, x = 0, y = 5, width = 983,
  height = 61415, descendant_x0 = 0, descendant_y0 = -15, descendant_x1 = 1015, descendant_y1 = 61415,
  margin = {0, 0, 0, 0}, padding = {0, 0, 0, 0}, border = {{style = CSS_BORDER_STYLE_NONE,
      c = 4278190080, width = 0}, {style = CSS_BORDER_STYLE_NONE, c = 4278190080, width = 0}, {
      style = CSS_BORDER_STYLE_NONE, c = 4278190080, width = 0}, {style = CSS_BORDER_STYLE_NONE,
      c = 4278190080, width = 0}}, scroll_x = 0x0, scroll_y = 0x0, min_width = 116, max_width = 18708,
  byte_offset = 0, text = 0x0, length = 0, space = 0, href = 0x0, target = 0x0, title = 0x0,
  columns = 1, rows = 1, start_column = 0, next = 0x0, prev = 0x0, children = 0x1065740,
  last = 0x106aa80, parent = 0x1064be0, inline_end = 0x0, float_children = 0x0, next_float = 0x0,
  float_container = 0x0, clear_level = 1868785012, list_marker = 0x0, col = 0x0, gadget = 0x0,
  usemap = 0x0, id = 0x0, background = 0x0, object = 0x0, object_params = 0x0, iframe = 0x0,
  node = 0x1123990}
(gdb) p *box->parent->parent->parent->parent->parent->parent->parent->parent->parent->parent->parent
$13 = {type = BOX_BLOCK, flags = 2112, styles = 0xffe6f0, style = 0x1314e50, x = 0, y = 0, width = 983,
  height = 61420, descendant_x0 = 0, descendant_y0 = -10, descendant_x1 = 1015, descendant_y1 = 61420,
  margin = {0, 0, 0, 0}, padding = {0, 0, 0, 0}, border = {{style = CSS_BORDER_STYLE_NONE,
      c = 4278190080, width = 0}, {style = CSS_BORDER_STYLE_NONE, c = 4278190080, width = 0}, {
      style = CSS_BORDER_STYLE_NONE, c = 4278190080, width = 0}, {style = CSS_BORDER_STYLE_NONE,
      c = 4278190080, width = 0}}, scroll_x = 0x0, scroll_y = 0x0, min_width = 116, max_width = 18708,
  byte_offset = 0, text = 0x0, length = 0, space = 0, href = 0x0, target = 0x0, title = 0x0,
  columns = 1, rows = 1, start_column = 0, next = 0x0, prev = 0x0, children = 0x10650a0,
  last = 0x10650a0, parent = 0x0, inline_end = 0x0, float_children = 0x13d63e0, next_float = 0x0,
  float_container = 0x0, clear_level = 0, list_marker = 0x0, col = 0x0, gadget = 0x0, usemap = 0x0,
  id = 0x0, background = 0x0, object = 0x0, object_params = 0x0, iframe = 0x0, node = 0x10d9660}
(0000872)
Vincent Sanders   
2015-07-05 23:18   
(Last edited: 2015-07-05 23:20)
ok its boxes generated from the source data:

 
  • <img class="s-5 l-9 center" src="https://www.piano-tuners.org/site-images/abpt-nav-logo.gif" alt="abpt logo.gif - 2099 Bytes" />


  • remove this and we render it just fine

    in fact just removing the class does. So it is related to the styling

    (0000873)
    Vincent Sanders   
    2015-07-06 22:14   
    the failing boxes parent is created with render/box_construct.c:1548:box_image()

    called from 863:box_construct_element()

    I cannot immediately see how a child box is created in that case.
    (0000875)
    Michael Drake   
    2015-07-08 23:19   
    (Last edited: 2015-07-08 23:20)
    The attached test.html and image reproduce the bug here.

    It looks like something related to generated pseudo elements (:after in this case) that is happening on the initial layout pass before image dimensions are known.

    More investigation needed.

    (0001224)
    Vincent Sanders   
    2016-02-16 13:51   
    Confirmed fixed in 3.4 release

    Issue History
    2015-07-03 19:40Harriet BazleyNew Issue
    2015-07-03 19:40Harriet BazleyFile Added: Log
    2015-07-04 23:28Vincent SandersStatusnew => confirmed
    2015-07-04 23:28Vincent SandersAdditional Information Updatedbug_revision_view_page.php?rev_id=1503#r1503
    2015-07-05 22:45Vincent SandersNote Added: 0000869
    2015-07-05 23:00Vincent SandersNote Added: 0000870
    2015-07-05 23:02Vincent SandersNote Added: 0000871
    2015-07-05 23:18Vincent SandersNote Added: 0000872
    2015-07-05 23:20Vincent SandersNote Edited: 0000872bug_revision_view_page.php?bugnote_id=872#r1505
    2015-07-05 23:22Vincent SandersAssigned To => Michael Drake
    2015-07-05 23:22Vincent SandersProduct Version => 3.4
    2015-07-06 22:14Vincent SandersNote Added: 0000873
    2015-07-08 23:17Michael DrakeFile Added: abpt-nav-logo.gif
    2015-07-08 23:17Michael DrakeFile Added: test.html
    2015-07-08 23:19Michael DrakeNote Added: 0000875
    2015-07-08 23:20Michael DrakeNote Edited: 0000875bug_revision_view_page.php?bugnote_id=875#r1507
    2016-02-09 16:56Michael DrakeStatusconfirmed => resolved
    2016-02-09 16:56Michael DrakeResolutionopen => fixed
    2016-02-09 16:56Michael DrakeFixed in Version => 3.4
    2016-02-09 16:56Michael DrakeTarget Version => 3.4
    2016-02-16 13:51Vincent SandersNote Added: 0001224
    2016-02-16 13:51Vincent SandersStatusresolved => closed