© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
C#C
C#•2y ago•
18 replies
Tare

Unknown Access Violation Error

Hi, I am getting the error in the picture below, but I am not doing anything that would cause the error to happen. This is the "NativeNewContext" function
[DllImport(Dlls.AeroxWidgetsNative, EntryPoint = "msdfRenderContext",CallingConvention = CallingConvention.Cdecl)]
    private static extern IntPtr NativeNewContext();
[DllImport(Dlls.AeroxWidgetsNative, EntryPoint = "msdfRenderContext",CallingConvention = CallingConvention.Cdecl)]
    private static extern IntPtr NativeNewContext();


And this is the function in c++

struct GlyphContext
{
    msdfgen::Point2 position{};
    msdfgen::Shape * shape;
    msdfgen::Contour * contour;
    GlyphContext();
    ~GlyphContext();
};


EXPORT GlyphContext * msdfNewContext();

GlyphContext * msdfNewContext()
{
    return new GlyphContext();
}
struct GlyphContext
{
    msdfgen::Point2 position{};
    msdfgen::Shape * shape;
    msdfgen::Contour * contour;
    GlyphContext();
    ~GlyphContext();
};


EXPORT GlyphContext * msdfNewContext();

GlyphContext * msdfNewContext()
{
    return new GlyphContext();
}
image.png
C# banner
C#Join
We are a programming server aimed at coders discussing everything related to C# (CSharp) and .NET.
61,871Members
Resources

Similar Threads

Was this page helpful?
Recent Announcements

Similar Threads

JoltPhysicsSharp access violation
C#CC# / help
3y ago
❔ c# wpf textbox access violation
C#CC# / help
3y ago
✅ Unknown error
C#CC# / help
4d ago
✅ unknown error
C#CC# / help
2y ago