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

Crash when using accented letter in some situations #2664

Open
tintou opened this issue Oct 6, 2024 · 0 comments
Open

Crash when using accented letter in some situations #2664

tintou opened this issue Oct 6, 2024 · 0 comments

Comments

@tintou
Copy link

tintou commented Oct 6, 2024

Bug Report

Environment

Zola version: current trunk

Expected Behavior

My website should be able to build correctly.

Current Behavior

thread '<unnamed>' panicked at /home/tintou/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tera-1.20.0/src/context.rs:281:46:
byte index 14 is not a char boundary; it is inside 'é' (bytes 13..15) of `"La communauté"`
stack backtrace:
   0:     0x57e06a04c415 - <std::sys::backtrace::BacktraceLock::print::DisplayBacktrace as core::fmt::Display>::fmt::h1b9dad2a88e955ff
   1:     0x57e06a07a41b - core::fmt::write::h4b5a1270214bc4a7
   2:     0x57e06a0484af - std::io::Write::write_fmt::hd04af345a50c312d
   3:     0x57e06a04d791 - std::panicking::default_hook::{{closure}}::h96ab15e9936be7ed
   4:     0x57e06a04d46c - std::panicking::default_hook::h3cacb9c27561ad33
   5:     0x57e06a04ddf1 - std::panicking::rust_panic_with_hook::hfe205f6954b2c97b
   6:     0x57e06a04dc57 - std::panicking::begin_panic_handler::{{closure}}::h6cb44b3a50f28c44
   7:     0x57e06a04c8d9 - std::sys::backtrace::__rust_end_short_backtrace::hf1c1f2a92799bb0e
   8:     0x57e06a04d8e4 - rust_begin_unwind
   9:     0x57e067522e53 - core::panicking::panic_fmt::h3d8fc78294164da7
  10:     0x57e06a07e17a - core::str::slice_error_fail_rt::h23607b8a3a6c2267
  11:     0x57e06752369a - core::str::slice_error_fail::h402ef64b20c243ef
  12:     0x57e069c73476 - core::str::traits::<impl core::slice::index::SliceIndex<str> for core::ops::range::Range<usize>>::index::hb5c6fc43ed5a49d2
  13:     0x57e069c67713 - core::str::traits::<impl core::ops::index::Index<I> for str>::index::hde5377738613c154
  14:     0x57e067f41f53 - <tera::context::PointerMachina as core::iter::traits::iterator::Iterator>::next::h64cbfa4e88a6f44d
  15:     0x57e067f2122c - core::iter::traits::iterator::Iterator::try_fold::hcb9addf8741b3869
  16:     0x57e067f648ce - <core::iter::adapters::map::Map<I,F> as core::iter::traits::iterator::Iterator>::try_fold::h9e04fa9338f5fa31
  17:     0x57e067f4261b - tera::context::dotted_pointer::h0134580b47083866
  18:     0x57e067fa5c5b - tera::renderer::stack_frame::value_by_pointer::h24bee14788971460
  19:     0x57e067fa6377 - tera::renderer::stack_frame::StackFrame::find_value_in_frame::{{closure}}::hb2d2058d1ea0ff60
  20:     0x57e067f22874 - core::option::Option<T>::map::ha8b1aa46ff4f1b40
  21:     0x57e067fa6262 - tera::renderer::stack_frame::StackFrame::find_value_in_frame::h55c3d14af194c9fc
  22:     0x57e067fa60b6 - tera::renderer::stack_frame::StackFrame::find_value::hf12365d7db89a9c4
  23:     0x57e067f44b0b - tera::renderer::call_stack::CallStack::lookup::h8b22efc0394d55f4
  24:     0x57e067ed4b3f - tera::renderer::processor::process_path::ha5c675d0603c7b21
  25:     0x57e067ee2bff - tera::renderer::processor::Processor::lookup_ident::he50438bad9f65975
  26:     0x57e067ed8d36 - tera::renderer::processor::Processor::eval_expression::h628ce8da364ebc9d
  27:     0x57e067edb0f8 - tera::renderer::processor::Processor::safe_eval_expression::h2f54507c92725ff8
  28:     0x57e067edb155 - tera::renderer::processor::Processor::eval_set::h3bf5b5e958a69017
  29:     0x57e067ee47d7 - tera::renderer::processor::Processor::render_node::h56e20e26a7eb2165
  30:     0x57e067ed5129 - tera::renderer::processor::Processor::render_body::h1518a1eaf66a065a
  31:     0x57e067edc6ee - tera::renderer::processor::Processor::eval_macro_call::h48c876224bf67b49
  32:     0x57e067edb0ba - tera::renderer::processor::Processor::eval_expression::{{closure}}::h3ec9db0da718d1ff
  33:     0x57e067efa70d - tera::utils::render_to_string::h8f18efd65cdbf84c
  34:     0x57e067ed8e75 - tera::renderer::processor::Processor::eval_expression::h628ce8da364ebc9d
  35:     0x57e067ee307d - tera::renderer::processor::Processor::render_node::h3c97cd70bd0d315e
  36:     0x57e067ed5249 - tera::renderer::processor::Processor::render_body::hb91b0faddb39d162
  37:     0x57e067ed79c3 - tera::renderer::processor::Processor::render_if_node::hd378379ec4305985
  38:     0x57e067ee33eb - tera::renderer::processor::Processor::render_node::h3c97cd70bd0d315e
  39:     0x57e067ed5249 - tera::renderer::processor::Processor::render_body::hb91b0faddb39d162
  40:     0x57e067ed60de - tera::renderer::processor::Processor::render_for_loop::h9353b98d1af6b43c
  41:     0x57e067ee3389 - tera::renderer::processor::Processor::render_node::h3c97cd70bd0d315e
  42:     0x57e067ed5249 - tera::renderer::processor::Processor::render_body::hb91b0faddb39d162
  43:     0x57e067ee3b83 - tera::renderer::processor::Processor::render_node::h3c97cd70bd0d315e
  44:     0x57e067ed5249 - tera::renderer::processor::Processor::render_body::hb91b0faddb39d162
  45:     0x57e067ed7a46 - tera::renderer::processor::Processor::render_if_node::hd378379ec4305985
  46:     0x57e067ee33eb - tera::renderer::processor::Processor::render_node::h3c97cd70bd0d315e
  47:     0x57e067ed5249 - tera::renderer::processor::Processor::render_body::hb91b0faddb39d162
  48:     0x57e067ed80d2 - tera::renderer::processor::Processor::render_block::hcb532c238d7e15b0
  49:     0x57e067ed8176 - tera::renderer::processor::Processor::render_block::hcb532c238d7e15b0
  50:     0x57e067ee332b - tera::renderer::processor::Processor::render_node::h3c97cd70bd0d315e
  51:     0x57e067ee6607 - tera::renderer::processor::Processor::render::hab3fb25af5e98015
  52:     0x57e067ec2198 - tera::renderer::Renderer::render_to::hc85ff2d5f725bb54
  53:     0x57e067ec1fb9 - tera::renderer::Renderer::render::h7aa87850cbd927dd
  54:     0x57e067f5b917 - tera::tera::Tera::render::hb28960e253424b6a
  55:     0x57e067c78422 - utils::templates::render_template::hc5fdfdfed330f5ca
  56:     0x57e0679ce63a - content::section::Section::render_html::h3dd61d3daef05b95
  57:     0x57e0677006d6 - site::Site::render_section::h158b27cbca4640af
  58:     0x57e06771b8bd - site::Site::render_sections::{{closure}}::hd2005b1e19df6d75
  59:     0x57e0677172c0 - core::ops::function::impls::<impl core::ops::function::FnMut<A> for &F>::call_mut::hc252d8b8d1b4f39b
  60:     0x57e06773bfab - core::iter::adapters::map::map_try_fold::{{closure}}::h9f622698b5f65045
  61:     0x57e06775f1d8 - core::iter::traits::iterator::Iterator::try_fold::h04e0ac2f4ed2c3cf
  62:     0x57e06773b1f5 - <core::iter::adapters::map::Map<I,F> as core::iter::traits::iterator::Iterator>::try_fold::h7bf5403c57b403d8
  63:     0x57e06773aff2 - <core::iter::adapters::map::Map<I,F> as core::iter::traits::iterator::Iterator>::try_fold::h148d399307033fe4
  64:     0x57e067764bb5 - <core::iter::adapters::take_while::TakeWhile<I,P> as core::iter::traits::iterator::Iterator>::try_fold::h1a6e4095ef003f30
  65:     0x57e067764a71 - <core::iter::adapters::take_while::TakeWhile<I,P> as core::iter::traits::iterator::Iterator>::fold::h83c1db8c1da342b2
  66:     0x57e06773ab51 - <core::iter::adapters::map::Map<I,F> as core::iter::traits::iterator::Iterator>::fold::hc937f4c4dd1b9460
  67:     0x57e06773bc67 - core::iter::traits::iterator::Iterator::for_each::haa152f086954e723
  68:     0x57e06779fe1d - <rayon::iter::noop::NoopConsumer as rayon::iter::plumbing::Folder<T>>::consume_iter::hf20533a39f66bea0
  69:     0x57e06775e823 - <rayon::iter::while_some::WhileSomeFolder<C> as rayon::iter::plumbing::Folder<core::option::Option<T>>>::consume_iter::h75e07f997179f1aa
  70:     0x57e067704bda - <rayon::iter::map::MapFolder<C,F> as rayon::iter::plumbing::Folder<T>>::consume_iter::h5863ea0c8bb367e4
  71:     0x57e067705183 - <rayon::iter::map::MapFolder<C,F> as rayon::iter::plumbing::Folder<T>>::consume_iter::h85787e6a9afd22a9
  72:     0x57e06775f771 - rayon::iter::plumbing::Producer::fold_with::h3ef63c689e82a306
  73:     0x57e067799f8a - rayon::iter::plumbing::bridge_producer_consumer::helper::h3a5134e546bbaa1d
  74:     0x57e06779d6d1 - rayon::iter::plumbing::bridge_producer_consumer::helper::{{closure}}::h57155ad999487dda
  75:     0x57e067770809 - rayon_core::join::join_context::call_a::{{closure}}::hcf307ebd7f233e79
  76:     0x57e0677a6081 - <core::panic::unwind_safe::AssertUnwindSafe<F> as core::ops::function::FnOnce<()>>::call_once::h8138832e3a387350
  77:     0x57e0677a3fe1 - std::panicking::try::do_call::h7de66be01cb91584
  78:     0x57e0677a378b - __rust_try
  79:     0x57e0677a2555 - std::panic::catch_unwind::h82a9f85aef065758
  80:     0x57e06779f5e2 - rayon_core::unwind::halt_unwinding::h84088e0c92de96b6
  81:     0x57e06776b01b - rayon_core::join::join_context::{{closure}}::h1ad5d2ee5243daac
  82:     0x57e0677853c1 - rayon_core::registry::in_worker::h3a359f5bdd4f1d9a
  83:     0x57e06776a04e - rayon_core::join::join_context::h6ed775cb2986c4dd
  84:     0x57e06779a217 - rayon::iter::plumbing::bridge_producer_consumer::helper::h3a5134e546bbaa1d
  85:     0x57e06779d6d1 - rayon::iter::plumbing::bridge_producer_consumer::helper::{{closure}}::h57155ad999487dda
  86:     0x57e067770809 - rayon_core::join::join_context::call_a::{{closure}}::hcf307ebd7f233e79
  87:     0x57e0677a6081 - <core::panic::unwind_safe::AssertUnwindSafe<F> as core::ops::function::FnOnce<()>>::call_once::h8138832e3a387350
  88:     0x57e0677a3fe1 - std::panicking::try::do_call::h7de66be01cb91584
  89:     0x57e0677a378b - __rust_try
  90:     0x57e0677a2555 - std::panic::catch_unwind::h82a9f85aef065758
  91:     0x57e06779f5e2 - rayon_core::unwind::halt_unwinding::h84088e0c92de96b6
  92:     0x57e06776b01b - rayon_core::join::join_context::{{closure}}::h1ad5d2ee5243daac
  93:     0x57e06777e5c3 - rayon_core::registry::Registry::in_worker_cold::{{closure}}::{{closure}}::h4a927347f21e8ed4
  94:     0x57e06778cbf2 - rayon_core::job::JobResult<T>::call::{{closure}}::hf9b840cde216299b
  95:     0x57e0677a6264 - <core::panic::unwind_safe::AssertUnwindSafe<F> as core::ops::function::FnOnce<()>>::call_once::haf0ab4567d926409
  96:     0x57e0677a447d - std::panicking::try::do_call::hcf65a0085d2c7134
  97:     0x57e0677a378b - __rust_try
  98:     0x57e0677a28fb - std::panic::catch_unwind::ha29e9678be9d4568
  99:     0x57e06779f2b6 - rayon_core::unwind::halt_unwinding::h49d7be073402a69c
 100:     0x57e06778b74a - rayon_core::job::JobResult<T>::call::h97ab397ca9f3af12
 101:     0x57e0677944c6 - <rayon_core::job::StackJob<L,F,R> as rayon_core::job::Job>::execute::h6311a71c9cfd2e94
 102:     0x57e0697292ee - rayon_core::job::JobRef::execute::h68525ceece69c2a6
 103:     0x57e06972fd63 - rayon_core::registry::WorkerThread::execute::h7a9abaede8469583
 104:     0x57e06972fb02 - rayon_core::registry::WorkerThread::wait_until_cold::h6faa5c7e2f3f29a5
 105:     0x57e06972f89a - rayon_core::registry::WorkerThread::wait_until::h72261a75dd8a6f56
 106:     0x57e06972fc47 - rayon_core::registry::WorkerThread::wait_until_out_of_work::h49e822bca404f9a8
 107:     0x57e0697300d7 - rayon_core::registry::main_loop::hd9b243d7815d8635
 108:     0x57e06972cf06 - rayon_core::registry::ThreadBuilder::run::h2dc2bc6d75ee611b
 109:     0x57e06972d36d - <rayon_core::registry::DefaultSpawn as rayon_core::registry::ThreadSpawn>::spawn::{{closure}}::h7c4522f9578df136
 110:     0x57e06973f256 - std::sys::backtrace::__rust_begin_short_backtrace::hde181be98506de08
 111:     0x57e06973ce4d - std::thread::Builder::spawn_unchecked_::{{closure}}::{{closure}}::h26edd3637fa68e4b
 112:     0x57e069732bd1 - <core::panic::unwind_safe::AssertUnwindSafe<F> as core::ops::function::FnOnce<()>>::call_once::haf8d3c349d19c5f9
 113:     0x57e06973f59d - std::panicking::try::do_call::h91146cfab1a69bfc
 114:     0x57e06973ec3b - __rust_try
 115:     0x57e06973cb5a - std::thread::Builder::spawn_unchecked_::{{closure}}::ha65658fff33560ba
 116:     0x57e06972b327 - core::ops::function::FnOnce::call_once{{vtable.shim}}::h534902b53a0f7547
 117:     0x57e06a05430b - std::sys::pal::unix::thread::Thread::new::thread_start::ha8af9c992ef0b208
 118:     0x7db93269ca94 - start_thread
                               at ./nptl/pthread_create.c:447:8
 119:     0x7db932729c3c - __GI___clone3
                               at ./misc/../sysdeps/unix/sysv/linux/x86_64/clone3.S:78
 120:                0x0 - <unknown>

Step to reproduce

  • I'm using a new website with the Duckquill theme.
  • Create a simple /content/communaute/_index.md
  • Add to the config.toml:
[extra.nav]
show_feed = true
links = [
 	{ url = "@/communaute/_index.md", name = "La communauté" },
]

Try to build the website and get the error above

@tintou tintou changed the title Crash when using accented letter as disctionary key Crash when using accented letter as dictionnary key Oct 6, 2024
@tintou tintou changed the title Crash when using accented letter as dictionnary key Crash when using accented letter in some situations Oct 6, 2024
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

No branches or pull requests

2 participants
@tintou and others