sharpdx / SharpDX

SharpDX GitHub Repository
http://sharpdx.org
MIT License
1.68k stars 642 forks source link

Error in 4.2 version that not was in 4.0.1 version #1136

Open RachamimYaakobov opened 5 years ago

RachamimYaakobov commented 5 years ago

I run CustomFont sample, and I use NuGet to install SharpDx, if I install 4.0.1 version all good, but if I install 4.2 version I get the following error:

Unexpected error. Reason : System.ObjectDisposedException: Cannot access a disposed object.

שם אובייקט: 'Cannot add a reference to a nonreferenced item'.

ב- SharpDX.CallbackBase.AddReference()

ב- SharpDX.ComObjectShadow.AddRefImpl()

ב- SharpDX.ComObjectShadow.ComObjectVtbl.AddRefImpl(IntPtr thisObject)

ב- SharpDX.Direct2D1.RenderTarget.DrawTextLayout(RawVector2 origin, TextLayout textLayout, Brush defaultFillBrush, DrawTextOptions options)

ב- SharpDX.Direct2D1.RenderTarget.DrawTextLayout(RawVector2 origin, TextLayout textLayout, Brush defaultForegroundBrush)

ב- FontsFromFolder.CustomFont.renderControl_Paint(Object sender, PaintEventArgs e) ב- K:\SharpDX-master\Samples\SharpDX-Samples-master\Desktop\DirectWrite\CustomFont\CustomFont.cs:שורה 159