termux-app icon indicating copy to clipboard operation
termux-app copied to clipboard

[Bug]: Large amount of invisible unicode characters causes freeze and crash

Open Kimapr opened this issue 1 year ago • 1 comments

Problem description

Printing a specific file to terminal freezes and crashes Termux. The file is valid UTF-8 but contains large amounts of various invisible Unicode characters, including zero-width spaces, word joiners, variant selectors, etc.

Steps to reproduce the behavior.

  1. Download https://kimapr.net/lappy/matroska.js
  2. Print it to the terminal using cat or similar

What is the expected behavior?

Termux does not freeze or crash

System information

  • Termux application version: 0.118.0
  • Android OS version: 11
  • Device model: TECNO Spark 8C KG5j

Kimapr avatar Feb 16 '24 07:02 Kimapr

Sent #3840 with a fix for the crash, but there's still something asymptotically disastrous going on here. I gave it 15+ minutes trying to print the bad line before ^C.

tstein avatar Feb 16 '24 08:02 tstein