This application is running fine on all computers (about 5-6) except one. Its small laptop with touch screen.
What I'm facing is during load of some forms application crushes. Its mostly when i move mouse into DataFormComboBoxField
which is binded to collection.
Example:
<telerik:DataFormComboBoxField ItemsSource="{Binding ErrandDocTemplates}" DisplayMemberPath="Name"
DataMemberBinding="{Binding SelectedErrandDocTemplate, Mode=TwoWay}" Label="Szablon" Width="430" HorizontalAlignment="Left"/>
This project is wpf controls library hosted in WinForms application.
Ive read couple of articles about similiar issue but i couldnt find any solution to this. I tried even cleaning font cashes and update graphic drivers as its said in KB937135 but still with no success.
Here is the stuck trace of firtst exception im getting (there is no inner exception)
mscorlib
at System.RuntimeMethodHandle._InvokeMethodFast(IRuntimeMethodInfo method, Object target, Object[] arguments, SignatureStruct& sig, MethodAttributes methodAttributes, RuntimeType typeOwner)
at System.RuntimeMethodHandle.InvokeMethodFast(IRuntimeMethodInfo method, Object target, Object[] arguments, Signature sig, MethodAttributes methodAttributes, RuntimeType typeOwner)
at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture, Boolean skipVisibilityChecks)
at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
at GalaSoft.MvvmLight.Helpers.WeakAction.Execute()
at GalaSoft.MvvmLight.Command.RelayCommand.Execute(Object parameter)
at MS.Internal.Commands.CommandHelpers.CriticalExecuteCommandSource(ICommandSource commandSource, Boolean userInitiated)
at System.Windows.Controls.Primitives.ButtonBase.OnClick()
at System.Windows.Controls.Button.OnClick()
at Telerik.Windows.Controls.RadButton.OnClick()
at System.Windows.Controls.Primitives.ButtonBase.OnMouseLeftButtonUp(MouseButtonEventArgs e)
at System.Windows.UIElement.OnMouseLeftButtonUpThunk(Object sender, MouseButtonEventArgs e)
at System.Windows.Input.MouseButtonEventArgs.InvokeEventHandler(Delegate genericHandler, Object genericTarget)
at System.Windows.RoutedEventArgs.InvokeHandler(Delegate handler, Object target)
at System.Windows.RoutedEventHandlerInfo.InvokeHandler(Object target, RoutedEventArgs routedEventArgs)
at System.Windows.EventRoute.InvokeHandlersImpl(Object source, RoutedEventArgs args, Boolean reRaised)
at System.Windows.UIElement.ReRaiseEventAs(DependencyObject sender, RoutedEventArgs args, RoutedEvent newEvent)
at System.Windows.UIElement.OnMouseUpThunk(Object sender, MouseButtonEventArgs e)
at System.Windows.Input.MouseButtonEventArgs.InvokeEventHandler(Delegate genericHandler, Object genericTarget)
at System.Windows.RoutedEventArgs.InvokeHandler(Delegate handler, Object target)
at System.Windows.RoutedEventHandlerInfo.InvokeHandler(Object target, RoutedEventArgs routedEventArgs)
at System.Windows.EventRoute.InvokeHandlersImpl(Object source, RoutedEventArgs args, Boolean reRaised)
at System.Windows.UIElement.RaiseEventImpl(DependencyObject sender, RoutedEventArgs args)
at System.Windows.UIElement.RaiseTrustedEvent(RoutedEventArgs args)
at System.Windows.UIElement.RaiseEvent(RoutedEventArgs args, Boolean trusted)
at System.Windows.Input.InputManager.ProcessStagingArea()
at System.Windows.Input.InputManager.ProcessInput(InputEventArgs input)
at System.Windows.Input.InputProviderSite.ReportInput(InputReport inputReport)
at System.Windows.Interop.HwndMouseInputProvider.ReportInput(IntPtr hwnd, InputMode mode, Int32 timestamp, RawMouseActions actions, Int32 x, Int32 y, Int32 wheel)
at System.Windows.Interop.HwndMouseInputProvider.FilterMessage(IntPtr hwnd, WindowMessage msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
at System.Windows.Interop.HwndSource.InputFilterMessage(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
at MS.Win32.HwndWrapper.WndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
at MS.Win32.HwndSubclass.DispatcherCallbackOperation(Object o)
at System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Int32 numArgs)
at MS.Internal.Threading.ExceptionFilterHelper.TryCatchWhen(Object source, Delegate method, Object args, Int32 numArgs, Delegate catchHandler)
at System.Windows.Threading.Dispatcher.InvokeImpl(DispatcherPriority priority, TimeSpan timeout, Delegate method, Object args, Int32 numArgs)
at MS.Win32.HwndSubclass.SubclassWndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam)
at System.Windows.Forms.UnsafeNativeMethods.DispatchMessageW(MSG& msg)
at System.Windows.Forms.Application.ComponentManager.System.Windows.Forms.UnsafeNativeMethods.IMsoComponentManager.FPushMessageLoop(IntPtr dwComponentID, Int32 reason, Int32 pvLoopData)
at System.Windows.Forms.Application.ThreadContext.RunMessageLoopInner(Int32 reason, ApplicationContext context)
at System.Windows.Forms.Application.ThreadContext.RunMessageLoop(Int32 reason, ApplicationContext context)
at System.Windows.Forms.Application.Run(Form mainForm)
at SDEWinForm.Program.Main() in d:\SDEControlsLibrary\SDEControlsLibrary\SDEWinForm\Program.cs:line 20
System.Object _InvokeMethodFast(System.IRuntimeMethodInfo, System.Object, System.Object[], System.SignatureStruct ByRef, System.Reflection.MethodAttributes, System.RuntimeType)
Exception has been thrown by the target of an invocation.
Value cannot be null.
Parameter name: source
If i handle this im getting next one:
System.Core
w System.Linq.Enumerable.First[TSource](IEnumerable`1 source, Func`2 predicate)
w System.Windows.Automation.Peers.FrameworkElementAutomationPeer.GetNameCore()
w System.Windows.Automation.Peers.AutomationPeer.UpdateSubtree()
w System.Windows.Automation.Peers.AutomationPeer.UpdateSubtree()
w System.Windows.Automation.Peers.AutomationPeer.UpdateSubtree()
w System.Windows.ContextLayoutManager.fireAutomationEvents()
w System.Windows.ContextLayoutManager.UpdateLayout()
w System.Windows.ContextLayoutManager.UpdateLayoutCallback(Object arg)
w System.Windows.Media.MediaContext.FireInvokeOnRenderCallbacks()
w System.Windows.Media.MediaContext.RenderMessageHandlerCore(Object resizedCompositionTarget)
w System.Windows.Media.MediaContext.RenderMessageHandler(Object resizedCompositionTarget)
w System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Int32 numArgs)
w MS.Internal.Threading.ExceptionFilterHelper.TryCatchWhen(Object source, Delegate method, Object args, Int32 numArgs, Delegate catchHandler)
w System.Windows.Threading.Dispatcher.WrappedInvoke(Delegate callback, Object args, Int32 numArgs, Delegate catchHandler)
w System.Windows.Threading.DispatcherOperation.InvokeImpl()
w System.Threading.ExecutionContext.runTryCode(Object userData)
w System.Runtime.CompilerServices.RuntimeHelpers.ExecuteCodeWithGuaranteedCleanup(TryCode code, CleanupCode backoutCode, Object userData)
w System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean ignoreSyncCtx)
w System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
w System.Windows.Threading.DispatcherOperation.Invoke()
w System.Windows.Threading.Dispatcher.ProcessQueue()
w System.Windows.Threading.Dispatcher.WndProcHook(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
w MS.Win32.HwndWrapper.WndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
w MS.Win32.HwndSubclass.DispatcherCallbackOperation(Object o)
w System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Int32 numArgs)
w MS.Internal.Threading.ExceptionFilterHelper.TryCatchWhen(Object source, Delegate method, Object args, Int32 numArgs, Delegate catchHandler)
w System.Windows.Threading.Dispatcher.WrappedInvoke(Delegate callback, Object args, Int32 numArgs, Delegate catchHandler)
w System.Windows.Threading.Dispatcher.InvokeImpl(DispatcherPriority priority, TimeSpan timeout, Delegate method, Object args, Int32 numArgs)
w MS.Win32.HwndSubclass.SubclassWndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam)
w System.Windows.Forms.UnsafeNativeMethods.DispatchMessageW(MSG& msg)
w System.Windows.Forms.Application.ComponentManager.System.Windows.Forms.UnsafeNativeMethods.IMsoComponentManager.FPushMessageLoop(IntPtr dwComponentID, Int32 reason, Int32 pvLoopData)
w System.Windows.Forms.Application.ThreadContext.RunMessageLoopInner(Int32 reason, ApplicationContext context)
w System.Windows.Forms.Application.ThreadContext.RunMessageLoop(Int32 reason, ApplicationContext context)
w SDEWinForm.Program.Main() w d:\SDEControlsLibrary\SDEControlsLibrary\SDEWinForm\Program.cs:wiersz 20
TSource First[TSource](System.Collections.Generic.IEnumerable`1[TSource], System.Func`2[TSource,System.Boolean])
System.Collections.ListDictionaryInternal
System.ArgumentNullException
I removed all Linq expressions in act od desperation but it still the same. I even turned off colums and rows virtualization on gridviews cause i've read that could be the problem.
I obtained those errors during remote debugging with all possible exceptions checked and there is really nothing else going on.
I'm aware of that you will probably not be able to reproduce this behavior but Ill be gratefull for any help and ideas.
Regards
Maciek
<
telerik:RadCartesianChart.Behaviors
>
<
telerik:ChartSelectionBehavior
DataPointSelectionMode
=
"Single"
SelectionChanged
=
"ChartSelectionBehavior_SelectionChanged_1"
/>
<
telerik:ChartPanAndZoomBehavior
ZoomMode
=
"Both"
PanMode
=
"Both"
/>
</
telerik:RadCartesianChart.Behaviors
>
private void ChartSelectionBehavior_SelectionChanged_1(object sender, ChartSelectionChangedEventArgs e)
{
//Handle selection of the current point
if (e.AddedPoints.Count > 0)
{
var addedPoint = e.AddedPoints[0];
var series = addedPoint.Presenter as LineSeries;
//Get the Content Presenter of the series
var pointPresenter = series.ChildrenOfType<
ContentPresenter
>().
Where(cp => cp.Tag == addedPoint).FirstOrDefault();
var ellipseElement = pointPresenter.
ChildrenOfType<
Ellipse
>().FirstOrDefault();
//Do whatever you want with it :)
ellipseElement.Fill = new SolidColorBrush(Colors.Red);
}
//Handle de-selection of the current point
if (e.RemovedPoints.Count > 0)
{
var removedPoint = e.RemovedPoints[0];
var series = removedPoint.Presenter as LineSeries;
var pointPresenter = series.
ChildrenOfType<
ContentPresenter
>().
Where(cp => cp.Tag == removedPoint).FirstOrDefault();
var ellipseElement = pointPresenter.
ChildrenOfType<
Ellipse
>().FirstOrDefault();
//Do whatever you want with it :)
ellipseElement.Fill = new SolidColorBrush(Colors.Yellow);
}
}
<Telerik:RadDocking Grid.Row="1" Name="xamDockManager1"> |
<Telerik:RadSplitContainer InitialPosition="DockedBottom"> |
<Telerik:RadPaneGroup> |
<Telerik:RadDocumentPane Header="Mesajlar" CanUserPin="True" CanFloat="False" CanUserClose="False" IsPinned="False" > |
<TextBox Style="{StaticResource StyleTextBoxMessages}" AutoWordSelection="True" Name="TextBoxMessages" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" HorizontalScrollBarVisibility="Auto" VerticalScrollBarVisibility="Auto" Margin="0" IsReadOnly="True"> |
<TextBox.ContextMenu> |
<ContextMenu Name="MenuItemMessages"> |
<MenuItem Name="MenuItemMessagesClear" Click="MenuItemMessagesClear_Click" Header="Temizle"></MenuItem> |
<MenuItem Name="MenuItemMessagesSave" Click="MenuItemMessagesSave_Click" Header="Kaydet"></MenuItem> |
</ContextMenu> |
</TextBox.ContextMenu> |
</TextBox> |
</Telerik:RadDocumentPane> |
</Telerik:RadPaneGroup> |
</Telerik:RadSplitContainer> |
<Telerik:RadDocking.DocumentHost> |
<Telerik:RadSplitContainer> |
<Telerik:RadPaneGroup Name="documentPaneGroup" SelectionChanged="documentPaneGroup_SelectionChanged"> |
</Telerik:RadPaneGroup> |
</Telerik:RadSplitContainer> |
</Telerik:RadDocking.DocumentHost> |
</Telerik:RadDocking> |
public RadPane AddPane(UserControl control, bool canBeClosed = true) |
{ |
RadPane contentPane = new RadPane(); |
contentPane.Content = control; |
//contentPane.Header = control.Title; |
contentPane.IsSelected = true; |
contentPane.CanFloat = false; |
contentPane.CanUserPin = false; |
documentPaneGroup.AddItem(contentPane, Telerik.Windows.Controls.Docking.DockPosition.Center); |
return contentPane; |
} |
<
telerik:RadMaskedTextInput
Style
=
"{StaticResource SingleLineTextInputWithNoMask}"
Value
=
"{Binding Value}"
/>
<
Style
x:Key
=
"SingleLineTextInputWithNoMask"
TargetType
=
"{x:Type telerik:RadMaskedTextInput}"
>
<
Setter
Property
=
"IsClearButtonVisible"
Value
=
"False"
/>
<
Setter
Property
=
"InputBehavior"
Value
=
"Insert"
/>
<
Setter
Property
=
"Mask"
Value
=
""
/>
<
Setter
Property
=
"AcceptsReturn"
Value
=
"False"
/>
</
Style
>
<
telerik:RadChart
x:Name
=
"durationChart"
ItemsSource
=
"{Binding DurationChart, Mode=TwoWay}"
>
<
telerik:RadChart.SeriesMappings
>
<
telerik:SeriesMapping
LegendLabel
=
"Devices"
>
<
telerik:SeriesMapping.SeriesDefinition
>
<
telerik:BarSeriesDefinition
></
telerik:BarSeriesDefinition
>
</
telerik:SeriesMapping.SeriesDefinition
>
<
telerik:SeriesMapping.ItemMappings
>
<
telerik:ItemMapping
DataPointMember
=
"Label"
FieldName
=
"Value"
></
telerik:ItemMapping
>
<
telerik:ItemMapping
DataPointMember
=
"YValue"
FieldName
=
"Value"
></
telerik:ItemMapping
>
<
telerik:ItemMapping
DataPointMember
=
"XCategory"
FieldName
=
"Label"
/>
</
telerik:SeriesMapping.ItemMappings
>
</
telerik:SeriesMapping
>
</
telerik:RadChart.SeriesMappings
>
</
telerik:RadChart
>
#region Duration Chart
// Hide legend
durationChart.DefaultView.ChartLegend.Visibility = Visibility.Collapsed;
// Axis titles
durationChart.DefaultView.ChartArea.AxisX.Title = MOD_COM_HLP.LocalizationHelper.LocalizeString(ResourceKeys.DLYPlantDelaysDurationXAxisResourceKey);
durationChart.DefaultView.ChartArea.AxisY.Title = MOD_COM_HLP.LocalizationHelper.LocalizeString(ResourceKeys.DLYPlantDelaysDurationYAxisResourceKey);
// X axis
durationChart.DefaultView.ChartArea.AxisX.AxisLabelsVisibility = Visibility.Visible;
durationChart.DefaultView.ChartArea.AxisX.PlotAreaAxisLabelsVisibility = Visibility.Visible;
// Y axis
durationChart.DefaultView.ChartArea.AxisY.AxisLabelsVisibility = Visibility.Visible;
durationChart.DefaultView.ChartArea.AxisY.MajorTicksVisibility = Visibility.Visible;
durationChart.DefaultView.ChartArea.AxisY.MinorTicksVisibility = Visibility.Hidden;
#endregion
ObservableCollection<DLYChartPoint> durationChart =
new
ObservableCollection<DLYChartPoint>();
private
void
FillDurationChart()
{
// Aux values
List<LPD_COM_ENT.AUXValue> dlyDurationChartPeriods = lPDModulesLibraryProxy.ReadAUXValues(
new
LPDModulesLibrary.Common.Entities.ReadFilter() { VariableName =
"DLY_DURATION_CHART_PERIOD"
});
if
(Items ==
null
)
return
;
// Clear the chart
DurationChart.Clear();
// Add the columns
foreach
(LPD_COM_ENT.AUXValue variable
in
dlyDurationChartPeriods) {
DLYChartPoint point =
new
DLYChartPoint() {Label = variable.CharValue, Value=0, UniqueId=variable.ValueSeq };
DurationChart.Add(point);
}
// Fill chart
foreach
(DLYDelay stoppage
in
Items)
{
double
duration = (stoppage.EndDelay - stoppage.StartDelay).TotalSeconds;
foreach
(LPD_COM_ENT.AUXValue variable
in
dlyDurationChartPeriods) {
if
(duration >= variable.IntegerValue && duration < variable.FloatValue) {
DurationChart[(
int
)variable.ValueSeq].Value++;
}
}
}
}
<
telerik:RadBarcodePDF417
Name
=
"barcode1"
Width
=
"480"
Height
=
"152"
HorizontalAlignment
=
"Left"
>
</
telerik:RadBarcodePDF417
>