8000 Fix Double Error On Windows by Kushal-Shah-03 · Pull Request #911 · elalish/manifold · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Fix Double Error On Windows #911

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

Closed
wants to merge 6 commits into from

Conversation

Kushal-Shah-03
Copy link
Contributor
@Kushal-Shah-03 Kushal-Shah-03 commented Sep 3, 2024

Fixes #910, hopefully.

I had an idea through my experimentation on Windows and just wanted to check if it's correct.

@Kushal-Shah-03
Copy link
Contributor Author

@elalish @pca006132 I might have misinterpreted the outputs, but it seems to me like the error is merely caused by overflow of memory in the stack? and we would just need to allocate it in the heap? I was trying to fix it, but I wasn't sure about my interpretation of these errors. So wanted to get your approval first.

Copy link
codecov bot commented Sep 3, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 89.76%. Comparing base (d437097) to head (3f24dd9).
Report is 84 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master     #911      +/-   ##
==========================================
- Coverage   91.84%   89.76%   -2.08%     
==========================================
  Files          37       66      +29     
  Lines        4976     9813    +4837     
  Branches        0     1055    +1055     
==========================================
+ Hits         4570     8809    +4239     
- Misses        406     1004     +598     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@elalish
Copy link
Owner
elalish commented Sep 3, 2024

Ah, a Stack Overflow - I suppose that could make sense since it's only happening on our largest input files and only after switching to double precision. But what is being allocated on the stack? The vector should just be a pointer to its heap allocation. I wonder if this is some idiosyncrasy of the way initializer lists are handled in our tests? By all means, if you have an idea, feel free to try it out here.

@Kushal-Shah-03
Copy link
Contributor Author

So, I think it's possible that when we allocate the polygons which are bigger in input. The entire vector declared is initially in the stack, since we're declaring it in one go?(I'm not sure if that's the case). So, we can maybe try to push_back each point in each SimplePolygon?

Also, since this input is so large, why don't we write it all in a file and read from it by adding the points 1 by 1 in the process?

@elalish
Copy link
Owner
elalish commented Sep 3, 2024

Also, since this input is so large, why don't we write it all in a file and read from it by adding the points 1 by 1 in the process?

Yeah, that's probably the right approach. Our current system was designed only to be very easy to copy-paste from our std out spew to a new test, not so much for extremely large polygons.

@Kushal-Shah-03
Copy link
Contributor Author

Alright, I had started some work on it, but I see that @pca006132 is already much further along than I am. If there's something I can help out with, ping me. Till then, I'll go back to my prior tasks.

@elalish
Copy link
Owner
elalish commented Sep 4, 2024

Closing in favor of #913.

@elalish elalish closed this Sep 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
59E8
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Fix Windows CI
2 participants
0