mingw32 SSE/SSE2 instabilities (Bug #583)
Description
I've found that I've had to turn off SSE and SSE2 when building on my system (Windows XP 32bit, CMake 2.8, Qt 2010.04's mingw32) in order to resolve crashes in imread and resize. With that in mind, I'm recommending having these flags unchecked by default when compiling with mingw32.
Related issues
related to Bug #1494: imshow crash on Windows 7 32bits | Cancelled | |||
related to Bug #1668: crash using namedWindow | Cancelled | |||
related to Patch #1896: imshow crash | Cancelled | 2012-05-06 | ||
related to Bug #1926: OpenCV2.4 lib complied by mingw not working | Cancelled | 2012-05-13 | ||
duplicates Bug #1932: openCV 2.3.1 crashes with SSE/SSE2 and -O3 | Done | 2012-05-14 |
History
Updated by Charles Twardy over 14 years ago
I can compile the stable release with SSE and SSE2 enabled. However, I had to turn them off when compiling the SVN latest_test_release, or get Internal Compiler Errors.
Windows XP 32bit, CMake 2.8, C++ 4.5 via MinGW32, installed via mingw-get 0.1-alpha-4.
Updated by anonymous - over 14 years ago
I haven't tried compiling on latest_test_release, just trunk. Would it be helpful if I tried that?
Updated by Vadim Pisarevsky over 14 years ago
The latest OpenCV is known to compile fine with TDM-Mingw 4.5.1, as well as any reasonably new version of GCC (>= 4.2) in other OSes.
- Status changed from Open to Done
- (deleted custom field) set to worksforme
Updated by PkLab net about 14 years ago
Please read carefully the starting ticket. "If you build OCV with SSE2=ON than imread/imresize will crash."
This happens me too when
1) I create a named window. The application will crash when I call
cv::namedWindow("TAG Image",CV_WINDOW_NORMAL);
Debug crash report in MainWindowProc() in highgui_220.dll
2) I've crash also when I try to create video stream
video.open("Video.avi",CV_FOURCC('L', 'A', 'G', 'S'),1,cv::Size(w,h),1);
Debug crash report:
CvVideoWriter_VFW::createStreams(CvSize, bool) () (C:\LIBS\bin\libopencv_highgui220.dll:??)
if I use CV_FOURCC('X', 'V', 'I', 'D'); all it's OK (please note that Lagarith codec is correctly running)
Above issues happens only if SSE2=ON and BUILD_TYPE=Release when I build OpenCV 2.2 SVN trunk Mingw32 / g++ 4.5.1 on WinXP/PentiumD
If CMAKE_BUILD_TYPE=Debug OR SSE2=OFF all works fine !
regards
- Status changed from Done to Cancelled
- (deleted custom field) deleted (
worksforme)
Updated by Vadim Pisarevsky over 13 years ago
Perhaps, with switching default "-O3" to "-O2" optimization flags the problem is gone. It already solved a few test failures. Delete existing CMake cache and create it from scratch to activate "-O2".
- Status changed from Cancelled to Done
- (deleted custom field) set to fixed
Updated by pibben - over 13 years ago
The issue is still there. I tried the latest SVN version with mingw 4.5.2. Segmentation fault in MainWindowProc.
- Status changed from Done to Cancelled
- (deleted custom field) deleted (
fixed)
Updated by Philippe FOUBERT almost 13 years ago
See ticket #1896. I think the attached patch could solve the problem.
Regards,
Philippe.
Updated by Andrey Kamaev almost 13 years ago
- Target version set to 2.4.1
- Category changed from highgui-images to build/install
- Assignee set to Andrey Kamaev