Using large image will crash the DLL
Brought to you by:
zerofrog
Hi,
If you try to call "GetKeypoints( );" with a large image, the DLL will crash without any message. The bug is present from version 1.0 until 1.2 included!
Are you aware of this behavior?
Smaller images (2000px x 3000px) will also crash.
Regards
View and moderate all "bugs Discussion" comments posted by this user
Mark all as spam, and block user from posting to "Bugs"
there was a couple of problems, i think i fixed them in revision 50. can you check out the sources from svn, compile, if it still crashes, you most likely need to add more memory to your machine.
View and moderate all "bugs Discussion" comments posted by this user
Mark all as spam, and block user from posting to "Bugs"
Unfortunately, it does not solve the issue :
1) on Windows, with Visual Studio 2005 the following errors appear when compiling the SVN revision 50:
1>------ Build started: Project: libsiftfast-static, Configuration: Release Win32 ------
1>Compiling...
1>libsiftfast.cpp
1>..\libsiftfast.cpp(267) : warning C4244: '=' : conversion from 'double' to 'float', possible loss of data
1>..\libsiftfast.cpp(268) : warning C4244: '=' : conversion from 'double' to 'float', possible loss of data
1>..\libsiftfast.cpp(384) : error C3861: 'log2': identifier not found
1>..\libsiftfast.cpp(389) : error C2228: left of '.push_back' must have class/struct/union
1>..\libsiftfast.cpp(389) : error C3861: 'log2': identifier not found
1>..\libsiftfast.cpp(551) : error C3016: 'ikey' : index variable in OpenMP 'for' statement must have signed integral type
1>Build log was saved at "file://u:\libsiftfast-1.2Build50-src\build\libsiftfast-static.dir\Release\BuildLog.htm"
1>libsiftfast-static - 4 error(s), 2 warning(s)
========== Build: 0 succeeded, 1 failed, 1 up-to-date, 0 skipped ==========
I had to write my own "log2" function.
I had to declare the OPEN_MP for loop with "long long" instead of "unsigned int".
2) I changed you file in order to make it run correctly :
see attached file!
1>------ Build started: Project: libsiftfast-static, Configuration: Release Win32 ------
1>Building Custom Rule U:/Programmation/libSIFTFast_LPM/libsiftfast-1.2Build50-src/CMakeLists.txt
1>CMake does not need to re-run because CMakeFiles/generate.stamp is up-to-date.
1>Compiling...
1>libsiftfast.cpp
1>..\libsiftfast.cpp(277) : warning C4244: '=' : conversion from 'double' to 'float', possible loss of data
1>..\libsiftfast.cpp(278) : warning C4244: '=' : conversion from 'double' to 'float', possible loss of data
1>..\libsiftfast.cpp(394) : warning C4244: 'argument' : conversion from 'double' to 'unsigned int', possible loss of data
1>..\libsiftfast.cpp(562) : warning C4244: 'argument' : conversion from '__int64' to 'unsigned int', possible loss of data
1>..\libsiftfast.cpp(563) : warning C4244: 'argument' : conversion from '__int64' to 'unsigned int', possible loss of data
1>..\libsiftfast.cpp(564) : warning C4244: 'argument' : conversion from '__int64' to 'unsigned int', possible loss of data
1>..\libsiftfast.cpp(565) : warning C4244: 'argument' : conversion from '__int64' to 'unsigned int', possible loss of data
1>Creating library...
1>Build log was saved at "file://\libsiftfast-1.2Build50-src\build\Release\BuildLog.htm"
1>libsiftfast-static - 0 error(s), 7 warning(s)
========== Build: 1 succeeded, 0 failed, 1 up-to-date, 0 skipped ==========
3) The machine has 3Go of RAM. It does not seems to be a problem of RAM that causes the crash.
4) Even though, the "GetKeypoints( );" crashes...
View and moderate all "bugs Discussion" comments posted by this user
Mark all as spam, and block user from posting to "Bugs"
the modification to make it run under VisualStudio 2005
thanks! i committed your changes.
it looks like the crash is occuring inside openmp when writing an sse register to a 0 memory address, i was conveniently assuming it was due to a out-of-memory issue...
another likely possibility is that openmp is using the stack space for storing the local image, and it is exhausting this...
On further inspection, the memory allocation is failing. basically i get 8 fails of 500M each on a machine with 3GB RAM. Perhaps you might want to consider testing on a x64 machine. i added error messages in r52