fix(examples): make_code.py contradicts the documented UI import order
維護者通常 2 天內回覆
還沒有人認領這個 Issue。
評估
- 難度
- 1/5
- 預估耗時
- 1 小時以內
- 新手友好度
- 85/100
- Issue 類型
- 缺陷
- 描述清晰度
- 描述清楚
- 活躍度
- 活躍
- 技術堆疊
- python
研究方向
搭配 python/examples/README.md 閱讀「UI Plugins」中的 docs/dev/plugins.md,接著檢查 python/examples/make_code.py:10–11 的 imports。更新範例,使其遵循文件記載的 imports 順序,同時保留「Make Code」動作和 renderer 的行為。範例呈現文件記載的順序即為完成;此 issue 並未指出有執行階段故障或需要修正的問題。
由索引模型根據 Issue 內容生成。
描述
Summary
The make_code.py GUI plugin example imports PySide6.QtGui before binaryninjaui, reversing the order that the UI plugin guide tells Python UI plugins to always use. This report concerns the example's inconsistency with that guidance. It does not claim that this example crashes or that it loads an incorrect Qt library in a current installation.
Runtime or environment
- Binary Ninja source: latest published release
stable/6.0.10905, commit775c3b5eed8598217b20e1087afe7aa092a9b4b1; current default branchdev, commit74749a72a606532e3984b605518bd49094020699. - Edition, OS, OS version, CPU architecture: not applicable to this source/documentation comparison. No Binary Ninja runtime was executed for this report.
Steps to reproduce
- At either source baseline, read the Python UI plugin import-order rule in
docs/dev/plugins.md, under “UI Plugins.” - Read
python/examples/README.md, which listsmake_code.pyunder “GUI Plugins” and says these plugins require the UI to be running. - Compare the rule with the consecutive imports at
python/examples/make_code.py:10–11.
These source-inspection steps were performed on both baselines. No GUI or headless execution steps are asserted as reproduced.
Expected behavior
An official example identified as a Python GUI plugin demonstrates the import order documented for Python UI plugins: binaryninjaui before PySide6. The guide states this rule for UI plugins themselves; it does not document a GUI-context exemption.
Actual behavior
Both source baselines contain the same example bytes, including:
import sys
from PySide6.QtGui import QKeySequence
from binaryninjaui import UIActionHandler, UIAction, UIActionContext
The example is intended to run in the GUI. Whether binaryninjaui or the appropriate PySide bindings have already been imported in any particular GUI session was not measured. No resulting runtime failure, incorrect library selection, or crash is established here.
Evidence
- Expected source: UI Plugins guidance, which requires the opposite order for Python UI plugins.
- Failure source: make_code.py imports.
- Evidence provenance: static
- Local verification: static-proof
- Reproduction completeness: complete
Runtime reproduction was not run. This is a direct comparison of the release and default-branch source artifacts. The examples README identifies this file as a GUI plugin, establishing the scope of the documented convention. An AST inspection confirmed the consecutive import order in both source baselines. The proof establishes the example/guidance discrepancy only.
Restoration check
Compare this example with the UI plugin guide again: the example should demonstrate the documented import order, or the guidance should state an applicable supported exception. Preserve the example's “Make Code” action and renderer behavior. A successful comparison should not be presented as proof that a runtime crash has been fixed.
References
Issue #3196 introduced the UI plugin best-practice documentation and is closed as completed. This report concerns the example that still uses the contrary order, not missing best-practice documentation or a reproduced recurrence of an old crash.
Triage assessment
- Impact level: P3
- Assessment status: supported
- Impact basis: The official GUI plugin example contradicts an explicit documentation convention. This is an example consistency/cleanup defect; consequential runtime impact has not been demonstrated.
- Workaround status: available
- Workaround basis: Readers can follow the documented import order when adapting the example. The documented order is directly available in the same repository; no runtime fix or crash workaround is claimed.
- 主要語言
- C++
- 星號
- 1.3k
- 分支
- 304
- 平均合併
- 2 天 20 小時
- 30 天內合併 PR
- 10
環境準備
這個專案沒有提供開發容器、Dockerfile 或貢獻指南,環境需要你自己搭建:先看它的 README,通用步驟見我們的新手貢獻指南。
從這裡開始
- 先讀完整個 Issue,再讀專案的貢獻指南。
- 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
- Fork 儲存庫,在一個分支上完成修改。
- 送出 Pull Request,並在描述裡引用這個 Issue 編號。
Vector35/binaryninja-api 的其他 Issue
-
難度 1/5 1 小時以內 新手友好度 84/100
Vector35/binaryninja-api#8715 ·
維護者通常 2 天內回覆
-
難度 2/5 1-3 小時 新手友好度 78/100
Vector35/binaryninja-api#8714 ·
維護者通常 2 天內回覆
-
難度 1/5 1-3 小時 新手友好度 78/100
Vector35/binaryninja-api#8689 ·
維護者通常 2 天內回覆
-
Component: Python API
難度 2/5 1-3 小時 新手友好度 70/100
Vector35/binaryninja-api#8649 ·
維護者通常 2 天內回覆
-
難度 2/5 1-3 小時 新手友好度 72/100
Vector35/binaryninja-api#8621 · 1 則留言 ·
維護者通常 2 天內回覆
查看 Vector35/binaryninja-api 的全部 Issue
相似的 Issue
-
Bug Core VIF
難度 2/5 1-3 小時 新手友好度 68/100
維護者通常 1 天內回覆
-
難度 2/5 1-3 小時 新手友好度 80/100
ESPresense/ESPresense#2680 · 2 則留言 ·
維護者通常 1 天內回覆
-
難度 2/5 1 小時以內 新手友好度 75/100
stew675/llama-cpp-rdna-boosts#348 ·
維護者通常 1 天內回覆
-
Documentation: Add comprehensive newcomer onboarding guide, project structure, and local usage to README可能已有人在做 @Ash-Blanc 今天認領。 未關閉area/other status/bot-triaged status/need-triage
難度 2/5 半天 新手友好度 85/100
-
bug
難度 1/5 1 小時以內 新手友好度 85/100
維護者通常 1 天內回覆