Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Crash on typing \left\{\matrix{}\right\} #409

Closed
ForNeVeR opened this issue Jun 11, 2023 · 0 comments · Fixed by #413
Closed

Crash on typing \left\{\matrix{}\right\} #409

ForNeVeR opened this issue Jun 11, 2023 · 0 comments · Fixed by #413
Assignees
Labels

Comments

@ForNeVeR
Copy link
Owner

ForNeVeR commented Jun 11, 2023

While typing \left\{\matrix{}\right\} today, I've caught an example app crash on WPF :(

The exception is:

System.InvalidOperationException: Sequence contains no elements
   at System.Linq.ThrowHelper.ThrowNoElementsException()
   at System.Linq.Enumerable.Max[TSource](IEnumerable`1 source, Func`2 selector)
   at XamlMath.Atoms.MatrixAtom.CreateBoxCore(TexEnvironment environment) in G:\Projects\xaml-math\src\XamlMath.Shared\Atoms\MatrixAtom.cs:line 59
   at XamlMath.Atoms.Atom.CreateBox(TexEnvironment environment) in G:\Projects\xaml-math\src\XamlMath.Shared\Atoms\Atom.cs:line 12
   at XamlMath.Atoms.FencedAtom.CreateBoxCore(TexEnvironment environment) in G:\Projects\xaml-math\src\XamlMath.Shared\Atoms\FencedAtom.cs:line 38
   at XamlMath.Atoms.Atom.CreateBox(TexEnvironment environment) in G:\Projects\xaml-math\src\XamlMath.Shared\Atoms\Atom.cs:line 12
   at XamlMath.TexFormula.CreateBox(TexEnvironment environment) in G:\Projects\xaml-math\src\XamlMath.Shared\TexFormula.cs:line 90
   at WpfMath.Controls.FormulaControl.Render() in G:\Projects\xaml-math\src\WpfMath\Controls\FormulaControl.xaml.cs:line 148
   at WpfMath.Controls.FormulaControl.OnRenderSettingsChanged(DependencyObject d, DependencyPropertyChangedEventArgs e) in G:\Projects\xaml-math\src\WpfMath\Controls\FormulaControl.xaml.cs:line 215
   at System.Windows.DependencyObject.OnPropertyChanged(DependencyPropertyChangedEventArgs e)
   at System.Windows.FrameworkElement.OnPropertyChanged(DependencyPropertyChangedEventArgs e)
   at System.Windows.DependencyObject.NotifyPropertyChange(DependencyPropertyChangedEventArgs args)
   at System.Windows.DependencyObject.UpdateEffectiveValue(EntryIndex entryIndex, DependencyProperty dp, PropertyMetadata metadata, EffectiveValueEntry oldEntry, EffectiveValueEntry& newEntry, Boolean coerceWithDeferredReference, Boolean coerceWithCurrentValue, OperationType operationType)
   at System.Windows.DependencyObject.InvalidateProperty(DependencyProperty dp, Boolean preserveCurrentValue)
   at System.Windows.DependencyObject.InvalidateProperty(DependencyProperty dp)
   at System.Windows.Data.BindingExpressionBase.Invalidate(Boolean isASubPropertyChange)
   at System.Windows.Data.BindingExpression.TransferValue(Object newValue, Boolean isASubPropertyChange)
   at System.Windows.Data.BindingExpression.ScheduleTransfer(Boolean isASubPropertyChange)
   at MS.Internal.Data.ClrBindingWorker.NewValueAvailable(Boolean dependencySourcesChanged, Boolean initialValue, Boolean isASubPropertyChange)
   at MS.Internal.Data.PropertyPathWorker.UpdateSourceValueState(Int32 k, ICollectionView collectionView, Object newValue, Boolean isASubPropertyChange)
   at MS.Internal.Data.ClrBindingWorker.OnSourcePropertyChanged(Object o, String propName)
   at MS.Internal.Data.PropertyPathWorker.OnPropertyChanged(Object sender, PropertyChangedEventArgs e)
   at System.Windows.WeakEventManager.ListenerList`1.DeliverEvent(Object sender, EventArgs e, Type managerType)
   at System.ComponentModel.PropertyChangedEventManager.OnPropertyChanged(Object sender, PropertyChangedEventArgs args)
   at WpfMath.Example.MainViewModel.OnPropertyChanged(String propertyName) in G:\Projects\xaml-math\src\WpfMath.Example\MainViewModel.cs:line 170
   at WpfMath.Example.MainViewModel.SetField[T](T& field, T value, String propertyName) in G:\Projects\xaml-math\src\WpfMath.Example\MainViewModel.cs:line 179
   at WpfMath.Example.MainViewModel.set_Formula(String value) in G:\Projects\xaml-math\src\WpfMath.Example\MainViewModel.cs:line 89
@ForNeVeR ForNeVeR self-assigned this Jun 11, 2023
@ForNeVeR ForNeVeR changed the title Crash on typing \left\{\matrix{}\right} Crash on typing \left\{\matrix{}\right\} Jun 11, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant