Model Editor in Infinite Loading State with no error message

Đang mở
#3,642 1 bình luận 0 reaction 0 người được giao Xem trên GitHub

Chưa có ai nhận issue này.

Đánh giá

Độ khó
4/5
Thời gian dự kiến
3-5 ngày
Mức phù hợp với người mới
38/100
Loại issue
Lỗi
Độ rõ ràng
Khá rõ ràng
Mức độ hoạt động
Đình trệ
Công nghệ
typescript, vscode

Hướng nghiên cứu

Bắt đầu bằng cách tái hiện hai kịch bản với ứng dụng Java mẫu được liên kết, sau đó kiểm tra luồng Model Editor và các log của extension và CodeQL Query Server xung quanh ApplicationModeEndpoints.ql và FrameworkModeEndpoints.ql. Công việc được xem là hoàn tất khi cả hai trường hợp lỗi đều hiển thị một lỗi hữu ích thay vì để bảng điều khiển lập mô hình Java tải vô thời hạn.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

bug VSCode

Describe the bug
Under some specific circumstance(s) the model editor gets into an infinite loading state, with no error message about what has gone wrong.

Version
The CodeQL and VS Code version in which the bug occurs.

VSCode CodeQL Extension version - v1.13.1
CodeQL CLI versions tested with: 2.16.3, 2.17.1, 2.17.4, 2.17.5

To reproduce
There are 2 scenarios where I have observed this. In scenario 1 , I admit that I am aware of the fact that the database has a missing file, and then perhaps this behaviour makes sense? (though I still think it would be hard to debug without an error message). In scenario 2, I do not know what the underlying issue is.

Both scenarios use the sample Java app in this repo

Scenario 1)

  1. perform:
javac SampleInner.java
codeql database create -l java databasenoinnerpresent --command='javac Sample.java'

successfully creates a database with no SampleInner.java file (probably this causes the silent error?)

  1. load the database into the editor
  2. open the model editor

end of CodeQL Query Server log shows:

[2024-06-17 16:31:43] (1s) Unpausing evaluation
[2024-06-17 16:31:43] Evaluation of /Users/knewbury/.codeql/packages/codeql/java-queries/1.0.1/utils/modeleditor/ApplicationModeEndpoints.ql produced BQRS results.

CodeQL Extension log tail:

CLI command succeeded.
Reading bqrs data using CodeQL CLI: bqrs decode -v --log-to-stderr --format json --entities=url,string --result-set #select /var/folders/2k/tdmj1d890_30b043s71nvt300000gn/T/queries_-16970-NvOnULt5vTtW/model-editor-results/ApplicationModeEndpoints.ql-48t4dwCRwNoDw-qj70hyb/results.bqrs...

CLI command succeeded.

Scenario 2)

  1. perform:
javac SampleInner.java
codeql database create -l java databaseinnerpresent --command='javac -cp . Sample.java'

successfully creates a database with both, as expected, Sample.java and SampleInner.java file

  1. load the database into the editor
  2. open the model editor
  3. select "Model as Dependency"

end of CodeQL Query Server log shows:

[2024-06-17 16:16:50] (0s) Unpausing evaluation
[2024-06-17 16:16:50] Evaluation of /Users/knewbury/.codeql/packages/codeql/java-queries/1.0.1/utils/modeleditor/FrameworkModeEndpoints.ql produced BQRS results.

CodeQL Extension log tail:

CLI command succeeded.
Reading bqrs data using CodeQL CLI: bqrs decode -v --log-to-stderr --format json --entities=url,string --result-set #select /var/folders/2k/tdmj1d890_30b043s71nvt300000gn/T/queries_-16970-NvOnULt5vTtW/model-editor-results/FrameworkModeEndpoints.ql-IAvaxSoFVfUsZFMsOlDMj/results.bqrs...

CLI command succeeded.

both yield a infinite Modelling Java panel like:

Image

Expected behavior
I expect a failure message to display so that the reasons for the hang can be fixed (ie if there is something wrong with a database then how would a user know that unless there is some error message). I am not currently sure why I cannot model the database in the example as a dependency...

Additional context
Add any other context about the problem here.

Ngôn ngữ chính
TypeScript
Star
539
Fork
240
Merge trung bình
2 ngày 6 giờ
Pull request đã merge (30 ngày)
29

Hướng dẫn đóng góp

Mở hướng dẫn đóng góp

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của github/vscode-codeql

Tất cả issue của github/vscode-codeql

Issue tương tự

Thêm issue về TypeScript

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.