Builder: doSave() writes into a read-only (run) calculation and resets its state to Created
还没有人认领这个 Issue。
评估
- 难度
- 2/5
- 预计耗时
- 1-3 小时
- 新手友好度
- 74/100
- Issue 类型
- 缺陷
- 描述清晰度
- 描述清楚
- 活跃度
- 活跃
- 技术栈
- c
调研方向
阅读src/apps/builder/Builder.C中Builder::doSave()附近的代码,并将其行为与用于禁用 File > Save 的只读检查进行比较。issue 还指出了src/dsm/edsiimpl/ChemistryTask.C中的ChemistryTask::fragment(),它会将状态更改为 Created。请确认只读计算无法通过直接的save钩子保存,并且其状态保持不变。
由索引模型根据 Issue 内容生成。
描述
Where: `Builder::doSave()` (src/apps/builder/Builder.C) has no read-only check. File > Save is disabled for a read-only calculation (state Submitted or later, `PropertyTask::isReadOnly`), but a direct caller of `doSave()` still saves the structure through `ChemistryTask::fragment()`, which then sets the state to Created (src/dsm/edsiimpl/ChemistryTask.C, end of `fragment`). A run calculation, with its outputs and properties, becomes an editable, unrun calculation without any question.
Repro (hooks, one program, isolated home):
- Organizer `ECCE_TEST_ORGANIZER`: `examples`, then `start Builder file:///users/local/Examples/Getting_Started/ammonia` (a stored MOPAC run, state Loaded).
- `ECCE_BUILDER_SCRIPT`: `wait 20000`, `savestate` (dirty=0 save_enabled=0: read-only), `save`, `wait 3000`, `savestate`.
- The calculation's `.ecce-meta` now has `state Created`. Any later edit marks it dirty and enables Save.
Today only the `save` script hook reaches this path; the menu, toolbar and Ctrl+S are disabled. Found while diagnosing #1137.
Expected: `doSave()` refuses on a read-only calculation (as the menu does), or the `save` hook goes through the menu's enable state (`savemenu` already does).
- 主要语言
- C
- 星标
- 10
- 派生
- 8
- PR 合并指标
- 30 天内没有已合并 PR
环境准备
这个项目没有提供开发容器、Dockerfile 或贡献指南,环境需要你自己搭建:先看它的 README,通用步骤见我们的新手贡献指南。
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
FriendsofECCE/ECCE 的其他 Issue
-
Builder: a structure opened without calculation data shows the Diffraction (fibre) view by default未关闭bug
难度 2/5 1-3 小时 新手友好度 65/100
FriendsofECCE/ECCE#1245 · 1 条评论 ·
-
bug
难度 2/5 1-3 小时 新手友好度 82/100
FriendsofECCE/ECCE#1129 ·
-
Organizer: right-click on a calculation — 'Rerun' should be 'Duplicate'; Reset for Rerun missing未关闭bug
难度 2/5 1-3 小时 新手友好度 70/100
FriendsofECCE/ECCE#1089 · 1 条评论 ·
-
难度 2/5 1-3 小时 新手友好度 70/100
FriendsofECCE/ECCE#336 · 1 条评论 ·
-
bug
难度 4/5 3-5 天 新手友好度 18/100
FriendsofECCE/ECCE#1253 ·
查看 FriendsofECCE/ECCE 的全部 Issue
相似的 Issue
-
Arch: ARM/AArch64 Doc
难度 1/5 1 小时以内 新手友好度 90/100
RT-Thread/rt-thread#12082 · 1 条评论 ·
维护者通常 2 天内回复
-
难度 2/5 1-3 小时 新手友好度 72/100
apache/nuttx-apps#4108 · 4 条评论 ·
维护者通常 1 天内回复
-
bug
难度 1/5 1 小时以内 新手友好度 84/100
VirtualBox/virtualbox#996 ·
维护者通常 6 天内回复
-
难度 1/5 1 小时以内 新手友好度 82/100
trezor/trezor-firmware#8357 ·
维护者通常 2 天内回复
-
难度 2/5 1-3 小时 新手友好度 76/100
维护者通常 1 天内回复