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

Different output for make release vs. g++ #60

Open
radhikamattoo opened this issue Oct 11, 2017 · 2 comments
Open

Different output for make release vs. g++ #60

radhikamattoo opened this issue Oct 11, 2017 · 2 comments

Comments

@radhikamattoo
Copy link

I've been using the g++ command to run my code, and when I do it seems to run fine, but when I try to use make with the release option for faster computation, I get completely different outputs.

When I run g++ src/main.cpp -I ext/eigen then ./a.out my code runs like expected.

When I run (within the build directory) cmake -DCMAKE_BUILD_TYPE=Release ../ then make then ./Assignment1_bin I get different errors each time I try. Sometimes I get:

Assertion failed: (nbRows >= 0 && (RowsAtCompileTime == Dynamic || RowsAtCompileTime == nbRows) && nbCols >= 0 && (ColsAtCompileTime == Dynamic || ColsAtCompileTime == nbCols)), function CwiseNullaryOp, file /Users/mattoor/Desktop/School/Graduate/Computer Graphics/homework/assignment-1-radhikamattoo/ext/eigen/Eigen/src/Core/CwiseNullaryOp.h, line 63.
Abort trap: 6

Sometimes I just get:
Segmentation fault: 11

Other times my code runs, but doesn't detect any intersections at all and just outputs a black image.

Is there any way to stop this? Why am I getting different errors? My current code is in my repo.

@jiangzhongshi
Copy link
Collaborator

jiangzhongshi commented Oct 12, 2017

Hi,

I tried to run your code. The reason that it's different is that your executable is in a different location, and so the path of off isn't able to be found. So your function for readOFF fails and your subsequent operations produces a memory violation.

Best,
Zhongshi

@jiangzhongshi
Copy link
Collaborator

jiangzhongshi commented Oct 12, 2017 via email

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