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

πŸ› Playground: typing special Unicode (Korean, Chinese, …) characters can crash the editor #1788

Closed
1 task done
xnuk opened this issue Feb 11, 2024 · 4 comments
Labels
A-Website Area: website S-Bug-confirmed Status: report has been confirmed as a valid bug S-Help-wanted Status: you're familiar with the code base and want to help the project

Comments

@xnuk
Copy link

xnuk commented Feb 11, 2024

Environment information

Firefox 123 and/or Chromium 121, with:

  • Arch Linux x64
  • swaywm 1.8.1
  • kime 3.0.2 (word_commit: false)

What happened?

For non-Korean users: try to add colon(:) at the end of the source code from here, and get a crash: https://biomejs.dev/playground/?code=SMVVsVjVOMGUxg%3D%3D

test.mp4
RangeError: Invalid position 34 in document of length 25
    lineAt https://biomejs.dev/_astro/PlaygroundLoader.660c0941.js:1
    YL https://biomejs.dev/_astro/PlaygroundLoader.660c0941.js:22
    update https://biomejs.dev/_astro/PlaygroundLoader.660c0941.js:22
    update https://biomejs.dev/_astro/PlaygroundLoader.660c0941.js:4
    applyTransaction https://biomejs.dev/_astro/PlaygroundLoader.660c0941.js:4
    yc https://biomejs.dev/_astro/PlaygroundLoader.660c0941.js:4
    ve https://biomejs.dev/_astro/PlaygroundLoader.660c0941.js:4
    applyTransaction https://biomejs.dev/_astro/PlaygroundLoader.660c0941.js:4
    get state https://biomejs.dev/_astro/PlaygroundLoader.660c0941.js:4
    update https://biomejs.dev/_astro/PlaygroundLoader.660c0941.js:9
    _dispatch https://biomejs.dev/_astro/PlaygroundLoader.660c0941.js:9
    dispatch https://biomejs.dev/_astro/PlaygroundLoader.660c0941.js:9
    Fr https://biomejs.dev/_astro/PlaygroundLoader.660c0941.js:23
    Tf https://biomejs.dev/_astro/client-v17.3be7a2b8.js:23
    unstable_runWithPriority https://biomejs.dev/_astro/client-v17.3be7a2b8.js:8
    on https://biomejs.dev/_astro/client-v17.3be7a2b8.js:19
    Xe https://biomejs.dev/_astro/client-v17.3be7a2b8.js:23
    Pf https://biomejs.dev/_astro/client-v17.3be7a2b8.js:23
    Yr https://biomejs.dev/_astro/client-v17.3be7a2b8.js:8
    onmessage https://biomejs.dev/_astro/client-v17.3be7a2b8.js:8
    EventHandlerNonNull* https://biomejs.dev/_astro/client-v17.3be7a2b8.js:8
    <anonymous> https://biomejs.dev/_astro/client-v17.3be7a2b8.js:8

Writing #1786, I found this issue. The editor is not good at Korean maybe? Also you can make some new errors if you tries to delete Korean characters (Firefox only I think):

 Uncaught RangeError: Position 37 is out of range for changeset of length 33
    mapPos https://biomejs.dev/_astro/PlaygroundLoader.0f4eb144.js:4
    map https://biomejs.dev/_astro/PlaygroundLoader.0f4eb144.js:5
    map https://biomejs.dev/_astro/PlaygroundLoader.0f4eb144.js:5
    update https://biomejs.dev/_astro/PlaygroundLoader.0f4eb144.js:10
    update https://biomejs.dev/_astro/PlaygroundLoader.0f4eb144.js:4
    applyTransaction https://biomejs.dev/_astro/PlaygroundLoader.0f4eb144.js:4
    yc https://biomejs.dev/_astro/PlaygroundLoader.0f4eb144.js:4
    ve https://biomejs.dev/_astro/PlaygroundLoader.0f4eb144.js:4
    applyTransaction https://biomejs.dev/_astro/PlaygroundLoader.0f4eb144.js:4
    get state https://biomejs.dev/_astro/PlaygroundLoader.0f4eb144.js:4
    update https://biomejs.dev/_astro/PlaygroundLoader.0f4eb144.js:9
    _dispatch https://biomejs.dev/_astro/PlaygroundLoader.0f4eb144.js:9
    dispatch https://biomejs.dev/_astro/PlaygroundLoader.0f4eb144.js:9
    P4 https://biomejs.dev/_astro/PlaygroundLoader.0f4eb144.js:9
    flush https://biomejs.dev/_astro/PlaygroundLoader.0f4eb144.js:9
    observer https://biomejs.dev/_astro/PlaygroundLoader.0f4eb144.js:9

Expected result

Not crashing, at least.

Code of Conduct

  • I agree to follow Biome's Code of Conduct
@xnuk
Copy link
Author

xnuk commented Feb 11, 2024

Plus, from empty playground, pasting transgender flag emoji (πŸ³οΈβ€βš§οΈ, String.fromCodePoint(0x1F3F3, 0xFE0F, 0x200D, 0x26A7, 0xFE0F)) makes crash.

@nhedger nhedger added A-Website Area: website S-Bug-confirmed Status: report has been confirmed as a valid bug labels Feb 11, 2024
@Conaclos Conaclos added the S-Help-wanted Status: you're familiar with the code base and want to help the project label Feb 13, 2024
@arendjr
Copy link
Contributor

arendjr commented Mar 6, 2024

Note there is some more useful information about this in #1941. I’m closing that one as a duplicate.

@arendjr arendjr changed the title πŸ› Playground: typing Korean characters can crush the editor πŸ› Playground: typing special Unicode (Korean, Chinese, …) characters can crash the editor Mar 6, 2024
@Sec-ant
Copy link
Member

Sec-ant commented Mar 11, 2024

This is also the same issue with #1385

@arendjr
Copy link
Contributor

arendjr commented Mar 11, 2024

Thanks, given the info there I’ll close this one as duplicate.

@arendjr arendjr closed this as not planned Won't fix, can't repro, duplicate, stale Mar 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-Website Area: website S-Bug-confirmed Status: report has been confirmed as a valid bug S-Help-wanted Status: you're familiar with the code base and want to help the project
Projects
None yet
Development

No branches or pull requests

5 participants