Open ushi-as opened 1 month ago
Hi!
We recently noticed that MRML is panicking, when we use <mj-divider> inside <mj-text>. It is reproducable with the following MJML:
<mj-divider>
<mj-text>
<mjml> <mj-body> <mj-section> <mj-column> <mj-text> <mj-divider></mj-divider> </mj-text> </mj-column> </mj-section> </mj-body> </mjml>
It panics with:
thread 'main' panicked at mrml-4.0.1/src/mj_divider/render.rs:34:61: called `Option::unwrap()` on a `None` value stack backtrace: 0: 0x5a5d9fb00ff5 - <std::sys_common::backtrace::_print::DisplayBacktrace as core::fmt::Display>::fmt::h5380d7966cb17a9f 1: 0x5a5d9fb28bd3 - core::fmt::write::h6fa818808d2fec0f 2: 0x5a5d9fafdc5f - std::io::Write::write_fmt::hbfd4c6dab598cc2c 3: 0x5a5d9fb00e00 - std::sys_common::backtrace::print::hb21cc8c989d23e92 4: 0x5a5d9fb020b5 - std::panicking::default_hook::{{closure}}::h51c1387cbe610b14 5: 0x5a5d9fb01e0d - std::panicking::default_hook::hb83d6607ca85d71e 6: 0x5a5d9fb02544 - std::panicking::rust_panic_with_hook::h31c39679964b4a51 7: 0x5a5d9fb023eb - std::panicking::begin_panic_handler::{{closure}}::hc9bfccb70659e9b8 8: 0x5a5d9fb014e9 - std::sys_common::backtrace::__rust_end_short_backtrace::h075f1cf7d2316222 9: 0x5a5d9fb02177 - rust_begin_unwind 10: 0x5a5d9f7d01e3 - core::panicking::panic_fmt::hd482fa9e8da4b1ed 11: 0x5a5d9f7d028c - core::panicking::panic::h5ebb97ce3fdc8cc6 12: 0x5a5d9f7d0189 - core::option::unwrap_failed::h95d864315f6c4c63 13: 0x5a5d9f958452 - mrml::mj_divider::render::<impl mrml::prelude::render::Renderer<mrml::mj_divider::MjDivider,()>>::get_outlook_width::ha459ee01adf0ba30 14: 0x5a5d9f9587b2 - mrml::mj_divider::render::<impl mrml::prelude::render::Render for mrml::prelude::render::Renderer<mrml::mj_divider::MjDivider,()>>::render::h02e7c4d8e0080e40 15: 0x5a5d9f97d627 - mrml::mj_text::render::<impl mrml::prelude::render::Renderer<mrml::mj_text::MjText,()>>::render_content::hb2b3fd75d53f76b8 16: 0x5a5d9f97dd24 - mrml::mj_text::render::<impl mrml::prelude::render::Render for mrml::prelude::render::Renderer<mrml::mj_text::MjText,()>>::render::h40d6a44d6d78893b 17: 0x5a5d9f95597b - mrml::mj_column::render::<impl mrml::prelude::render::Renderer<mrml::mj_column::MjColumn,mrml::mj_column::render::MjColumnExtra>>::render_column::h654dc8e691f00fca 18: 0x5a5d9f957b7b - mrml::mj_column::render::<impl mrml::prelude::render::Render for mrml::prelude::render::Renderer<mrml::mj_column::MjColumn,mrml::mj_column::render::MjColumnExtra>>::render::h30506b30a7e4c00c 19: 0x5a5d9f96fa2e - mrml::mj_section::render::SectionLikeRender::render_wrapped_children::hb82e5e6f22d3ccce 20: 0x5a5d9f973327 - mrml::mj_section::render::SectionLikeRender::render_section::h3fc4e8da1c3d07f2 21: 0x5a5d9f975800 - mrml::mj_section::render::<impl mrml::prelude::render::Render for mrml::prelude::render::Renderer<mrml::mj_section::MjSection,()>>::render::hbb6f58df474c31b4 22: 0x5a5d9f944813 - mrml::mj_body::render::<impl mrml::prelude::render::Render for mrml::prelude::render::Renderer<mrml::mj_body::MjBody,()>>::render::h01322d76b229c5e4 23: 0x5a5d9f9824bc - mrml::mjml::render::<impl mrml::prelude::render::Render for mrml::prelude::render::Renderer<mrml::mjml::Mjml,()>>::render::h6e38890b7ff5b7e6 24: 0x5a5d9f92aac9 - mrml::mjml::render::<impl mrml::mjml::Mjml>::render::h91b9362809157b27 25: 0x5a5d9f7f42e2 - mrml::main::h4221d81053c67f42 26: 0x5a5d9f8219a3 - std::sys_common::backtrace::__rust_begin_short_backtrace::h2e892df33ae86956 27: 0x5a5d9f8316a9 - std::rt::lang_start::{{closure}}::h542e0133c458501e 28: 0x5a5d9faf737f - std::rt::lang_start_internal::h0ae654f50e15aeea 29: 0x5a5d9f7f8f55 - main 30: 0x70f505b21e08 - <unknown> 31: 0x70f505b21ecc - __libc_start_main 32: 0x5a5d9f7d0895 - _start 33: 0x0 - <unknown>
The Javascript implemention renders it without errors.
Hi!
We recently noticed that MRML is panicking, when we use
<mj-divider>
inside<mj-text>
. It is reproducable with the following MJML:It panics with:
The Javascript implemention renders it without errors.