Skip to content

[Bug]: SDL3+OpenGL3 seems generally broken for win-x86 RID #131

Description

@fkelava

Pre-submission Checklist

  • I have read the FAQ Wiki
  • I have searched existing issues and this is not a duplicate
  • I am using the latest version of Hexa.NET.ImGui

Hexa.NET.ImGui Version

2.2.9

Bug Description

This is just a report for the future so someone else running into it doesn't get confused. I know you're busy and don't expect you to act on it or fix it any time soon.

In this repo is an ExampleSDL3OpenGL3. If this example is compiled with -r win-x86 or <RuntimeIdentifier>win-x86</RuntimeIdentifier>, it will only in Release mode fail with a spurious:

Unhandled exception. System.NullReferenceException: Object reference not set to an instance of an object.
   at Program.<Main>$(String[] args) in D:\Hexa.NET.ImGui\Examples\ExampleSDL3OpenGL3\Program.cs:line 99

Core dump shows a nondescript access violation. It seems to occur at or around ImGuiImplOpenGL3.RenderDrawData, at which point I can no longer follow the trace due to lack of symbols.

This is not a bug specifically with the example, but generally somewhere in the OGL or SDL bits. Even if you strictly replicate the approach of the upstream ImGui SDL3+OGL3 example, it will fail in the same way. I used the same exact package versions as the example in my own project to ensure parity, and it reproduces with perfect reliability.

Example dump attached. ExampleSDL3OpenGL3.exe.16208.dmp

The issue does not recur with RID win-x64. I do not know whether it occurs on non-Windows RIDs.

Steps to Reproduce

  1. Clone Hexa.NET.ImGui at tag v2.2.9.
  2. Set the RuntimeIdentifier to win-x86.
  3. Run ExampleSDL3OpenGL3 in Release.
  4. Kaboom.

Expected Behavior

No kaboom.

Platform

Windows

.NET Version

net9.0;net10.0

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions