Coder Social home page Coder Social logo

Comments (4)

dsherret avatar dsherret commented on July 18, 2024 1

Thanks, I was able to reproduce it by saving that file as UTF8 w/ BOM.

from deno.

dsherret avatar dsherret commented on July 18, 2024

Can you provided that file so we can try to reproduce it? (the one with const font = 'A)

from deno.

punarinta avatar punarinta commented on July 18, 2024

Thank you for looking into this!

Here's the file (rename it to .js, GitHub doesn't allow attaching JS files).
Roboto-normal.js.txt

I'm still trying to get a minimal reproducible example, the file alone does not cause a crash, neither does a setup with its parent file included. 🤔

The file can be simplified down to this, and it would still cause a linter crash:

console.log('Hello')

from deno.

punarinta avatar punarinta commented on July 18, 2024

Well, I'm out of clues. Here's a run with RUST_BACKTRACE=full, and I really hope it will help. 😓

============================================================
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: linux x86_64
Version: 1.44.1
Args: ["deno", "lint"]

thread 'tokio-runtime-worker' panicked at /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/dprint-swc-ext-0.16.0/src/common/pos.rs:348:3:
byte index 22 is out of bounds of `console.log('Hello')
`
stack backtrace:
   0:     0x5b8221b1b956 - <std::sys_common::backtrace::_print::DisplayBacktrace as core::fmt::Display>::fmt::h410d4c66be4e37f9
   1:     0x5b8221b503f0 - core::fmt::write::he40921d4802ce2ac
   2:     0x5b8221b14f0f - std::io::Write::write_fmt::h5de5a4e7037c9b20
   3:     0x5b8221b1b734 - std::sys_common::backtrace::print::h11c067a88e3bdb22
   4:     0x5b8221b1d4a7 - std::panicking::default_hook::{{closure}}::h8c832ecb03fde8ea
   5:     0x5b8221b1d209 - std::panicking::default_hook::h1633e272b4150cf3
   6:     0x5b8222080cdb - deno::setup_panic_hook::{{closure}}::hb87cb8d0a0de7d22
   7:     0x5b8221b1db36 - std::panicking::rust_panic_with_hook::hb164d19c0c1e71d4
   8:     0x5b8221b1d882 - std::panicking::begin_panic_handler::{{closure}}::h0369088c533c20e9
   9:     0x5b8221b1be56 - std::sys_common::backtrace::__rust_end_short_backtrace::hc11d910daf35ac2e
  10:     0x5b8221b1d5d4 - rust_begin_unwind
  11:     0x5b8221b4d485 - core::panicking::panic_fmt::ha6effc2775a0749c
  12:     0x5b8221b542a1 - core::str::slice_error_fail_rt::hae2b0a3e014351e1
  13:     0x5b8221b54087 - core::str::slice_error_fail::he2ff12236fb0c056
  14:     0x5b822242f8f1 - core::str::traits::<impl core::ops::index::Index<I> for str>::index::h18de035b74d078fc
  15:     0x5b822246776b - <deno_lint::rules::no_irregular_whitespace::NoIrregularWhitespace as deno_lint::rules::LintRule>::lint_program_with_ast_view::{{closure}}::h3ceb7ce647f3b09e
  16:     0x5b82224676fd - <deno_lint::rules::no_irregular_whitespace::NoIrregularWhitespace as deno_lint::rules::LintRule>::lint_program_with_ast_view::h5c6821462f44342f
  17:     0x5b822245337f - deno_lint::linter::Linter::lint_inner::{{closure}}::hc81626a0fdc25254
  18:     0x5b8222403868 - dprint_swc_ext::view::generated::with_ast_view::h5c74fecdefc5c926
  19:     0x5b822243f483 - deno_ast::parsed_source::ParsedSource::with_view::h91ae2d9cd20057c2
  20:     0x5b8222452349 - deno_lint::linter::Linter::lint_inner::h909fca0dbe10943a
  21:     0x5b822245211e - deno_lint::linter::Linter::lint_file::habd37c4f2355f8c8
  22:     0x5b8221cc214b - tokio::runtime::task::raw::poll::h0eed1f92085203d2
  23:     0x5b8223c791b0 - std::sys_common::backtrace::__rust_begin_short_backtrace::h8f8c32a0a9ac8984
  24:     0x5b8223c7a726 - core::ops::function::FnOnce::call_once{{vtable.shim}}::h46e9db3577820a3b
  25:     0x5b8221b242d5 - std::sys::pal::unix::thread::Thread::new::thread_start::h3631815ad38387d6
  26:     0x7ff84f894ac3 - start_thread
                               at ./nptl/pthread_create.c:442:8
  27:     0x7ff84f926850 - __GI___clone3
                               at ./misc/../sysdeps/unix/sysv/linux/x86_64/clone3.S:81
  28:                0x0 - <unknown>

from deno.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.