openMVG: openMVG compiled with Visual Studio 2015, 64 bits, crashes for some projects
For certain (generally larger) projects, openMVG crashes on Windows. The same projects run fine under Linux.
Compiled with Visual Studio 2015, 64 bits.
Executable that crashes:
openMVG_main_IncrementalSfM -i D:\someproject\matches\sfm_data.json -m D:\someproject\matches -o D:\someproject\reconstruction_sequential
In release mode, the crash is silent and the executable will run forever using one full core, never finishing the process. In Debug mode, an assertion is violated:
---------------------------
Microsoft Visual C++ Runtime Library
---------------------------
Debug Assertion Failed!
Program: C:\WINDOWS\SYSTEM32\MSVCP140D.DLL
File: C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\include\xtree
Line: 262
Expression: map/set iterator not incrementable
For information on how your program can cause an assertion
failure, see the Visual C++ documentation on asserts.
(Press Retry to debug the application)
---------------------------
Abort Retry Ignore
---------------------------
These are the relevant stackframes:
/* STACK FRAMES (most recent first) */
// FRAME 0: xtree
_Myiter& operator++()
{ // preincrement
#if _ITERATOR_DEBUG_LEVEL == 2
if (this->_Getcont() == 0
|| this->_Ptr == 0
|| _Mytree::_Isnil(this->_Ptr))
{ // report error
_DEBUG_ERROR("map/set iterator not incrementable");
_SCL_SECURE_OUT_OF_RANGE; // <-- break
}
// FRAME 1: xutility
template<class _BidIt,
class _Diff> inline
void _Distance2(_BidIt _First, _BidIt _Last, _Diff& _Off,
bidirectional_iterator_tag)
{ // add to _Off distance between bidirectional iterators (redundant)
for (; _First != _Last; ++_First) // <-- break
++_Off;
}
// FRAME 2: xutility
template<class _InIt,
class _Diff> inline
void _Distance(_InIt _First, _InIt _Last, _Diff& _Off)
{ // add to _Off distance between iterators
_Distance2(_First, _Last, _Off, _Iter_cat(_First)); // <-- break
}
// FRAME 3: xtree
size_type count(const key_type& _Keyval) const
{ // count all elements that match _Keyval
_Paircc _Ans = equal_range(_Keyval);
size_type _Num = 0;
_Distance(_Ans.first, _Ans.second, _Num);
return (_Num); // <-- break
}
// FRAME 4: sequential_SfM.cpp (L:1120)
if (sfm_data_.structure.count(trackId) != 0) // <-- break
I do not know how I can provide any further information that would help track down this bug. I may not be able to provide the actual source photos due to usage rights, but I might be able to send the openMVG files if that is of any use (it does weigh in at 955 MB though).
About this issue
- Original URL
- State: closed
- Created 8 years ago
- Comments: 33 (17 by maintainers)
Commits related to this issue
- [openMVG/pipelines/sequential] Fix a multithread issue #589 — committed to openMVG/openMVG by pmoulon 8 years ago
- [openMVG/pipelines/sequential] Fix a multithread issue #589. Run OpenMP thread in a different way. — committed to openMVG/openMVG by pmoulon 8 years ago
I just noticed it finished computing, so it seems the fix works. 😃