using ImGuiListClipperPtr triggers AccessViolationException after upgrading to 1.89
See original GitHub issueHi,
after upgrading to v1.89.5 the following code causes as System.AccessViolationException:
unsafe
{
var clipperData = new ImGuiListClipper();
var listClipperPtr = new ImGuiListClipperPtr(&clipperData);
listClipperPtr.Begin(items.Count, ImGui.GetTextLineHeightWithSpacing());
}
Maybe I’m using the API in an unintended way, but it I assume something changed in the implementation. This could also be on the ImGui side, but I’m not good enough with C to write an example.
Issue Analytics
- State:
- Created 4 months ago
- Comments:13
Top Results From Across the Web
AccessViolationException Class (System)
An AccessViolationException occurs only when verifiable managed code interacts with unmanaged code or with unsafe managed code.
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

the workaround is here (https://github.com/ImGuiNET/ImGui.NET/issues/401#issuecomment-1566216444) if you want to use that while waiting for a final fix.
==solution==
i am not sure if this is how we should do it…or if this is the right ctx to use but this is one possible solution.