danielepanozzo/cg

Strange behavior of code

Closed this issue · 3 comments

Hi TAs and Professor

I have a correctly working code for all the exercises (1 to 4). I developed it by hardcoding the .off file path in it. I developed it directly in release mode so it is working fine there.

But now I modified it so that I can input arguments using the command line, it is generating all-black images. I tried to debug it in debug mode, I find the same issue. It is entering the rasterize_triangle function. Don't know what is happening.

Can I submit my code with the hardcoded part and while grading, the grader can change the path inside the code and compile it and check?

I am trying my best to find and fix the issue but in case if I couldn't before the deadline.

Please let me know!

Utkarsh Khandelwal

Yes, please provide instructions to run your code in your report if possible.

And make sure that it runs in debug mode correctly when the paths are hardcoded.

Thanks!
But I found the issue just now.
I was creating the Eigen::Vector3f and was not initializing it. I assumed that it was (0.,0.,0.)
Now, I wonder how it was repeatedly working perfectly in the case of the release build.