question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

using ImGuiListClipperPtr triggers AccessViolationException after upgrading to 1.89

See original GitHub issue

Hi,

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:closed
  • Created 4 months ago
  • Comments:13

github_iconTop GitHub Comments

1reaction
zaafarcommented, May 29, 2023

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.

1reaction
zaafarcommented, May 28, 2023

==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.

image

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found