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

Subtraction overflow in build_escape_pod #1

Open
dodomorandi opened this issue Aug 25, 2020 · 2 comments
Open

Subtraction overflow in build_escape_pod #1

dodomorandi opened this issue Aug 25, 2020 · 2 comments

Comments

@dodomorandi
Copy link

Running the game in debug triggers a subtraction overflow at nox_planet/src/region/builder/buildings.rs:21:26 (and obviously the following line is affected as well). I imagine that the intended behavior is to overflow and take the modulo of layer height/width, right?

I can send you a PR if you want, I know that this is you personal project, so I am happy to give some tiny help and I don't get offended if you say no ☺️

In any case, I listened to the podcast in which you were talking about this project. Really, really awesome work! Thank you for your efforts and your passion ❤️

P.S.: I just changed the initialization process to use wgpu::BackendBit::DX12 to wgpu::BackendBit::PRIMARY to make it work on Mac, everything seems fine!

P.P.S.: Uh, it looks like there are some similar issues around, I just got another overflow in nox_planet/src/region/builder/flags.rs:85:43 -- these are tricky to find without the overflow checker at runtime (almost impossible in C++ 🙄).

@thebracket
Copy link
Owner

thebracket commented Aug 25, 2020

Sadly, there are a few overflows (the rivers code is particularly bad). Right now, it's a 1:1 port of a lot of C++ code - so I'm tracking those down. I'm working away in a branch that will change the structure of some of the project (it grabs the latest WGPU and Legion, which require a lot of reworking anyway). My plan is to get to these issues once that is a bit more solidified.

Thanks - and I'm glad you're enjoying it. :-)
(I do have a bad habit of running it in Release mode for speed and not seeing all of these pop up)

@thebracket
Copy link
Owner

The current build needs some other work (I'm finding that array textures aren't working out side of Vulkan land), but it should have fixed the overruns!

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