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

Panicked when slice emoji in interactive mode #14810

Closed
skanehira opened this issue Jun 7, 2022 · 1 comment
Closed

Panicked when slice emoji in interactive mode #14810

skanehira opened this issue Jun 7, 2022 · 1 comment
Labels
bug Something isn't working inspector related to the inspector integration

Comments

@skanehira
Copy link
Contributor

Summary

Deno has panicked when run bellow code at interactive mode.

const str = "🌍🤖😸🎉";
console.log(str.slice(0,3));

Error message

root@523db2214abf:/# RUST_BACKTRACE=1 deno
Deno 1.21.3
exit using ctrl+d or close()
> const str = "🌍🤖😸🎉";
undefined
> console.log(str.slice(0,3));
🌍�

============================================================
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.21.3
Args: ["deno"]

thread 'main' panicked at 'called `Result::unwrap()` on an `Err` value: Error("unexpected end of hex escape", line: 1, column: 113)', /home/runner/work/deno/deno/core/inspector.rs:724:66
stack backtrace:
   0: rust_begin_unwind
             at ./rustc/9d1b2106e23b1abd32fce1f17267604a5102f57a/library/std/src/panicking.rs:498:5
   1: core::panicking::panic_fmt
             at ./rustc/9d1b2106e23b1abd32fce1f17267604a5102f57a/library/core/src/panicking.rs:116:14
   2: core::result::unwrap_failed
             at ./rustc/9d1b2106e23b1abd32fce1f17267604a5102f57a/library/core/src/result.rs:1690:5
   3: core::result::Result<T,E>::unwrap
   4: <core::future::from_generator::GenFuture<T> as core::future::future::Future>::poll
   5: <futures_util::future::select::Select<A,B> as core::future::future::Future>::poll
   6: <core::future::from_generator::GenFuture<T> as core::future::future::Future>::poll
   7: <core::future::from_generator::GenFuture<T> as core::future::future::Future>::poll
   8: <core::future::from_generator::GenFuture<T> as core::future::future::Future>::poll
   9: <core::future::from_generator::GenFuture<T> as core::future::future::Future>::poll
  10: <core::future::from_generator::GenFuture<T> as core::future::future::Future>::poll
  11: deno::tools::repl::run::{{closure}}
  12: <core::future::from_generator::GenFuture<T> as core::future::future::Future>::poll
  13: deno::main::{{closure}}
  14: <core::future::from_generator::GenFuture<T> as core::future::future::Future>::poll
  15: deno_runtime::tokio_util::run_basic
  16: deno::main
note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.
root@523db2214abf:/#

But when I run code from stdin, it looks work fine.

root@8bf9e7714971:/# deno run - < `tty`
const str = "🌍🤖😸🎉";
console.log(str.slice(0,3));
🌍�
root@8bf9e7714971:/#

Environments

root@8bf9e7714971:/# uname -a
Linux 8bf9e7714971 5.10.104-linuxkit #1 SMP PREEMPT Thu Mar 17 17:05:54 UTC 2022 x86_64 GNU/Linux
@bartlomieju bartlomieju added bug Something isn't working inspector related to the inspector integration labels Jun 7, 2022
@lucacasonato
Copy link
Member

lucacasonato commented Jun 7, 2022

Duplicate of #12226

@lucacasonato lucacasonato marked this as a duplicate of #13482 Jun 7, 2022
@lucacasonato lucacasonato marked this as a duplicate of #12226 Jun 7, 2022
@lucacasonato lucacasonato marked this as not a duplicate of #13482 Jun 7, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working inspector related to the inspector integration
Projects
None yet
Development

No branches or pull requests

3 participants