This short R program creates the error:
library(gt)
# Create a simple data frame
data <- data.frame(
Name = c("Alice", "Bob", "Charlie"),
Age = c(25, 30, 22),
Score = c(85, 92, 78)
)
# Create a gt table
gt_table <- gt(data)
sessioninfo::session_info()
# Save the table to a file
gtsave(gt_table, filename = "table.html")
works fine under windows but not on linux sessioninfo is:
setting value
version R version 4.2.2 (2022-10-31)
os Raspbian GNU/Linux 11 (bullseye)
system aarch64, linux-gnu
ui X11
language en_US.UTF-8
collate en_US.UTF-8
ctype en_US.UTF-8
tz Europe/Luxembourg
date 2023-07-26
pandoc 2.9.2.1 @ /usr/bin/pandoc
and packages:
package \* version date (UTC) lib source
cli 3.6.1 2023-03-23 CRAN (R 4.2.2)
digest 0.6.33 2023-07-07 CRAN (R 4.2.2)
dplyr 1.1.2 2023-04-20 CRAN (R 4.2.2)
fansi 1.0.4 2023-01-22 CRAN (R 4.2.2)
fastmap 1.1.1 2023-02-24 CRAN (R 4.2.2)
generics 0.1.3 2022-07-05 CRAN (R 4.2.2)
glue 1.6.2 2022-02-24 CRAN (R 4.2.2)
gt \* 0.9.0 2023-03-31 CRAN (R 4.2.2)
htmltools 0.5.5 2023-03-23 CRAN (R 4.2.2)
lifecycle 1.0.3 2022-10-07 CRAN (R 4.2.2)
magrittr 2.0.3 2022-03-30 CRAN (R 4.2.2)
pillar 1.9.0 2023-03-22 CRAN (R 4.2.2)
pkgconfig 2.0.3 2019-09-22 CRAN (R 4.2.2)
R6 2.5.1 2021-08-19 CRAN (R 4.2.2)
rlang 1.1.1 2023-04-28 CRAN (R 4.2.2)
sessioninfo 1.2.2 2021-12-06 CRAN (R 4.2.2)
tibble 3.2.1 2023-03-20 CRAN (R 4.2.2)
tidyselect 1.2.0 2022-10-10 CRAN (R 4.2.2)
utf8 1.2.3 2023-01-31 CRAN (R 4.2.2)
vctrs 0.6.3 2023-06-14 CRAN (R 4.2.2)
withr 2.5.0 2022-03-03 CRAN (R 4.2.2)
xml2 1.3.5 2023-07-06 CRAN (R 4.2.2)
detailed error:
\*\*\* caught bus error \*\*\*
address 0xf44a0b0b, cause 'invalid alignment'
Traceback:
1: rlang::hash(add_sass_file_mtime(list(x, get_package_version("sass"))))
2: sass_hash(list(discard_dependencies(input), options, cache_key_extra, if (isTRUE(write_attachments)) get_file_mtimes(file_attachments)))
3: sass::sass(list(list(element_id = id), as.list(stats::setNames(gt_options_tbl$value, gt_options_tbl$parameter)), sass::sass_file(system_file(file = "css/gt_colors.scss")), sass::sass_file(system_file(file = "css/gt_styles_default.scss")), glue::glue(.open = "\<\<", .close = "\>\>", "\\n \<\<ifelse(has_id, '##{$element_id} table', '.gt_table')\>\> {\\n \<\<font_family_attr\>\>\\n -webkit-font-smoothing: antialiased;\\n -moz-osx-font-smoothing: grayscale;\\n }\\n\\n \<\<ifelse(has_id, '##{$element_id} {', '')\>\>\\n @include gt_styles();\\n \<\<ifelse(has_id, '}', '')\>\>\\n\\n \<\<ifelse(has_additional_css, table_additional_css, '')\>\>\\n ")))
4: compile_scss(data = x, id = id)
5: as.tags.gt_tbl(data)
6: htmltools::as.tags(data)
7: gt_save_html(data = data, filename, path, ...)
8: gtsave(gt_table, filename = "table.html")
An irrecoverable exception occurred. R is aborting now ...
It normally creates an html file that contains a simple table. As said , no problems under windows with the same sessioninfo output!?