Skip to content

Uninitialized Pixels member leading to random infinite loop #313

@dpunset

Description

@dpunset

Hello,

The method ImPlot::BeginPlot was very rarely leading to an "infinite" loop, and I found that the reason was not having the member Pixels initialized in the constructor of ImPlotAxis like everything else. When calling SetAspect on the X Axis for the first time this was giving random results, sometimes giving a really large number.

I noticed that the code has changed, and Pixels doesn't exist anymore, but there is PixelMin and PixelMax, that don't seem to be initialized either. Since the code has changed a lot and I don't have the new version I can't verify if the issue still persists with the new implementation, but it's very likely it does, and it wouldn't harm to have those initialized to something.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions