Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

Enum fields trimmed when they shouldn't be

Aperta
#3,748 2 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 2 giorni

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
3/5
Tempo stimato
1-2 giorni
Idoneità per principianti
48/100
Tipo di issue
Bug
Chiarezza
Abbastanza chiara
Stato di attività
Ferma
Stack tecnologico
java
Ambito
backend

Direzione di ricerca

Start by tracing how Phoebus reads and writes enum string values for PVs, focusing on where trailing whitespace may be trimmed. Reproduce the reported mismatch with an IOC enum value that ends in whitespace, using both CA and PVA if available. Done means the written value preserves the whitespace and the IOC accepts the matching choice.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

MBBO ZRST-FFST fields in an IOC can be defined with trailing whitespace, and Phoebus correctly reads these in.
However, it appears that when Phoebus writes these strings to a PV it trims the whitespace, and sends this to try and match the value with the IOC, but it no longer matches as it is missing the trailing whitespace.
This causes the following error in the IOC:

recGblRecordError: <string_to_you_tried_to_set> Illegal choice PV: <record_name>

and the following error in Phoebus (when using CA):

Exception occured, code: gov.aps.jca.CAStatus\[PUTFAIL=20,WARNING=0\]=Could not perform a database value put for that channel, message: '<record_name>'.

or if using PVA it causes a much longer error message (~700 lines). Here is a snippet of that error:

WARNING [org.csstudio.display.builder.runtime] Widget Combo Box write error for value short test
java.lang.Exception: Cannot write <string_to_you_tried_to_set> to PV pva://<record_name>
        at org.csstudio.display.builder.runtime.pv.RuntimePV.write(RuntimePV.java:114)
        at org.csstudio.display.builder.runtime.WidgetRuntime.writePrimaryPV(WidgetRuntime.java:382)
        at org.csstudio.display.builder.runtime.RuntimeUtil$1.handleWrite(RuntimeUtil.java:52)
        at org.csstudio.display.builder.representation.ToolkitRepresentation.fireWrite(ToolkitRepresentation.java:682)
        at org.csstudio.display.builder.representation.javafx.widgets.ComboRepresentation.confirm(ComboRepresentation.java:198)
        at org.csstudio.display.builder.representation.javafx.widgets.ComboRepresentation.lambda$createJFXNode$0(ComboRepresentation.java:78)
        at com.sun.javafx.application.PlatformImpl.lambda$runLater$10(PlatformImpl.java:456)
        at java.base/java.security.AccessController.doPrivileged(AccessController.java:138)
        at com.sun.javafx.application.PlatformImpl.lambda$runLater$11(PlatformImpl.java:455)
        at com.sun.glass.ui.InvokeLaterDispatcher$Future.run(InvokeLaterDispatcher.java:95)
        at com.sun.glass.ui.win.WinApplication._runLoop(Native Method)
        at com.sun.glass.ui.win.WinApplication.lambda$runLoop$3(WinApplication.java:185)
        at java.base/java.lang.Thread.run(Thread.java:1447)
Caused by: java.util.concurrent.TimeoutException
        at java.base/java.util.concurrent.CompletableFuture.timedGet(CompletableFuture.java:2006)
        at java.base/java.util.concurrent.CompletableFuture.get(CompletableFuture.java:2141)
        at org.phoebus.pv.pva.PVA_PV.write(PVA_PV.java:197)
        at org.csstudio.display.builder.runtime.pv.RuntimePV.write(RuntimePV.java:110)
        ... 12 more

I would imagine removing whitespace trimming when getting Enum string values would fix this but I am not familiar with Phoebus code.

Lingua principale
Java
Stelle
130
Fork
132
Merge medio
2g 11h
PR unite (30g)
19

Preparare l'ambiente

  • Nessun Dockerfile né file Docker Compose
  • Ha un modello di pull request
  • Nessuna guida per i contributori

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di ControlSystemStudio/phoebus

Tutte le issue di ControlSystemStudio/phoebus

Issue simili

Altre issue su Java

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.