awf / OpenSubdiv-Model-Fitting

Fitting subdivision surfaces to data

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Intermittent Crashes on Line 424 & 452

adam-hartshorne opened this issue · comments

#I have built the code using VS2015 on Windows 10. I am as instructed using the forked version of Eigen and the latest OpenSubDiv from the dev branch.

With this setup, I am encountering a intermittent read access #violation, which originates from Line 424 of the main "fit-subdiv-to-3d-points.cpp" file.

params.us[i] = uvs[test_pt_index];

I am currently investigating why this occurs, but I can't immediately see why this is occurring.

If it runs past this, I even more commonly get a crash relating to line 452,

Eigen::LevenbergMarquardtSpace::Status info = lm.minimize(params);

which comes from a problem resulting from a return related to line 246

pts.push_back({ face_new, { u1_old, u2_old } });

from within the Eigen library (PacketMath.h line 354)

template<> EIGEN_STRONG_INLINE void pstore(double* to, const Packet2d& from) { EIGEN_DEBUG_ALIGNED_STORE _mm_store_pd(to, from); }


I have rebuilt the project using Intel Compiler 2017 and do not suffer these issues. Thus I have to conclude there is a specific issue relating to the code in relation to the VS2015 compiler (which I believe doesn't provide full support for C++11 and C++14).

I can also confirm that the intermittent crashing issue is not present when building with VS2017, thus it appears to be a specific issue relating to VS2015.