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

Crashes when building with Visual Studio 2019 on Windows 11 #1

Closed
roponator opened this issue Jul 9, 2022 · 2 comments
Closed

Crashes when building with Visual Studio 2019 on Windows 11 #1

roponator opened this issue Jul 9, 2022 · 2 comments

Comments

@roponator
Copy link

roponator commented Jul 9, 2022

Hi,

I wanted to try this out on Windows 11 where cmake creates a Visual Studio 2019 project.

But when trying to run it the app crashes. Visual studio also reports potential errors in the code at multiple places.

The error is in triangle.h, line 13988: vertexloop[0] = vertices[i][0];
The vertexloop seems to be allocated incorrectly.

Even after I tried doing a brute malloc instead of the pool it crashed elsewhere.

I tried it on the bottle model.

@roponator
Copy link
Author

Found the solution:
replace all unsigned long with int64_t because in C "unsigned long" can be 32 bit, which it is when compiling with visual studio so it discards the upper portion of the 64 bit pointer.

@SarahWeiii
Copy link
Owner

Thank you for pointing it out. I have updated the code.

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