View Issue Details

IDProjectCategoryView StatusLast Update
0000666luatexluatex bugpublic2015-10-19 18:04
ReporterPaul Isambert Assigned ToHans Hagen  
PrioritynormalSeverityminorReproducibilityhave not tried
Status closedResolutionfixed 
Product Version0.70.1 
Fixed in Version0.80.2 
Summary0000666: Glues in disc.replace can't happen.
DescriptionWhen you try to insert a glue in the "replace" list of a discretionary, LuaTeX crashes with: `This can't happen (add_disc_widths).'

- It doesn't matter whether the glue has a spec or not.
- Things apparently go wrong when the paragraph is processed later, since nothing happens if you return another head.
- There is no error if you replace the glue with a kern.
Steps To Reproduce\directlua{
local glue = node.new("glue")

callback.register("pre_linebreak_filter",
  function (head)
    for disc in node.traverse_id(node.id("disc"), head) do
      node.insert_after(disc.replace, disc.replace, node.copy(glue))
    end
    return head
  end)
}

a\discretionary{b}{c}{d}e
\bye
TagsNo tags attached.

Activities

Paul Isambert

2011-05-28 09:36

reporter   ~0000866

More precisely (sorry, I should have spotted it two minutes ago): insertion in "replace" produces the error no matter what; insertion in "pre" or "post" produces the error iff there's a break at the disc.

Hans Hagen

2015-10-19 18:04

manager   ~0001432

There can't be glue nodes in disc lists. I've adapted the message.

Issue History

Date Modified Username Field Change
2011-05-28 09:30 Paul Isambert New Issue
2011-05-28 09:36 Paul Isambert Note Added: 0000866
2011-05-28 11:39 Taco Status new => assigned
2011-05-28 11:39 Taco Assigned To => Taco
2015-10-19 18:03 Hans Hagen Assigned To Taco => Hans Hagen
2015-10-19 18:04 Hans Hagen Note Added: 0001432
2015-10-19 18:04 Hans Hagen Status assigned => closed
2015-10-19 18:04 Hans Hagen Resolution open => fixed
2015-10-19 18:04 Hans Hagen Fixed in Version => 0.80.2