Skip to content

Bug: Read Once / Write Once 偶发触发 QFont::setPointSize<=0 并崩溃 #4

Open

Description

@luiox

现象

在 GUI 中进行变量单次读取(Read Once)或单次写入(Write Once)时,偶发出现以下错误并导致程序异常退出:

QFont::setPointSize: Point size <= 0 (-1), must be greater than 0

影响

  • 操作路径不稳定,用户无法可靠完成单次读写
  • 在调参场景中会中断当前工作流

复现线索(待进一步固化)

  1. 打开 GUI 并加载变量
  2. 选中变量后,反复触发 Read Once / Write Once
  3. 在某些操作节奏下出现字体错误并崩溃

预期行为

  • Read Once / Write Once 应始终稳定执行
  • 即使输入非法,也应只提示错误,不应触发崩溃

建议排查方向

  • 变量列表项字体状态更新路径
  • Read/Write 按钮事件触发与 UI 更新竞态
  • QWidget/QListWidgetItem 样式与字体对象生命周期

Activity

  1. luiox commented on Mar 29, 2026

    @luiox
    OwnerAuthor

    此问题可能在UI重构中已经避免,暂时还不确定

  2. self-assigned this
    on Mar 29, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions