microsoft / microsoft/vscode-java-debug

Spring Application wrong starting behavior

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

@testforstephen がすでに取り組んでいます。

2021年12月15日 から。

ai-triaged bug jdk launch
主要言語
TypeScript
スター
591
フォーク
429
平均マージ
1日 9時間
マージ済み PR(30日)
19

説明

When configuring the launch.json for a Spring gradle based application I sometimes cannot run the application with command-line arguments.

Example configuration:
{
"type": "java",
"name": "DEBUG config",
"request": "launch",
"mainClass": "MyMainClass",
"projectName": "serverProject",
"vmArgs": "-DsomeVmArgument=true",
"args": "--commandLineArgument"
}

When creating a configuration I sometimes need to add command-line arguments. Those are written in the "args" section. The issue is that when I add this args section the app sometimes starts and sometimes doesn't. The error message is in general non existent or I get an error like the following:
"A fatal error has been detected by the Java Runtime Environment:

EXCEPTION_ACCESS_VIOLATION (0xc0000005) at pc=0x00007ffa20966639, pid=17536, tid=11700

JRE version: OpenJDK Runtime Environment (11.0.2+9) (build 11.0.2+9)
Java VM: OpenJDK 64-Bit Server VM (11.0.2+9, mixed mode, tiered, compressed oops, g1 gc, windows-amd64)
Problematic frame:
V [jvm.dll+0x6c6639]

No core dump will be written. Minidumps are not enabled by default on client versions of Windows

An error report file with more information is saved as:
D:...Path to project directory...\hs_err_pid17536.log

If you would like to submit a bug report, please visit:
http://bugreport.java.com/bugreport/crash.jsp"

If I do not have args and just use replacement vmargs the application works all the time.

Environment
Operating System: Windows 10
JDK version: 11.0.2
Visual Studio Code version: 1.62.3
Java extension pack version: 0.19.0
Java language support extension version: 1.1.0
Java Debugger extension version: 0.37.0
Steps To Reproduce
Create a large Spring project based on gradle
Create a launch configuration
Add the args section in the launch configuration
Current Result
The app sometimes does not start. When it starts it works flawlessly.

Expected Result
The app should always start.

Additional Information
The project I am working on is a large one with many subprojects. The code is private. As such I cannot provide it as an example. The issue may be hard to reproduce on other projects, as it has a strange behavior.

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

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

はじめの一歩

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

評価

この issue はまだ評価されていません。

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

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