SharpDX.SharpDXException when creating a chart in code

A forum dedicated to WinForms version of LightningChart Ultimate.

Moderator: Queue Moderators

Post Reply
mat-d
Posts: 19
Joined: Sat Jun 26, 2021 4:27 am

SharpDX.SharpDXException when creating a chart in code

Post by mat-d » Fri Nov 26, 2021 6:43 am

Without any obvious code of config change lightning charts has stopped running in my winforms solution.

Even a new project in the same solution fails with this error:

In a new solution the I don't get the error.

I've got no idea what happening:

SharpDX.SharpDXException: 'HRESULT: [0x887A0004], Module: [SharpDX.DXGI], ApiCode: [DXGI_ERROR_UNSUPPORTED/Unsupported], Message: The specified device interface or feature level is not supported on this system.

i've created two new winforms projects on ein the old solution one in a new and installed the latest lightning charts via nuget, and added the following to the generated code:

```
using Arction.WinForms.Charting;
using Arction.WinForms.Charting.SeriesXY;
using Arction.WinForms.Charting.Views.ViewXY;


namespace Monitor
{
public partial class Form1 : Form
{
protected LightningChart _chart;

public Form1()
{
InitializeComponent();

_chart = new LightningChart();

_chart.BeginUpdate();

_chart.Visible = true;
_chart.Parent = this;
_chart.Dock = DockStyle.Fill;
_chart.Visible = true;

_chart.EndUpdate();
}
}
}
```


in the new solution this runs fine, in the old solution it crashes as above.

what on earth is going on?

mat-d
Posts: 19
Joined: Sat Jun 26, 2021 4:27 am

Re: SharpDX.SharpDXException when creating a chart in code

Post by mat-d » Fri Nov 26, 2021 9:42 am

after a horrible day,

I committed my code,
cloned it again from git to a new directory

now it works

no idea why

maybe i'll diff the folders again in the morning

ArctionKestutis
Posts: 552
Joined: Mon Mar 14, 2016 9:22 am

Re: SharpDX.SharpDXException when creating a chart in code

Post by ArctionKestutis » Fri Nov 26, 2021 10:03 am

It is probably related to hybrid GPUs / (Desktop Duplication API) issue described before. Microsoft article on this topic is here. Similar description of problem could be found elsewhere, e.g. .
Typical workaround is to disable (or force on) one graphic card.

Post Reply