Skip to content

backend:/texture: NewTextureFromRgba causes potential crash #350

@gucio321

Description

@gucio321

Turns out that the following line:

        // Set finalizer
        runtime.SetFinalizer(&texture, (*Texture).release)

from backend/texture.go, which was intended to smoothly release C memory of freed by GC texture, in fact was a time bomb. When GC got the pointer it caused a SEGFAULT.

This is mmost likely because gl functions should be called in a very particular time (probably after or before ImGuiImpl_OpenGL3_NewFrame()) or maybe in a specific thred (?)

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions