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

bug: long html cause deno fmt to panic #26744

Closed
BlowaterNostr opened this issue Nov 5, 2024 · 3 comments · Fixed by #27164
Closed

bug: long html cause deno fmt to panic #26744

BlowaterNostr opened this issue Nov 5, 2024 · 3 comments · Fixed by #27164
Labels
deno fmt Related to the "deno fmt" subcommand or dprint needs info needs further information to be properly triaged panic

Comments

@BlowaterNostr
Copy link

Deno has panicked. This is a bug in Deno. Please report this
at https://github.com/denoland/deno/issues/new.
If you can reliably reproduce this panic, include the
reproduction steps and re-run with the RUST_BACKTRACE=1 env
var set and include the backtrace in your report.

Platform: macos aarch64
Version: 2.0.4
Args: ["deno", "fmt"]

thread 'tokio-runtime-worker' panicked at cli/tools/fmt.rs:792:11:
Formatting not stable. Bailed after 5 tries. This indicates a bug in the formatter where it formats the file (a super long html) differently each time. As a temporary workaround you can ignore this file.
stack backtrace:
0: 0x103bb7fa8 - <std::sys::backtrace::BacktraceLock::print::DisplayBacktrace as core::fmt::Display>::fmt::h243268f17d714c7f
1: 0x102c65fd8 - core::fmt::write::hb3cfb8a30e72d7ff
2: 0x103b8736c - std::io::Write::write_fmt::hfb2314975de9ecf1
3: 0x103bba310 - std::panicking::default_hook::{{closure}}::h14c7718ccf39d316
4: 0x103bb9e64 - std::panicking::default_hook::hc62e60da3be2f352
5: 0x102b8837c - deno::setup_panic_hook::{{closure}}::h61fd774b4bec764f
6: 0x103bbb23c - std::panicking::rust_panic_with_hook::h09e8a656f11e82b2
7: 0x103bbaca4 - std::panicking::begin_panic_handler::{{closure}}::h1230eb3cc91b241c
8: 0x103bbac18 - std::sys::backtrace::__rust_end_short_backtrace::hc3491307aceda2c2
9: 0x103bbac0c - _rust_begin_unwind
10: 0x102c64500 - core::panicking::panic_fmt::ha4b80a05b9fff47a
11: 0x10291a684 - tokio::runtime::task::raw::poll::h30c25fa47e711b32
12: 0x103c9d3b8 - std::sys::backtrace::__rust_begin_short_backtrace::h220bb53afb6deb29
13: 0x103c9d108 - core::ops::function::FnOnce::call_once{{vtable.shim}}::ha38053a920de994d
14: 0x103bbe8c8 - std::sys::pal::unix::thread::Thread::new::thread_start::h1bd1b9c95010bf71
15: 0x1824ee034 - __pthread_joiner_wake
make: *** [fmt] Error 1

@BlowaterNostr BlowaterNostr changed the title long html cause deno fmt to panic bug: long html cause deno fmt to panic Nov 5, 2024
@BlowaterNostr
Copy link
Author

this html has > 400K characters

@bartlomieju
Copy link
Member

Could you please paste the contents of the HTML file into a gist and link here? I have a feeling this is the same issue as #26560, but I want to confirm it

@bartlomieju bartlomieju added needs info needs further information to be properly triaged deno fmt Related to the "deno fmt" subcommand or dprint panic labels Nov 5, 2024
@bartlomieju
Copy link
Member

Most likely related to dprint/dprint-plugin-typescript#678.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
deno fmt Related to the "deno fmt" subcommand or dprint needs info needs further information to be properly triaged panic
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants