Micro hangs on startup (black screen) in Termux environment when termux-api is installed

オープン
#3,947 コメント 4 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 3 日以内に返信

まだ誰も着手していません。

評価

難易度
4/5
見積もり時間
3〜5日
初心者へのやさしさ
48/100
issue の種類
バグ
明瞭さ
おおむね明確
活発さ
停滞
技術スタック
android, go
領域
cli, mobile-dev

調査の方向性

まず、termux-api をインストールした Termux 環境でハングを再現し、その後、デフォルトのクリップボード処理と -clipboard internal を使った場合の起動を比較します。初期化フェーズにおけるシステムクリップボードの呼び出しを追跡し、クリップボードの動作を引き続き利用できる状態で、通常の起動がブロックされなくなったことを確認します。

索引モデルが issue の本文から書いたものです。

説明

On modern Android devices (Android 13/14, specifically tested on Poco M5), the micro editor hangs indefinitely on a black screen during the initialization phase if the termux-api package is installed in the environment. This appears to be a synchronous blocking call to the system clipboard that never receives a response from the Android OS.

Steps to Reproduce :

  1. Install Termux on an Android 13+ device.
  2. Install the micro editor: pkg install micro.
  3. Install the termux-api package: pkg install termux-api.
  4. Attempt to open any file or the editor itself: micro test.txt.

The terminal remains on a blank/black screen and does not respond to input.

Technical Diagnosis (Root Cause Analysis) : The issue is a Synchronous Blocking I/O hang. When termux-api is present, micro attempts to interface with the Android system clipboard. Due to Android's strict background execution limits and phantom process restrictions, the system call to the clipboard bridge does not return a value. Because micro does not have an internal timeout for this initialization step, the process enters a deadlock state, awaiting a response from the termux-api service that never arrives.

Workaround Found: Bypassing the system clipboard call by using the internal clipboard flag resolves the issue immediately: micro -clipboard internal [filename]

Environment :
Device: Poco M5 (Android 13/14)
Terminal: Termux
Editor Version: Latest available via pkg install (2.0.13+)
Dependency: termux-api installed.

Additional Context
Mentioning @termux for visibility, as this affects the user expericeen for developers using the Termux environment on modern Android versions. This bug appears to be an integration conflict between the editor's clboipard handling and the Termux-API bridge.

主要言語
Go
スター
29.8k
フォーク
1.4k
平均マージ
1日 12時間
マージ済み PR(30日)
2

環境構築

このプロジェクトには開発コンテナ、Dockerfile、コントリビューションガイドがありません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

micro-editor/micro のほかの issue

micro-editor/micro の issue をすべて見る

似ている issue

Go の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。