redhat-developer / redhat-developer/vscode-java

TypeError: Cannot read property 'rows' of undefined

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

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

bug
主要言語
TypeScript
スター
2.3k
フォーク
546
平均マージ
20時間 1分
マージ済み PR(30日)
11

説明

Whenever I open my project, the extension fails with:

ERR Cannot read property 'rows' of undefined: TypeError: Cannot read property 'rows' of undefined
    at u.open (/home/x/.vscode/extensions/redhat.java-0.76.0/dist/extension.js:15:69804)
    at S.startSendingEvents (/usr/share/code/resources/app/out/vs/workbench/services/extensions/node/extensionHostProcess.js:88:32770)
    at u._setupExtHostProcessListeners (/usr/share/code/resources/app/out/vs/workbench/services/extensions/node/extensionHostProcess.js:88:37551)
    at u.attachPtyToTerminal (/usr/share/code/resources/app/out/vs/workbench/services/extensions/node/extensionHostProcess.js:88:34952)
    at S.$onDidStartTask (/usr/share/code/resources/app/out/vs/workbench/services/extensions/node/extensionHostProcess.js:90:46370)
    at processTicksAndRejections (internal/process/task_queues.js:97:5)

I inspected the extensions file and it seems that e is undefined:

open(e){
   s.serverTasks.suggestTaskEntrySize(e.rows-1);
   const t=s.serverTasks.getHistory();
   this.printTasks(t)
}

and then after a few seconds:

ERR The request (id: 1, method: 'textDocument/documentSymbol') has been cancelled: Error: The request (id: 1, method: 'textDocument/documentSymbol') has been cancelled
    at /home/x/.vscode/extensions/redhat.java-0.76.0/dist/extension.js:1:76464
    at /home/x/.vscode/extensions/redhat.java-0.76.0/dist/extension.js:1:76758
    at Immediate.<anonymous> (/home/x/.vscode/extensions/redhat.java-0.76.0/dist/extension.js:1:77117)
    at processImmediate (internal/timers.js:456:21)

Here are some info messages it shows before:

{
  message: 'Starting Java server with: /usr/lib/jvm/java-11-openjdk-amd64/bin/java --add-modules=ALL-SYSTEM --add-opens java.base/java.util=ALL-UNNAMED --add-opens java.base/java.lang=ALL-UNNAMED -Declipse.application=org.eclipse.jdt.ls.core.id1 -Dosgi.bundles.defaultStartLevel=4 -Declipse.product=org.eclipse.jdt.ls.core.product -Dfile.encoding=utf8 -XX:+UseParallelGC -XX:GCTimeRatio=4 -XX:AdaptiveSizePolicyWeight=90 -Dsun.zip.disableMemoryMapping=true -Xmx1G -Xms100m -javaagent:/home/x/.vscode/extensions/gabrielbb.vscode-lombok-1.0.1/server/lombok.jar -noverify -jar /home/x/.vscode/extensions/redhat.java-0.76.0/server/plugins/org.eclipse.equinox.launcher_1.6.100.v20201223-0822.jar -configuration /home/x/.config/Code/User/globalStorage/redhat.java/0.76.0/config_ss_linux -data /home/x/.config/Code/User/workspaceStorage/dfcb4a389a57c5e007b1c06673447101/redhat.java/ss_ws',
  level: 'info',
  timestamp: '2021-03-22 10:41:18.617'
}
{
  message: 'Starting Java server with: /usr/lib/jvm/java-11-openjdk-amd64/bin/java --add-modules=ALL-SYSTEM --add-opens java.base/java.util=ALL-UNNAMED --add-opens java.base/java.lang=ALL-UNNAMED -Declipse.application=org.eclipse.jdt.ls.core.id1 -Dosgi.bundles.defaultStartLevel=4 -Declipse.product=org.eclipse.jdt.ls.core.product -Dfile.encoding=utf8 -XX:+UseParallelGC -XX:GCTimeRatio=4 -XX:AdaptiveSizePolicyWeight=90 -Dsun.zip.disableMemoryMapping=true -Xmx1G -Xms100m -javaagent:/home/x/.vscode/extensions/gabrielbb.vscode-lombok-1.0.1/server/lombok.jar -noverify -jar /home/x/.vscode/extensions/redhat.java-0.76.0/server/plugins/org.eclipse.equinox.launcher_1.6.100.v20201223-0822.jar -configuration /home/x/.config/Code/User/globalStorage/redhat.java/0.76.0/config_linux -data /home/x/.config/Code/User/workspaceStorage/dfcb4a389a57c5e007b1c06673447101/redhat.java/jdt_ws',
  level: 'info',
  timestamp: '2021-03-22 10:41:18.689'
}

This previously worked so I'm not sure what changed.

Environment
  • Operating System: Debian GNU/Linux 10 (buster)
  • JDK version: OpenJDK Java 11 AMD64, project JDK: 1.8
  • Visual Studio Code version: 1.54.3
  • Java extension version: 0.76.0

コントリビューションガイド

コントリビューションガイドを開く

はじめの一歩

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

調査の方向性

redhat.java 0.76.0 のバンドルされた extension.js に報告されているスタックトレースから始め、記載された VS Code と Java のバージョンでプロジェクトを開いたときに失敗を再現してください。open(e) 周辺のタスク起動パスを追跡し、その引数が undefined である理由を特定してください。プロジェクトを開いても rows TypeError が発生せず、その後の document-symbol リクエストがキャンセルされなければ完了です。

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

評価

技術スタック
java, typescript, vscode
領域
developer-experience, tooling
issue の種類
バグ
難易度
3/5
見積もり時間
1〜2日
活発さ
停滞
明瞭さ
説明が足りない
初心者へのやさしさ
30/100

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

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