engines using polls fail on boot, when loaded from saved script #1158
Comments
|
if it helps for testing, executing |
|
i don't know what it's a little hard to follow (for me!), but seems to me like |
ah, i think it's just been generally accepted as a quick alternative to full-blown SLEEP when experiencing system lockups. didn't mean to muddy the waters, this was just the only way to reliably repro the poll error streaming on my unit. |
that is confusing for sure--- it seems the script load shouldn't work at all if the engine table doesn't know about its engines. more generally i think the poll failure might be a symptom of a different problem. generally the problem here, of course, is that if matron is jammed, you can't use the menu to restart--- hence perhaps we simply need another maiden command we added a bunch of stuff to clear the default state, which some people have reported as annoying, but is obviously very helpful for getting out of a failed state |
|
yes of course, the polls issue is independent. i'm simply saying that restarting matron is not exacty useful as a repro case - though it is still a useful clue so thanks for that. the proximate issue is that the
the whole set of handlers in and of course the lua side should be waiting for that event before firing script so it seems to me that one of these things is happening:
both possibilities seem straightforward to debug for, but i think case 2 is more likely. as we've discussed, the dynamic reporting system is ultimately not really necessary, and could be replaced with metadata files read directly from lua. this works best if the metadata is autogenerated, so that code generation facility should be baked into the engine classes on SC side. i think we already have other GH issues we can reopen for improving the reset/restart options. but as it stands, i'd say that |
there is actually no reason this will break. what is definitely broken right now is the ability for a script to get a list of available engines, if that script is being run at launch. ( |
https://llllllll.co/t/mangl/21066/284?u=zebra
[quote]
just had another freeze up while booting into mangl. maiden was flooded with endless
and all buttons and encoders were non-functional. i was able to ssh in and reboot, at which point everything seemed fine.
[/quote]
the warning makes it clear that there is a race condition somewhere and the poll data structure is not populated as it should be after engine load and before script init. (when
manglcalls:start()on phase/level polls.)i'd look at sequence between SC and
oracle.Crone.setEnginecallsreportCommands, thenreportPolls.in
oracle.c, the handler sequence andtest_engine_load_doneshould be ensuring all reports are complete before raisingEVENT_ENGINE_LOADEDand kicking off script init.here's the entry point for lua, in
startup:https://github.com/monome/norns/blob/main/lua/core/startup.lua#L65-L72
this looks a little suspicious in that the engine report should really happen before trying to launch scripts. but i don't immediately see a reason this would break polls.
The text was updated successfully, but these errors were encountered: