HoughLines segfault (Bug #2377)


Added by Harijs Grinbergs over 12 years ago. Updated about 12 years ago.


Status:Done Start date:
Priority:Normal Due date:
Assignee:Ivan Korolev % Done:

0%

Category:imgproc, video
Target version:2.4.4
Affected version:2.4.2 Operating System:
Difficulty: HW Platform:
Pull request:

Description

HoughLines function segfaults, even in the houghlines.cpp example. Right now I build using this simple cmd line:

g++ houghlines.cpp -lopencv_core242 -lopencv_imgproc242 -lopencv_calib3d242 -lopencv_video242 -lopencv_features2d242 -lopencv_ml242 -lopencv_highgui242 -lopencv_objdetect242 -lopencv_contrib242 -lopencv_legacy242 -I"C:\OpenCV2.4.2\Builds\install\include" -L"C:\OpenCV2.4.2\Builds\install\lib" 
The HoughLinesP variant works fine,so the default example works fine as well. You have to open the .cpp and change the #if 0 to 1 and then try with the regular HoughLines. GDB output:
[New Thread 7284.0x1e08]
Program received signal SIGSEGV, Segmentation fault.
0x64352f60 in icvHoughLinesStandard(CvMat const*, float, float, int, CvSeq*, int) () from C:\OpenCV2.4.2\Builds\install\bin\libopencv_imgproc242.dll
I had the same problem in 2.4.1, so I upgraded in hopes that it is fixed. I found this problem in a project where I use SSE3, so at first I thought that was the problem, but right now it SIGSEGV even in the example. As this is a very commonly used function I was surprised to see that this was not reported here (at least I couldn't find it when I searched). And I have tried several clean builds of different versions, so I am sure its not a problem on my end. All of the other functions I tried have worked without problems.


houghlines.cpp (1.6 kB) Harijs Grinbergs, 2012-09-20 02:04 pm


Associated revisions

Revision b96923d5
Added by Andrey Pavlenko about 11 years ago

Merge pull request #2377 from alalek:tapi_warpers_perf_test

History

Updated by Andrey Pavlenko over 12 years ago

  • Category set to imgproc, video
  • Assignee set to Vadim Pisarevsky
  • Start date deleted (2012-09-20)

Updated by Vadim Pisarevsky over 12 years ago

  • Target version deleted ()
  • Assignee deleted (Vadim Pisarevsky)

Updated by Evgeny Talanin over 12 years ago

Harijs, I built the example from houghlines.cpp with gcc (OpenCV 2.4.2 and current master branch, both built locally from source code), mingw (2.4.1, binaries from Windows install pack, compiling example with cmd line you typed above) and vs10 (2.4.2, built from source) both with #if 0 and #if 1 and was always able to get a result and don't receive any segfault.
Could you please provide more details about how the way you get this error: settings in cmake when building OpenCV, OS and compiler info, any modifications to source?

  • Priority changed from High to Normal
  • Assignee set to Evgeny Talanin

Updated by Vadim Pisarevsky over 12 years ago

cancelled, since the bug can not be reproduced

  • Status changed from Open to Cancelled

Updated by Heinrich Hans over 12 years ago

I have the same issue as Harijs Grinbergs. I am using Visual Studio 2012 under Win7 64-bit. Tested several images, always got segfaults. If a Mat is used instead of std::vector everything works fine.

Updated by Kirill Kornyakov over 12 years ago

OK, it seems that we need to investigate this further...

Heinrich, are you getting segfaults with the latest OpenCV 2.4.3? Are you using the prebuilt version from Sourceforge, or build library from sources?

  • Target version set to 2.4.4
  • Status changed from Cancelled to Open

Updated by Heinrich Hans over 12 years ago

I am using OpenCV 2.4.2 and I have built it from the sources.

Updated by Anna Kogan over 12 years ago

Could you please try it with OpenCV 2.4.3?

Updated by Vadim Pisarevsky about 12 years ago

Ok, I think, it makes sense to make a small smoke test for this very picture with these very parameters and add it to opencv unit tests. Then we'll see if the function crashes on some platforms. If the test will pass in all our configurations of our buildbot, we'll close the ticket.

  • Affected version set to 2.4.2
  • Target version deleted (2.4.4)

Updated by Vadim Pisarevsky about 12 years ago

  • Assignee deleted (Evgeny Talanin)

Updated by Ivan Korolev about 12 years ago

  • Assignee set to Ivan Korolev

Updated by Ivan Korolev about 12 years ago

Added regression test for HoughLines algorithm (9908ff3 and commit to opencv_extra). We are waiting for test results of all our configurations of our buildbot.

Updated by Ivan Korolev about 12 years ago

All regression tests passed in all configurations of our buildbot.

  • Status changed from Open to Done

Updated by Kirill Kornyakov about 12 years ago

  • Target version set to 2.4.4

Also available in: Atom PDF