Commit 63f184f
committed
menu: pump a pending playlist read every frame, so it finishes on its own
Third report from this path: opening a playlist showed "No Playlist
Entries Available", and backing out and opening the same playlist
again showed the entries. Sometimes back did not work on the empty
screen either.
The missing piece was a pump. ENTRIES_NEED_REFRESH is consumed in
exactly one place - generic_menu_entry_action() - which runs when the
user presses something. There is no per-frame equivalent, so a
displaylist that yielded mid-build stayed unfinished until the next
keypress: the placeholder was drawn, nothing advanced the read, and
the list only filled when an action happened to drive the rebuild.
Re-entering the playlist worked because that WAS the input.
menu_driver_iterate() now advances a pending read, once per frame,
under the same shared I/O window the directory walks and the scanner
use, and rebuilds the list itself the moment the read completes -
without waiting for input. With nothing outstanding it costs one
branch, so the ordinary case is unchanged.
This is only reachable at Android/SAF speed. With local stdio a
playlist is read inside the first slice and the yield path is never
taken, which is why none of these three reports reproduced on a
desktop.
The oracle gains a pump lane that runs over the short-read VFS
standing in for SAF: it asserts the first slice really does yield -
so the lane cannot stop covering its own case - and then advances
only by repeated frames, no requests and no input, until the read
completes and the requested playlist is installed with its own 600
entries. Removing the advance leaves it pending forever, which is
the reported symptom.
Verified: strict C89 gates on playlist.c and menu_driver.c; full
Linux build links with HAVE_QT=1; the playlist oracle passes plain,
twice under ASan+UBSan+LSan and twice under TSan; the playlist
manager oracle still passes.
Still not exercised here: the menu-side rebuild itself. The lane
drives the continue/finish pair the pump calls, not
menu_driver_iterate(), because nothing links the real menu yet. A
harness that links the shipping objects with only main replaced is
the missing piece for that, and this path has now earned it.1 parent 5f586c6 commit 63f184f
4 files changed
Lines changed: 156 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2472 | 2472 | | |
2473 | 2473 | | |
2474 | 2474 | | |
| 2475 | + | |
| 2476 | + | |
| 2477 | + | |
| 2478 | + | |
| 2479 | + | |
2475 | 2480 | | |
2476 | 2481 | | |
2477 | 2482 | | |
| |||
8202 | 8207 | | |
8203 | 8208 | | |
8204 | 8209 | | |
| 8210 | + | |
| 8211 | + | |
| 8212 | + | |
| 8213 | + | |
| 8214 | + | |
| 8215 | + | |
| 8216 | + | |
| 8217 | + | |
| 8218 | + | |
| 8219 | + | |
| 8220 | + | |
| 8221 | + | |
| 8222 | + | |
| 8223 | + | |
| 8224 | + | |
| 8225 | + | |
| 8226 | + | |
| 8227 | + | |
| 8228 | + | |
| 8229 | + | |
| 8230 | + | |
| 8231 | + | |
| 8232 | + | |
| 8233 | + | |
| 8234 | + | |
| 8235 | + | |
| 8236 | + | |
| 8237 | + | |
| 8238 | + | |
| 8239 | + | |
| 8240 | + | |
| 8241 | + | |
| 8242 | + | |
| 8243 | + | |
| 8244 | + | |
| 8245 | + | |
| 8246 | + | |
| 8247 | + | |
| 8248 | + | |
| 8249 | + | |
| 8250 | + | |
| 8251 | + | |
| 8252 | + | |
| 8253 | + | |
| 8254 | + | |
| 8255 | + | |
| 8256 | + | |
| 8257 | + | |
| 8258 | + | |
| 8259 | + | |
| 8260 | + | |
8205 | 8261 | | |
8206 | 8262 | | |
8207 | 8263 | | |
| |||
8210 | 8266 | | |
8211 | 8267 | | |
8212 | 8268 | | |
| 8269 | + | |
| 8270 | + | |
8213 | 8271 | | |
8214 | 8272 | | |
8215 | 8273 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3996 | 3996 | | |
3997 | 3997 | | |
3998 | 3998 | | |
| 3999 | + | |
| 4000 | + | |
| 4001 | + | |
| 4002 | + | |
| 4003 | + | |
| 4004 | + | |
3999 | 4005 | | |
4000 | 4006 | | |
4001 | 4007 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
220 | 220 | | |
221 | 221 | | |
222 | 222 | | |
| 223 | + | |
223 | 224 | | |
224 | 225 | | |
225 | 226 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1192 | 1192 | | |
1193 | 1193 | | |
1194 | 1194 | | |
| 1195 | + | |
| 1196 | + | |
| 1197 | + | |
| 1198 | + | |
| 1199 | + | |
| 1200 | + | |
| 1201 | + | |
| 1202 | + | |
| 1203 | + | |
| 1204 | + | |
| 1205 | + | |
| 1206 | + | |
| 1207 | + | |
| 1208 | + | |
| 1209 | + | |
| 1210 | + | |
| 1211 | + | |
| 1212 | + | |
| 1213 | + | |
| 1214 | + | |
| 1215 | + | |
| 1216 | + | |
| 1217 | + | |
| 1218 | + | |
| 1219 | + | |
| 1220 | + | |
| 1221 | + | |
| 1222 | + | |
| 1223 | + | |
| 1224 | + | |
| 1225 | + | |
| 1226 | + | |
| 1227 | + | |
| 1228 | + | |
| 1229 | + | |
| 1230 | + | |
| 1231 | + | |
| 1232 | + | |
| 1233 | + | |
| 1234 | + | |
| 1235 | + | |
| 1236 | + | |
| 1237 | + | |
| 1238 | + | |
| 1239 | + | |
| 1240 | + | |
| 1241 | + | |
| 1242 | + | |
| 1243 | + | |
| 1244 | + | |
| 1245 | + | |
| 1246 | + | |
| 1247 | + | |
| 1248 | + | |
| 1249 | + | |
| 1250 | + | |
| 1251 | + | |
| 1252 | + | |
| 1253 | + | |
| 1254 | + | |
| 1255 | + | |
| 1256 | + | |
| 1257 | + | |
| 1258 | + | |
| 1259 | + | |
| 1260 | + | |
| 1261 | + | |
| 1262 | + | |
| 1263 | + | |
| 1264 | + | |
| 1265 | + | |
| 1266 | + | |
| 1267 | + | |
| 1268 | + | |
| 1269 | + | |
| 1270 | + | |
| 1271 | + | |
| 1272 | + | |
| 1273 | + | |
| 1274 | + | |
| 1275 | + | |
| 1276 | + | |
| 1277 | + | |
| 1278 | + | |
| 1279 | + | |
| 1280 | + | |
| 1281 | + | |
| 1282 | + | |
| 1283 | + | |
| 1284 | + | |
1195 | 1285 | | |
1196 | 1286 | | |
1197 | 1287 | | |
| |||
1224 | 1314 | | |
1225 | 1315 | | |
1226 | 1316 | | |
| 1317 | + | |
1227 | 1318 | | |
1228 | 1319 | | |
1229 | 1320 | | |
| |||
0 commit comments