Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Uninitialized Pixels member leading to random infinite loop #313

Closed
dpunset opened this issue Jan 14, 2022 · 1 comment
Closed

Uninitialized Pixels member leading to random infinite loop #313

dpunset opened this issue Jan 14, 2022 · 1 comment

Comments

@dpunset
Copy link

dpunset commented Jan 14, 2022

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.

@epezent
Copy link
Owner

epezent commented Jan 30, 2022

3a53f0b

Thanks for the heads up. Let me know if this doesn't resolve the issue completey.

@epezent epezent closed this as completed Jan 30, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants