Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Access Violation With using ImGui.Begin #453

Open
bennytrt opened this issue Dec 1, 2023 · 2 comments
Open

Access Violation With using ImGui.Begin #453

bennytrt opened this issue Dec 1, 2023 · 2 comments

Comments

@bennytrt
Copy link

bennytrt commented Dec 1, 2023

Hello, I'm Experiencing an Access Violation error at ImGui.Begin

System.AccessViolationException: 'Attempted to read or write protected memory. This is often an indication that other memory is corrupt.'

My Code :
`using System;
using ImGuiNET;
using Veldrid;
using Vortice;
using Vortice.Direct3D9;

class Program
{

static void Main()
{
    ImGui.CreateContext();
    ImGui.StyleColorsDark();

    ImGui.Begin("Atonix - Gmod");

    ImGui.Text("TestTest6969");

    if (ImGui.Button("Click Me For Joe."))
    {
        Console.WriteLine("Joe's Great Ball");
    }

    ImGui.InputText("FiFaFo", IntPtr.Zero, 100, ImGuiInputTextFlags.EnterReturnsTrue, null);

    // commented out becuz i wanna see if i can use this for other stuff
    // ImGui.GetDrawData(); 

    ImGui.Render();

    System.Threading.Thread.Sleep(16);

    ImGui.End();

}

}`

@sanny-io
Copy link

I'm also getting this error (.NET 8). This other issue here might be related.

aybe/DearImGui#23

@sicusa
Copy link

sicusa commented Jan 5, 2024

.NET 8, MacBook Pro M2 Max

using ImGuiNET;

ImGui.CreateContext();
ImGui.StyleColorsDark();
ImGui.NewFrame();

crashed on ImGui.NewFrame().

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants