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

Assert_failure src/backend/tabular.ml:124:15" #414

Closed
na4zagin3 opened this issue Sep 28, 2023 · 2 comments · Fixed by #416
Closed

Assert_failure src/backend/tabular.ml:124:15" #414

na4zagin3 opened this issue Sep 28, 2023 · 2 comments · Fixed by #416

Comments

@na4zagin3
Copy link
Contributor

Version: SATySFi 0.0.6 to 0.0.8 (probably 0.0.9 and the latest master too)

This assertion failure happens when we complie satysfi-easytable-doc.1.1.2 with satysfi-base.0.0.6.

#   evaluating texts ...
# 'footnote:1': F
# Uncaught exception:
#   
#   "Assert_failure src/backend/tabular.ml:124:15"
# 
# Raised at Main__Tabular.determine_column_width.aux in file "src/backend/tabular.ml", line 124, characters 15-27
# Called from Main__Tabular.determine_column_width in file "src/backend/tabular.ml", line 138, characters 26-66
# Called from Main__Tabular.main.(fun) in file "src/backend/tabular.ml", line 332, characters 24-59
# Called from Stdlib__list.fold_left in file "list.ml", line 121, characters 24-34
# Called from Main__Tabular.main in file "src/backend/tabular.ml", line 328, characters 4-282
# Called from Main__Evaluator.interpret_0 in file "__evaluator_0.gen.ml", line 288, characters 59-79
# Called from Main__Evaluator.reduce_beta in file "src/frontend/evaluator.cppo.ml", line 69, characters 13-69
# Called from Main__Evaluator.interpret_0 in file "src/frontend/evaluator.cppo.ml", line 218, characters 16-41
# Called from Main__Evaluator.interpret_0 in file "src/frontend/evaluator.cppo.ml", line 209, characters 24-44
# Called from Main__Evaluator.reduce_beta in file "src/frontend/evaluator.cppo.ml", line 69, characters 13-69
# Called from Main__Evaluator.interpret_0 in file "src/frontend/evaluator.cppo.ml", line 218, characters 16-41
# Called from Main__Evaluator.reduce_beta in file "src/frontend/evaluator.cppo.ml", line 69, characters 13-69
# Called from Main__Evaluator.interpret_0 in file "src/frontend/evaluator.cppo.ml", line 218, characters 16-41
# Called from Main__Evaluator.reduce_beta in file "src/frontend/evaluator.cppo.ml", line 69, characters 13-69
# Called from Main__Evaluator.interpret_0 in file "src/frontend/evaluator.cppo.ml", line 218, characters 16-41
# Called from Main__Evaluator.reduce_beta in file "src/frontend/evaluator.cppo.ml", line 69, characters 13-69
# Called from Main__Evaluator.interpret_pdf_mode_intermediate_input_horz.interpret_commands.(fun) in file "src/frontend/evaluator.cppo.ml", line 794, characters 26-55
# Called from Stdlib__list.map in file "list.ml", line 92, characters 20-23
# Called from Main__Evaluator.interpret_pdf_mode_intermediate_input_horz.interpret_commands in file "src/frontend/evaluator.cppo.ml", line 790, characters 4-614
# Called from Main__Evaluator.interpret_pdf_mode_intermediate_input_horz in file "src/frontend/evaluator.cppo.ml", line 812, characters 14-44
# Called from Main__Evaluator.interpret_0 in file "__evaluator_0.gen.ml", line 438, characters 47-111
# Called from Main__Evaluator.reduce_beta in file "src/frontend/evaluator.cppo.ml", line 69, characters 13-69
# Called from Main__Evaluator.interpret_0 in file "src/frontend/evaluator.cppo.ml", line 218, characters 16-41
# Called from Main__Evaluator.interpret_0 in file "src/frontend/evaluator.cppo.ml", line 209, characters 24-44
# Called from Main__Evaluator.reduce_beta in file "src/frontend/evaluator.cppo.ml", line 69, characters 13-69
# Called from Main__Evaluator.interpret_0 in file "src/frontend/evaluator.cppo.ml", line 218, characters 16-41
# Called from Main__Evaluator.reduce_beta in file "src/frontend/evaluator.cppo.ml", line 69, characters 13-69
# Called from Main__Evaluator.interpret_pdf_mode_intermediate_input_vert.interpret_commands.(fun) in file "src/frontend/evaluator.cppo.ml", line 732, characters 26-55
# Called from Stdlib__list.map in file "list.ml", line 92, characters 20-23
# Called from Main__Evaluator.interpret_pdf_mode_intermediate_input_vert.interpret_commands in file "src/frontend/evaluator.cppo.ml", line 728, characters 4-346
# Called from Main__Evaluator.interpret_pdf_mode_intermediate_input_vert in file "src/frontend/evaluator.cppo.ml", line 740, characters 16-46
# Called from Main__Evaluator.interpret_0 in file "__evaluator_0.gen.ml", line 447, characters 47-111
# Called from Main__Evaluator.reduce_beta in file "src/frontend/evaluator.cppo.ml", line 69, characters 13-69
# Called from Main__Evaluator.interpret_0 in file "src/frontend/evaluator.cppo.ml", line 218, characters 16-41
# Called from Main__Evaluator.reduce_beta in file "src/frontend/evaluator.cppo.ml", line 69, characters 13-69
# Called from Stdlib__list.fold_left in file "list.ml", line 121, characters 24-34
# Called from Main__Evaluator.reduce_beta_list in file "src/frontend/evaluator.cppo.ml" (inlined), line 79, characters 2-45
# Called from Main__Evaluator.interpret_0 in file "__evaluator_0.gen.ml", line 583, characters 25-53
# Called from Main__Evaluator.reduce_beta in file "src/frontend/evaluator.cppo.ml", line 69, characters 13-69
# Called from Main__Evaluator.interpret_0 in file "src/frontend/evaluator.cppo.ml", line 218, characters 16-41
# Called from Main__Evaluator.reduce_beta in file "src/frontend/evaluator.cppo.ml", line 69, characters 13-69
# Called from Main__Evaluator.interpret_0 in file "src/frontend/evaluator.cppo.ml", line 218, characters 16-41
# Called from Main__Evaluator.reduce_beta in file "src/frontend/evaluator.cppo.ml", line 69, characters 13-69
# Called from Main__Evaluator.interpret_pdf_mode_intermediate_input_vert.interpret_commands.(fun) in file "src/frontend/evaluator.cppo.ml", line 732, characters 26-55
# Called from Stdlib__list.map in file "list.ml", line 92, characters 20-23
# Called from Stdlib__list.map in file "list.ml", line 92, characters 32-39
# Called from Main__Evaluator.interpret_pdf_mode_intermediate_input_vert.interpret_commands in file "src/frontend/evaluator.cppo.ml", line 728, characters 4-346
# Called from Main__Evaluator.interpret_pdf_mode_intermediate_input_vert in file "src/frontend/evaluator.cppo.ml", line 740, characters 16-46
# Called from Main__Evaluator.interpret_0 in file "__evaluator_0.gen.ml", line 447, characters 47-111
# Called from Main__Evaluator.reduce_beta in file "src/frontend/evaluator.cppo.ml", line 69, characters 13-69
# Called from Main__Evaluator.interpret_0 in file "src/frontend/evaluator.cppo.ml", line 218, characters 16-41
# Called from Main__Evaluator.reduce_beta in file "src/frontend/evaluator.cppo.ml", line 69, characters 13-69
# Called from Main__Evaluator.interpret_pdf_mode_intermediate_input_vert.interpret_commands.(fun) in file "src/frontend/evaluator.cppo.ml", line 732, characters 26-55
# Called from Stdlib__list.map in file "list.ml", line 92, characters 20-23
# Called from Stdlib__list.map in file "list.ml", line 92, characters 32-39
# Called from Stdlib__list.map in file "list.ml", line 92, characters 32-39
# Called from Main__Evaluator.interpret_pdf_mode_intermediate_input_vert.interpret_commands in file "src/frontend/evaluator.cppo.ml", line 728, characters 4-346
# Called from Main__Evaluator.interpret_pdf_mode_intermediate_input_vert in file "src/frontend/evaluator.cppo.ml", line 740, characters 16-46
# Called from Main__Evaluator.interpret_0 in file "__evaluator_0.gen.ml", line 447, characters 47-111
# Called from Main__Evaluator.reduce_beta in file "src/frontend/evaluator.cppo.ml", line 69, characters 13-69
# Called from Main__Evaluator.interpret_0 in file "src/frontend/evaluator.cppo.ml", line 218, characters 16-41
# Called from Main__Evaluator.interpret_0 in file "src/frontend/evaluator.cppo.ml", line 209, characters 24-44
# Called from Main__Evaluator.reduce_beta in file "src/frontend/evaluator.cppo.ml", line 69, characters 13-69
# Called from Main__Evaluator.interpret_0 in file "src/frontend/evaluator.cppo.ml", line 218, characters 16-41
# Called from Main__Evaluator.reduce_beta in file "src/frontend/evaluator.cppo.ml", line 69, characters 13-69
# Called from Main__Evaluator.interpret_0 in file "src/frontend/evaluator.cppo.ml", line 218, characters 16-41
# Called from Main__Evaluator.reduce_beta in file "src/frontend/evaluator.cppo.ml", line 69, characters 13-69
# Called from Main__Evaluator.interpret_pdf_mode_intermediate_input_vert.interpret_commands.(fun) in file "src/frontend/evaluator.cppo.ml", line 732, characters 26-55
# Called from Stdlib__list.map in file "list.ml", line 92, characters 20-23
# Called from Stdlib__list.map in file "list.ml", line 92, characters 32-39
# Called from Stdlib__list.map in file "list.ml", line 92, characters 32-39
# Called from Stdlib__list.map in file "list.ml", line 92, characters 32-39
# Called from Stdlib__list.map in file "list.ml", line 92, characters 32-39
# Called from Stdlib__list.map in file "list.ml", line 92, characters 32-39
# Called from Main__Evaluator.interpret_pdf_mode_intermediate_input_vert.interpret_commands in file "src/frontend/evaluator.cppo.ml", line 728, characters 4-346
# Called from Main__Evaluator.interpret_pdf_mode_intermediate_input_vert in file "src/frontend/evaluator.cppo.ml", line 740, characters 16-46
# Called from Main__Evaluator.interpret_0 in file "__evaluator_0.gen.ml", line 447, characters 47-111
# Called from Main__Evaluator.reduce_beta in file "src/frontend/evaluator.cppo.ml", line 69, characters 13-69
# Called from Main__Evaluator.interpret_0 in file "src/frontend/evaluator.cppo.ml", line 218, characters 16-41
# Called from Main__Evaluator.interpret_0 in file "src/frontend/evaluator.cppo.ml", line 209, characters 24-44
# Called from Main__Evaluator.reduce_beta in file "src/frontend/evaluator.cppo.ml", line 69, characters 13-69
# Called from Main__Evaluator.interpret_0 in file "src/frontend/evaluator.cppo.ml", line 218, characters 16-41
# Called from Main__Evaluator.reduce_beta in file "src/frontend/evaluator.cppo.ml", line 69, characters 13-69
# Called from Main__Evaluator.interpret_0 in file "src/frontend/evaluator.cppo.ml", line 218, characters 16-41
# Called from Main__Evaluator.reduce_beta in file "src/frontend/evaluator.cppo.ml", line 69, characters 13-69
# Called from Main__Evaluator.interpret_pdf_mode_intermediate_input_vert.interpret_commands.(fun) in file "src/frontend/evaluator.cppo.ml", line 732, characters 26-55
# Called from Stdlib__list.map in file "list.ml", line 92, characters 20-23
# Called from Stdlib__list.map in file "list.ml", line 92, characters 32-39
# Called from Main__Evaluator.interpret_pdf_mode_intermediate_input_vert.interpret_commands in file "src/frontend/evaluator.cppo.ml", line 728, characters 4-346
# Called from Main__Evaluator.interpret_pdf_mode_intermediate_input_vert in file "src/frontend/evaluator.cppo.ml", line 740, characters 16-46
# Called from Main__Evaluator.interpret_0 in file "__evaluator_0.gen.ml", line 447, characters 47-111
# Called from Main__Evaluator.reduce_beta in file "src/frontend/evaluator.cppo.ml", line 69, characters 13-69
# Called from Main__Evaluator.interpret_0 in file "src/frontend/evaluator.cppo.ml", line 218, characters 16-41
# Called from Main__Evaluator.reduce_beta in file "src/frontend/evaluator.cppo.ml", line 69, characters 13-69
# Called from Main__Evaluator.interpret_0 in file "src/frontend/evaluator.cppo.ml", line 218, characters 16-41
# Called from Main__Evaluator.reduce_beta in file "src/frontend/evaluator.cppo.ml", line 69, characters 13-69
# Called from Main__Evaluator.interpret_pdf_mode_intermediate_input_vert.interpret_commands.(fun) in file "src/frontend/evaluator.cppo.ml", line 732, characters 26-55
# Called from Stdlib__list.map in file "list.ml", line 92, characters 20-23
# Called from Main__Evaluator.interpret_pdf_mode_intermediate_input_vert.interpret_commands in file "src/frontend/evaluator.cppo.ml", line 728, characters 4-346
# Called from Main__Evaluator.interpret_pdf_mode_intermediate_input_vert in file "src/frontend/evaluator.cppo.ml", line 740, characters 16-46
# Called from Main__Evaluator.interpret_0 in file "__evaluator_0.gen.ml", line 447, characters 47-111
# Called from Main__Evaluator.reduce_beta in file "src/frontend/evaluator.cppo.ml", line 69, characters 13-69
# Called from Main__Evaluator.interpret_0 in file "src/frontend/evaluator.cppo.ml", line 218, characters 16-41
# Called from Main__Evaluator.interpret_0 in file "src/frontend/evaluator.cppo.ml", line 209, characters 24-44
# Called from Main__Evaluator.reduce_beta in file "src/frontend/evaluator.cppo.ml", line 69, characters 13-69
# Called from Main__Evaluator.interpret_0 in file "src/frontend/evaluator.cppo.ml", line 218, characters 16-41
# Called from Main__Evaluator.reduce_beta in file "src/frontend/evaluator.cppo.ml", line 69, characters 13-69
# Called from Main__Evaluator.interpret_0 in file "src/frontend/evaluator.cppo.ml", line 218, characters 16-41
# Called from Main.eval_main in file "src/frontend/main.ml", line 349, characters 6-35
# Called from Main.eval_document_file.aux in file "src/frontend/main.ml", line 380, characters 21-48
# Called from Main.error_log_environment in file "src/frontend/main.ml", line 464, characters 4-16
# Called from Satysfi in file "bin/satysfi.ml", line 1, characters 9-21

The assertion comes from determine_column_width:

| ((Some((numcol, widrest)) as rsome) :: rtail, cell :: ctail) ->
begin
match cell with
| NormalCell(_)
| MultiCell(_)
-> assert false (* temporary; maybe should just warn users *)

Questions

  1. How serious is the violation of the precondition?
  2. As the code mentions assert false (* temporary; maybe should just warn users *), can we make it just warn users rather than stop processing?
@na4zagin3
Copy link
Contributor Author

This was found at na4zagin3/satyrographos-repo#653

@gfngfn
Copy link
Owner

gfngfn commented Oct 1, 2023

  1. How serious is the violation of the precondition?

This kind of violation is not severe, as far as I remember; it just causes the overriding of a non-empty cell by a cell with more than one column or row span.

  1. As the code mentions assert false (* temporary; maybe should just warn users *), can we make it just warn users rather than stop processing?

Yes, we probably can.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants