MIDI controller settings are silently lost on the next launch
I maintainer di solito rispondono entro 3 giorni
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 3/5
- Tempo stimato
- 1-2 giorni
- Idoneità per principianti
- 70/100
Direzione di ricerca
Inizia in src/settings.cpp, nei controlli dell'intervallo intorno alle righe 636 e 655, quindi esamina src/clientrpc.cpp intorno alla riga 421. Riproduci entrambi i flussi di persistenza, sia quello da riga di comando sia quello JSON-RPC, dopo un riavvio. Il lavoro è completato quando i conteggi MIDI validi fino a 128 sopravvivono al ricaricamento e setMidiSettings non accetta più valori che il lettore scarterà.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
🤖 AI: MIDI controller settings do not survive a restart. Two independent defects produce the same symptom: the ini reader's range checks reject values that then reset to 0, and the JSON-RPC setter accepts values it never validates. All measured on main @ 8b667a3a, Qt 5.15.3, x86-64, QT_QPA_PLATFORM=offscreen.
1. --ctrlmidich count of 128 is rejected on reload (ini range check off by one)
CSettings::ReadFromFile range-checks nine MIDI keys against one shared 0..127 (src/settings.cpp:655). Four of those keys are counts rather than CC numbers, and both documented --ctrlmidich syntaxes legitimately produce 128:
- legacy
1;0setsiMidiFaderCount = qMin ( MAX_NUM_CHANNELS, 128 - iOffset )= 128 (src/settings.cpp:285) - named
1;f0*128setsiNum = qMin ( iNum, MAX_NUM_CHANNELS )thenqMin ( iNum, 128 - iFirst )= 128 (src/settings.cpp:332)
128 is then written to the ini, and GetNumericIniSet's upper bound is inclusive (src/settings.cpp:144), so the stored value fails the check on read, the member keeps its default, and the count lands at 0. One launch with the flag to write the ini, one launch without it to read back:
| key | after --ctrlmidich "1;<t>0*128" |
after the next launch |
|---|---|---|
midifadercount |
128 | 0 |
midipancount |
128 | 0 |
midisolocount |
128 | 0 |
midimutecount |
128 | 0 |
Control, identical procedure with *127 instead of *128: all four read back 127. A count of 0 maps no controllers, so a full-width MIDI map works for exactly one session and is gone from the next one, with nothing logged. Fix: split the shared range so offsets stay 0..127 and the four counts accept 0..128.
2. jamulusclient/setMidiSettings has no range validation, so values persist and then vanish on reload
The JSON-RPC setter writes every field straight to settings with no bounds check (src/clientrpc.cpp:421). Out-of-range values are accepted (the call returns {"result":"ok"}), saved to the ini on quit, and silently dropped by the reader's range checks on the next launch. One client driven over the JSON-RPC socket, quit, relaunched on the same ini:
| field (valid range) | set via RPC | read back, same session | in the ini | after relaunch |
|---|---|---|---|---|
midiChannel (0..16) |
99 | 99 | <midichannel>99</…> |
0 |
midiFaderOffset (0..127) |
5000 | 5000 | <midifaderoffset>5000</…> |
0 |
midiFaderCount (0..127) |
200 | 200 | <midifadercount>200</…> |
0 |
midiChannel is checked at src/settings.cpp:636, the offsets and counts at src/settings.cpp:655, so all three fail on load and reset to the default 0 — the same silent-loss mechanism as case 1, reached through the RPC instead of the command line. Fix: validate the fields in setMidiSettings (reject or clamp) so a value the API accepts is one the reader will keep.
🤖 This message was written by AI and reviewed by @mcfnord.
- Lingua principale
- C
- Stelle
- 1.1k
- Fork
- 248
- Merge medio
- 2g 22h
- PR unite (30g)
- 6
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 jamulussoftware/jamulus
-
Move translation checker (and potentially other runners) to ARM runnerForse già presa @ann0see l’ha presa 21 giorni fa. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
jamulussoftware/jamulus#3953 · 2 commenti ·
I maintainer di solito rispondono entro 3 giorni
-
AI bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 82/100
jamulussoftware/jamulus#3901 · 4 commenti · 1 reazione ·
I maintainer di solito rispondono entro 3 giorni
-
AI
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
jamulussoftware/jamulus#3846 ·
I maintainer di solito rispondono entro 3 giorni
-
Qt6 moving towards cmakeApertafeature request
Difficoltà 5/5 Più di una settimana Idoneità per principianti 25/100
jamulussoftware/jamulus#3964 · 3 commenti ·
I maintainer di solito rispondono entro 3 giorni
-
Difficoltà 3/5 1-2 giorni Idoneità per principianti 65/100
jamulussoftware/jamulus#3961 ·
I maintainer di solito rispondono entro 3 giorni
Tutte le issue di jamulussoftware/jamulus
Issue simili
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 67/100
DarkFlippers/qUnleashed#240 ·
I maintainer di solito rispondono entro 1 giorno
-
enhancement
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
HarbourMasters/Shipwright#7320 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 62/100
FujiNetWIFI/fujinet-firmware#1834 ·
I maintainer di solito rispondono entro 1 giorno
-
Bug Status: Needs Triage
Difficoltà 2/5 1-3 ore Idoneità per principianti 82/100
I maintainer di solito rispondono entro 1 giorno