SlimDX error with WPF Splitter

Found a possible bug in LightningChart? Report it here.

Moderator: Queue Moderators

Post Reply
Salto
Posts: 27
Joined: Mon Jan 13, 2014 5:43 pm

SlimDX error with WPF Splitter

Post by Salto » Fri Feb 07, 2014 11:16 am

Hello

I've a problem with the gridsplitter in WPF. When I move the splitter around the chart, the lightningchart crashes on a specific notebook. It works on my computer (NVIDIA NVS 310).

Example:

Code: Select all

    <Grid x:Name="gridChart" UseLayoutRounding="True">
        <Grid.RowDefinitions>
            <RowDefinition Height="*" />
            <RowDefinition Height="10" />
            <RowDefinition Height="25" />
        </Grid.RowDefinitions>
        <Grid.ColumnDefinitions>
            <ColumnDefinition Width="*" />
            <ColumnDefinition Width="10" />
            <ColumnDefinition Width="100" />
        </Grid.ColumnDefinitions>
        <lcu:LightningChartUltimate x:Name="customChart" Grid.Row="0" Grid.Column="0">
        </lcu:LightningChartUltimate>
        <GridSplitter Grid.Row="1" Grid.Column="0" Grid.ColumnSpan="3" Background="DarkViolet" Height="10" HorizontalAlignment="Stretch"></GridSplitter>
        <StatusBar Grid.Row="2" Grid.Column="0" Background="Gray" BorderThickness="1" BorderBrush="Silver">
            <StatusBarItem Name="statusBarItemItemGPU" HorizontalAlignment="Right">
                <StackPanel Orientation="Horizontal">
                    <TextBlock Name="textBlockGPU" Text="Device information">
                        <TextBlock.Style>
                            <Style TargetType="TextBlock">
                                <Setter Property="FontWeight" Value="Normal"/>
                                <Setter Property="Foreground" Value="Black"/>
                                <Style.Triggers>
                                    <Trigger Property="IsMouseOver" Value="True">
                                        <Setter Property= "FontWeight" Value="Bold"/>
                                        <Setter Property="Foreground" Value="DarkTurquoise"></Setter>
                                    </Trigger>
                                </Style.Triggers>
                            </Style>
                        </TextBlock.Style>
                    </TextBlock>
                </StackPanel>
            </StatusBarItem>
        </StatusBar>
        <Label Grid.Row="2" Grid.Column="2">Blasldkjdfsdf</Label>
        <Label Grid.Row="0" Grid.Column="2">Blasldkjdfsdf</Label>
        <GridSplitter Grid.Row="0" Grid.RowSpan="3" Grid.Column="1" Background="Blue" Width="10" HorizontalAlignment="Stretch"></GridSplitter>
    </Grid>
Error:

Code: Select all

System.AccessViolationException was unhandled
  HResult=-2147467261
  Message=Es wurde versucht, im geschützten Speicher zu lesen oder zu schreiben. Dies ist häufig ein Hinweis darauf, dass anderer Speicher beschädigt ist.
  Source=SlimDX
  StackTrace:
       bei SlimDX.ComObject.Destruct()
       bei SlimDX.ComObject.Dispose(Boolean )
       bei A.XG.CG()
       bei A.XG.UF(Int32 A, Int32 B)
       bei Arction.WPF.LightningChartUltimate.LightningChartUltimate.FBB(Double A, Double B)
       bei Arction.WPF.LightningChartUltimate.LightningChartUltimate.ArrangeOverride(Size availableSize)
       bei System.Windows.FrameworkElement.ArrangeCore(Rect finalRect)
       bei System.Windows.UIElement.Arrange(Rect finalRect)
       bei System.Windows.Controls.Grid.ArrangeOverride(Size arrangeSize)
       bei System.Windows.FrameworkElement.ArrangeCore(Rect finalRect)
       bei System.Windows.UIElement.Arrange(Rect finalRect)
       bei MS.Internal.Helper.ArrangeElementWithSingleChild(UIElement element, Size arrangeSize)
       bei System.Windows.Controls.ContentPresenter.ArrangeOverride(Size arrangeSize)
       bei System.Windows.FrameworkElement.ArrangeCore(Rect finalRect)
       bei System.Windows.UIElement.Arrange(Rect finalRect)
       bei System.Windows.Documents.AdornerDecorator.ArrangeOverride(Size finalSize)
       bei System.Windows.FrameworkElement.ArrangeCore(Rect finalRect)
       bei System.Windows.UIElement.Arrange(Rect finalRect)
       bei System.Windows.Controls.Border.ArrangeOverride(Size finalSize)
       bei System.Windows.FrameworkElement.ArrangeCore(Rect finalRect)
       bei System.Windows.UIElement.Arrange(Rect finalRect)
       bei System.Windows.Window.ArrangeOverride(Size arrangeBounds)
       bei System.Windows.FrameworkElement.ArrangeCore(Rect finalRect)
       bei System.Windows.UIElement.Arrange(Rect finalRect)
       bei System.Windows.ContextLayoutManager.UpdateLayout()
       bei System.Windows.ContextLayoutManager.UpdateLayoutCallback(Object arg)
       bei System.Windows.Media.MediaContext.InvokeOnRenderCallback.DoWork()
       bei System.Windows.Media.MediaContext.FireInvokeOnRenderCallbacks()
       bei System.Windows.Media.MediaContext.RenderMessageHandlerCore(Object resizedCompositionTarget)
       bei System.Windows.Media.MediaContext.RenderMessageHandler(Object resizedCompositionTarget)
       bei System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Int32 numArgs)
       bei MS.Internal.Threading.ExceptionFilterHelper.TryCatchWhen(Object source, Delegate method, Object args, Int32 numArgs, Delegate catchHandler)
       bei System.Windows.Threading.DispatcherOperation.InvokeImpl()
       bei System.Windows.Threading.DispatcherOperation.InvokeInSecurityContext(Object state)
       bei System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
       bei System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
       bei System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
       bei System.Windows.Threading.DispatcherOperation.Invoke()
       bei System.Windows.Threading.Dispatcher.ProcessQueue()
       bei System.Windows.Threading.Dispatcher.WndProcHook(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
       bei MS.Win32.HwndWrapper.WndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
       bei MS.Win32.HwndSubclass.DispatcherCallbackOperation(Object o)
       bei System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Int32 numArgs)
       bei MS.Internal.Threading.ExceptionFilterHelper.TryCatchWhen(Object source, Delegate method, Object args, Int32 numArgs, Delegate catchHandler)
       bei System.Windows.Threading.Dispatcher.LegacyInvokeImpl(DispatcherPriority priority, TimeSpan timeout, Delegate method, Object args, Int32 numArgs)
       bei MS.Win32.HwndSubclass.SubclassWndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam)
       bei MS.Win32.UnsafeNativeMethods.DispatchMessage(MSG& msg)
       bei System.Windows.Threading.Dispatcher.PushFrameImpl(DispatcherFrame frame)
       bei System.Windows.Threading.Dispatcher.PushFrame(DispatcherFrame frame)
       bei System.Windows.Threading.Dispatcher.Run()
       bei System.Windows.Application.RunDispatcher(Object ignore)
       bei System.Windows.Application.RunInternal(Window window)
       bei System.Windows.Application.Run(Window window)
       bei System.Windows.Application.Run()
       bei LightningChartSplitter.App.Main() in c:\Users\X\Documents\Visual Studio 2013\Projects\LightningChartSplitter\LightningChartSplitter\obj\Debug\App.g.cs:Zeile 0.
  InnerException: 
Device1:
HP Elitebook 8440p
Graphic card:
Intel HD(R) Graphics
Vendor ID: 0x8086
Render device created: Yes
Pure device: Yes
Fast vertex format: No
Hardware vertex processing: Yes
Anti-aliasing: No
Shader model 3: Yes
Index buffers: 32-bit
Support arbitrary texture size: Yes
Texture max size (WxH): 8192x8292

Can you help me or do you need more information?
Raphael

User avatar
ArctionPasi
Posts: 1367
Joined: Tue Mar 26, 2013 10:57 pm
Location: Finland
Contact:

Re: SlimDX error with WPF Splitter

Post by ArctionPasi » Fri Feb 07, 2014 10:34 pm

Sounds like an Intel driver problem. Please update the graphics drivers...
LightningChart Support Team, PT

Salto
Posts: 27
Joined: Mon Jan 13, 2014 5:43 pm

Re: SlimDX error with WPF Splitter

Post by Salto » Mon Feb 10, 2014 7:59 am

Good morning

I've updated the graphic driver on the newest version (8.15.10.2993) but the bug is still present.

ArctionJari

Re: SlimDX error with WPF Splitter

Post by ArctionJari » Mon Feb 10, 2014 10:50 am

We tested this on one of our laptops (using the latest version of LightningChart Ultimate) that has Intel HD Graphics 4000 graphics adapter and it worked just fine. I even copied the code you provided to my test application. So more or less it has to be an issue with Intel's driver for the graphics adapter you are using.

We have contacted Intel's support several times about the problems with their integrated graphics adapter drivers but they never answer. Naturally you could try to contact them yourself. This is a very unfortunate situation... :|

Salto
Posts: 27
Joined: Mon Jan 13, 2014 5:43 pm

Re: SlimDX error with WPF Splitter

Post by Salto » Mon Feb 10, 2014 3:12 pm

Do you have a list which graphic cards are not correct working with lightningchart or which have a lot of problems?

ArctionJari

Re: SlimDX error with WPF Splitter

Post by ArctionJari » Tue Feb 11, 2014 1:10 pm

Unfortunately we don't. Sometimes OEM manufacturers (the companies who make laptops) don't publish new drivers event though Intel has an updated version with possible bug fixes. OEM manufacturers want you to install their own drivers because there usually are some laptop specific modifications in them. In general Intel's drivers should work and they are updated if problems occur but OEM drivers aren't usually up to date and if new OEM drivers aren't available then the bug isn't fixed.

In our tests and from customer feedback Intel HD Graphics 2000-4000 have worked correctly but then again, if OEM drivers aren't updated, any possible bugs don't get fixed no matter what type of graphics adapter you are using.

By the way, I noticed that you are using HP Elitebook 8440p. Does is have two graphics adapters (integrated and maybe NVidia's or AMD's adapter)? If it has two then you can either disable the integrated adapter or use manufacturer's software (e.g. AMD has Control Center) to select which adapter to use with different applications). You should look into this if your HP has two adapters.

Salto
Posts: 27
Joined: Mon Jan 13, 2014 5:43 pm

Re: SlimDX error with WPF Splitter

Post by Salto » Mon Feb 17, 2014 3:18 pm

The notebook has only one graphic card :( The driver is uptodate. It's very strange, when I resize the MainWindow -> nothing happens. It's only when I resize the chart with the gridsplitter. What's the diffrence between window and splitter? Why there is no error by resize the window?

User avatar
ArctionPasi
Posts: 1367
Joined: Tue Mar 26, 2013 10:57 pm
Location: Finland
Contact:

Re: SlimDX error with WPF Splitter

Post by ArctionPasi » Mon Feb 17, 2014 3:28 pm

:?: :?: Please set a another Grid or UserControl in the place where LightningChart currently is. If you set LightningChart inside this other Grid (no columns or rows defined in that) or UserControl, does it work?
LightningChart Support Team, PT

Salto
Posts: 27
Joined: Mon Jan 13, 2014 5:43 pm

Re: SlimDX error with WPF Splitter

Post by Salto » Tue Feb 18, 2014 7:34 am

Good morning

No, it doesn't work :cry:
You mean it like this:

Code: Select all

<Window x:Class="LightningChartSplitter.MainWindow"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        xmlns:lcu="http://www.arction.com/schemas/"
        Title="MainWindow" Height="350" Width="525">
    <Grid x:Name="GridChart" UseLayoutRounding="True">
        <Grid.RowDefinitions>
            <RowDefinition Height="*" />
            <RowDefinition Height="10" />
            <RowDefinition Height="25" />
        </Grid.RowDefinitions>
        <Grid.ColumnDefinitions>
            <ColumnDefinition Width="*" />
            <ColumnDefinition Width="Auto" />
            <ColumnDefinition Width="*" />
        </Grid.ColumnDefinitions>
        <Grid Grid.Row="0" Grid.Column="0">
            <lcu:LightningChartUltimate x:Name="CustomChart">
            </lcu:LightningChartUltimate>
        </Grid>
        <GridSplitter Grid.Row="1" Grid.Column="0" Grid.ColumnSpan="3" Background="DarkViolet" Height="10" HorizontalAlignment="Stretch"></GridSplitter>
        <StatusBar Grid.Row="2" Grid.Column="0" Background="Gray" BorderThickness="1" BorderBrush="Silver">
            <StatusBarItem Name="statusBarItemItemGPU" HorizontalAlignment="Right">
                <StackPanel Orientation="Horizontal">
                    <TextBlock Name="textBlockGPU" Text="Device information">
                        <TextBlock.Style>
                            <Style TargetType="TextBlock">
                                <Setter Property="FontWeight" Value="Normal"/>
                                <Setter Property="Foreground" Value="Black"/>
                                <Style.Triggers>
                                    <Trigger Property="IsMouseOver" Value="True">
                                        <Setter Property= "FontWeight" Value="Bold"/>
                                        <Setter Property="Foreground" Value="DarkTurquoise"></Setter>
                                    </Trigger>
                                </Style.Triggers>
                            </Style>
                        </TextBlock.Style>
                    </TextBlock>
                </StackPanel>
            </StatusBarItem>
        </StatusBar>
        <Label Grid.Row="2" Grid.Column="2">BlaBla</Label>
        <Label Grid.Row="0" Grid.Column="2">BlaBla</Label>
        <GridSplitter Grid.Row="0" Grid.RowSpan="3" Grid.Column="1" Background="Blue" Width="10" HorizontalAlignment="Stretch" ResizeDirection="Columns" ResizeBehavior="PreviousAndNext"/>
    </Grid>
</Window>
I have also tried it with a UserControl, but nothing works.

User avatar
ArctionPasi
Posts: 1367
Joined: Tue Mar 26, 2013 10:57 pm
Location: Finland
Contact:

Re: SlimDX error with WPF Splitter

Post by ArctionPasi » Wed Feb 19, 2014 7:10 pm

We found equivalent "Intel HD Graphics" laptop. In this device, we can't update the drivers at all. Intel official drivers won't install, and laptop manufacturer (HP) hasn't released new drivers in ages for this model.

WPF grid splitter movement really causes a crash after doing it a couple of seconds.

Because we can't count on Intel's or HP's help in any driver related issue :firing: , we'll try to find a workaround for this model that prevents crashing. It may take a couple of days... :|
LightningChart Support Team, PT

User avatar
ArctionPasi
Posts: 1367
Joined: Tue Mar 26, 2013 10:57 pm
Location: Finland
Contact:

Re: SlimDX error with WPF Splitter

Post by ArctionPasi » Fri Feb 21, 2014 3:42 pm

Fixed in v.5.5.1 today. :ugeek:
LightningChart Support Team, PT

Salto
Posts: 27
Joined: Mon Jan 13, 2014 5:43 pm

Re: SlimDX error with WPF Splitter

Post by Salto » Fri Mar 28, 2014 2:21 pm

It works also on our notebook.
Thanks a lot! :D

Post Reply