Quantcast
Channel: R.NET
Viewing all articles
Browse latest Browse all 1634

Created Unassigned: Calling "q()" with a graphics device installed causes a crash [139]

$
0
0
This code will cause R.Net to crash:

class Program
{
static void Main(string[] args)
{
using (var engine = REngine.GetInstance())
{
engine.Install(new TestGraphicsDevice());
engine.Evaluate("q()");
Console.ReadKey();
engine.Dispose();
}
}
}

class TestGraphicsDevice : IGraphicsDevice
{
public string Name { get { return "TestGraphicsDevice"; } }
public void OnActivated(DeviceDescription description)
{
description.Bounds = new Rectangle(0, 0, 500, 500);
}
...the rest of the IGraphicsDeviceImplementation methods are empty or return default...

Viewing all articles
Browse latest Browse all 1634

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>