mrw wrote: > Here is a point in the code at which Squeezeplay might "naturally" > terminate itself: > https://github.com/Logitech/squeezeplay/blob/public/7.7/src/squeezeplay/share/jive/ui/Framework.lua#L350 >
That's also an interesting point and should be further investigated, but I still suppose the -Watchdog- to reset the device if it detects that the Jive UI is no longer alive. In fact, the UI main event loop you pointed to may completely cease to work in case of a wrapping of the timer. Let's image this: 1. In Line 307, the "now" value received from the timer is shortly before the wrap. 2. In Line 308, the calculated "framedue" is thus -beyond- the possible range of timer values (because, as you pointed out, Lua numbers can represent much bigger values than 32bit ints). 3. Or, as an alternative, in Line 338, the "now" value received from the timer is -after- the wrap, thus a very small value. 4. In Line 339, as a result, the condition "-framedue <= now-" *can no longer become true!* 5. Thus, Line 353 is never reached and the "framedue" value will no longer be updated. 6. As a result, *no more UI events will be processed at all*. Is it possible that this causes a Watchdog reset? How does the Watchdog process detect that the UI is still alive? Btw. I'm not 100% sure, but I also suppose that the tick timer (which is [/i]not[/i] based on a RTC), but instead on some high-performance timer, is not running at precise 1000Hz, thus there may be some minor discrepancies from the overflow interval of 24.855 days (or 49.71 days, respectively). 1x Squeezebox Classic, 3x Radio, 1x Touch, LMS 7.9.1 running on ODROID-U3, Ubuntu 16.04 (Perl-Version: 5.22.1 - arm-linux-gnueabihf-thread-multi-64int, DBD::SQLite 1.34_01 (sqlite 3.7.7.1)) ------------------------------------------------------------------------ Steevee28's Profile: http://forums.slimdevices.com/member.php?userid=36395 View this thread: http://forums.slimdevices.com/showthread.php?t=111650 _______________________________________________ Radio mailing list [email protected] http://lists.slimdevices.com/mailman/listinfo/radio
