I've found (or rather a client found) a nasty bug in my players where disabling the closed captions (by clicking the CC button) causes a crash.
After investigating the issue, it's a stack overflow that occurs during measurements to fit text in panels, more precisely, it crashes in CaptionBlockRegion.WrapElement(...) called from
My workaround is disabling text wrapping in all my custom subtitle plugins, but I feel there must be a bug somewhere in SMF.
For instance, in the RenderElementRecurse method, there's a test :
if (... && element.CurrentStyle.Display == System.Windows.Visibility.Visible)
That I feel at first glance that should be failing. I may be totally wrong for this property's meaning though.
It looks like the caption rendering isn't properly aware that it should try to render, and ends up in a bad state where the content hasn't got a proper size, thus exploding during the measure attempt.