Bug introduced in V10.1 or earlier and persists through V11.2
[...] The behavior of
Dynamics
when the kernel quits has never been well defined or documented, although there does appear to be a difference between v9 and v10. [...] I have updated the bug report with your case [...]
After quitting the kernel only one Dynamic
cell fires. And it does not matter how many are there.
Dynamic[DateString[], UpdateInterval -> 1]
Dynamic[DateString[], UpdateInterval -> 1]
Button["Quit", Quit[], Method -> "Queued"]
When one closes the notebook and reopens it, they work correctly.
- Can I fix this?
- Should I expect this?
Another example shows that custom GUI won't survive kernel quit:
DynamicModule[{init = False}
,
Dynamic[If[! init, "init...", $SessionID]]
,
UnsavedVariables :> {init},
SynchronousInitialization -> False,
Initialization :> (
Pause[1];
Echo[$SessionID];
init = True
)
]
(example from Tracking the progress of Initialization)
Echo
confirms intialization fired after Quit[]
but the view didn't change.
Win 7/10 V 10/11
p.s. Investigation with LinkSnooper reveals that calls to update DynamicObjects are still being made, just some objects don't care...