App: user files must survive a failed read (usage.json, tags.json, studio.json, wrong-typed sections, locked files)
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 4/5
- Tempo stimato
- 3-5 giorni
- Idoneità per principianti
- 55/100
- Tipo di issue
- Bug
- Chiarezza
- Specificata chiaramente
- Stato di attività
- Attiva
- Stack tecnologico
- json, python
- Ambito
- desktop-dev, security
Direzione di ricerca
Start with the load() paths in zorbit/usage.py, zorbit/tags.py, and zorbit/config.py, then review zorbit/studio.py, zorbit/fsutil.py, and zorbit/paths.py alongside the audit IDs. Run the existing tests for these modules and add focused coverage for failed, malformed, and locked-file cases. Done means valid state is preserved or defaults are reported when reads fail, unsafe asset names are rejected, failed writes are retried, and configuration errors produce a readable application message.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
From the audit of ZOrbit 0.11.0 (31 October 2026).
What is wrong
zorbit/usage.pyload()setsself.mtimeand empties brushes, menus and picks before it opens the file. If the read fails (a scanner or sync client holding the file, or a hand-edit typo) the except clause passes, the object believes it has loaded that mtime, and the next pick saves the empty state over the file. One bad entry inside the brushes loop also drops every later brush, all auto-slot state and the whole Recent list, because they are read after it in one try block.zorbit/tags.pyload()keeps "the previous state" when the file cannot be parsed. On the first load of a process there is no previous state, so a stray comma intags.jsonleaves no tags at all, Favourites included. Every tag and browser slot is then reported as "tag X does not exist", which points the user away from the real cause.zorbit/config.py:bridge = raw.get("bridge") or {}andring = raw.get("ring") or {}assume dicts."bridge": "F9"or"ring": "big"raises AttributeError, the whole file is dropped, the app logs'str' object has no attribute 'items'and Studio shows one problem with no location. A menu'sfanis not validated, so"fan": "false"is true. Misspelt names insidering.colors,bridge,browserand item fields are ignored without the "did you mean" that the 0.11.0 ring and menu keys got.zorbit/config.py: brush, alpha, material and texture names andiconvalues are not checked as names.assets._resolve,brushes.thumbnailandradiald.icon_forcallis_file()on them, so a menus file with\\host\share\a.pngmakes Windows connect to that server and send an NTLM hash (while Studio previews the ring, or on the first pick). The COPYDATA path inradiald.pyalready rejects such names.zorbit/studio.py_read_studio_filereturns{}for a missing and for an unreadable file.set_pref(on every screen change),add_zbrush_folderand the window-placement writer then write that empty dict back, dropping the other keys.zorbit/fsutil.pywrite_atomic:os.replacefails at once with PermissionError when another process holds the destination open (antivirus, OneDrive, the app reading the file it watches). Studio shows "radial.json could not be written: Access is denied".zorbit/paths.pyensure_configruns outside the fatal handler inradiald.main; an unwritable%APPDATA%ends the app with a traceback inapp_stderr.logand nothing else.
Fix
usage.load: build the new state in locals and assign on success; on OSError keep the previous state and mtime so the next load retries; on a parse error copy the file tousage.json.badbefore any save; per-entry try.tags.load: on a parse error with empty_tags, install the starter tags in memory and keep.errorso writes stay refused;config.pyand the problems list say "tags.json could not be read" whentags.erroris set.config.load:isinstance(dict)checks for the top level,bridge,ring,browserandmenuswith a plain problem text and defaults;fanmust be a bool; suggestions for the other key levels; reject names and icons containing\,/,:or..or starting with\\or//, listed as problems.studio.py: distinguish missing from unreadable and skip the write when the read failed.write_atomic: retryos.replacefour or five times with a short pause on PermissionError or winerror 5 and 32.ensure_configinside the fatal handler, with a readable message.
Audit ids: F122, F042, F047, F048, F231, F232, F028, F032, F013, F307, F373, F371, F372, F123, F366.
- Lingua principale
- Python
- Stelle
- 2
- Fork
- 1
- Merge medio
- 3m
- PR unite (30g)
- 2
Preparare l'ambiente
- Nessun Dockerfile né file Docker Compose
- Ha un modello di pull request
- Leggi la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di combwizard/ZOrbit
-
idea ring tags
Difficoltà 2/5 1-3 ore Idoneità per principianti 70/100
combwizard/ZOrbit#38 ·
-
Tag band along a fan's arcApertaidea ring tags
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
combwizard/ZOrbit#37 ·
-
browser idea tags
Difficoltà 2/5 1-3 ore Idoneità per principianti 64/100
combwizard/ZOrbit#34 ·
-
bridge browser idea
Difficoltà 2/5 1-3 ore Idoneità per principianti 84/100
combwizard/ZOrbit#28 ·
-
Commands from other programs: open a menu, pick a brush or switch profile from the command lineApertaidea ring
Difficoltà 4/5 3-5 giorni Idoneità per principianti 32/100
combwizard/ZOrbit#99 ·
Tutte le issue di combwizard/ZOrbit
Issue simili
-
breaking change
Difficoltà 2/5 1-3 ore Idoneità per principianti 82/100
I maintainer di solito rispondono entro 1 giorno
-
check-skill-pages: show fixture build errors when a build failsForse già presa @ShahadatTest l’ha presa oggi. Apertagood first issue P2
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 85/100
coco-research/coco#439 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
esphome/home-assistant-addon#274 ·
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
endurain-project/endurain#882 ·
I maintainer di solito rispondono entro 1 giorno
-
good first issue
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100