crashes with wxWidgets (Bug #98)


Added by guan-jhih chen about 15 years ago. Updated over 13 years ago.


Status:Cancelled Start date:
Priority:High Due date:
Assignee:Vadim Pisarevsky % Done:

0%

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

Description

when I run cvCvtColor BGR2GRAY or RGB2GRAY
compile with MinGW4.4.1 TDM DW2
it invokes the error:
icvBGRx2Gray_8u_CnC1R() (...\OpenCV2.0\bin\libcv200.dll:??)

I can run these code in console
but cant run with wxPack(wxWidgets pack)

I wanna to know if the bug is the reason that opencv only can compile in TDM MinGW SjLj version but not with DW2 version??
Can it be fixed in the future?

the same unknown problem is cvCanny, below the error:
cv::SymmRowSmallVec_8u32s::operator()(unsigned char const*, unsigned char*, int, int) (...OpenCV2.0\bin\libcv200.dll:??)
ntdll!WinSqmStartSession() (C:\Windows\system32\ntdll.dll:??)

Some people meets the same troubles with me:
[http://n2.nabble.com/OpenCV-2-0-libcv-crashes-when-used-with-wxWidgets-td4070546.html]


cmake-output.txt (2.1 kB) Pavel Gurevich, 2011-07-20 07:00 pm


Associated revisions

Revision fb58c6b3
Added by Roman Donchenko over 11 years ago

Merge pull request #98 from ilya-lavrenov:ocl_resize_AREA

History

Updated by guan-jhih chen about 15 years ago

After Building with Compiled Successful Version, these errors still exist.
Functions icvBGRx2Gray_8u_CnC1R() and SymmRowSmallVec_8u32s::operator() still cant work with wxWidgets!

What are these bugs?

Updated by anonymous - about 15 years ago

  • Status deleted (Open)

Updated by anonymous - about 15 years ago

Replying to [comment:1 littlefree]:

After Building with Compiled Successful Version, these errors still exist.
Functions icvBGRx2Gray_8u_CnC1R() and SymmRowSmallVec_8u32s::operator() still cant work with wxWidgets!

What are these bugs?

in icvBGRx2Gray_8u_CnC1R(), the bug is exist in the case:
"size.width*size.height >= 1024" with wxwidgets(or other GUI library)
Please check it! thanks!

Updated by guan-jhih chen about 15 years ago

It seems the memory leaks in wxWidgets event handler.
I'll report the bug to wxWidgets....

  • Status set to Done
  • (deleted custom field) set to invalid

Updated by Asm warrior almost 15 years ago

Hi, I'm leave a message here, because I have confirm this bug too. with OpenCV and wxWidgets.

I have find a report in the Chinese OpenCV forum. I'm not sure this bug is related to OpenCV or wxWidgets. But it is really strange. cv function get failed only in the wxWidgets message handler, but if cv function is called in a non-message-handler, it works.

Here are the test code: (I firstly reported to wxWidgets bug tracker, but I think it should also reported here too)

OpenCV and wxWidgets sample code in wxWidgets bug tracker

thanks

ollydbg23 (asmwarrior) from Chinese OpenCV forum.

  • Status changed from Done to Cancelled
  • (deleted custom field) deleted (invalid)

Updated by Vadim Pisarevsky over 14 years ago

is the bug still valid? The page at http://n2.nabble.com/OpenCV-2-0-libcv-crashes-when-used-with-wxWidgets-td4070546.html does not exists anymore. Some google search reveals problems with WxWidgets + OpenCV interaction that are due to OLE initialization. OpenCV 2.1 and later use the newer version of videoInput library that should solve the problem

Updated by Asm warrior over 14 years ago

Hi, vp153, firstly, I can't open the link you supplied in nabble.com
I have the massage"NOT_FOUND" in the link:

nabble link

secondly, in my wxwidgets's post, my test was already link to opencv 2.1 library. So, I think the bug still exist. I will check it if I have time.

asmwarrior(ollydbg)

Updated by Asm warrior almost 14 years ago

Hi,vp153, today, I test the example code I posted original in wxwidget bug tracker.
OpenCV and wxWidgets sample code in wxWidgets bug tracker

I'm using wxWidget2.8.12, opencv 2.1.0, both were mingw 32bit build. it works flawless now.

Also, I have test the code of OP, which is
IplImage* img3 = cvCreateImage( cvSize(352, 240), 8, 3);
IplImage* grey = cvCreateImage( cvSize(352, 240), 8, 1);
cvCvtColor( img3, grey, CV_BGR2GRAY );

They work flawless with wxWidgets.

So, this bug can be closed, I think.

asmwarrior(ollydbg)

  • Status changed from Cancelled to Done
  • (deleted custom field) set to fixed

Updated by Pavel Gurevich over 13 years ago

Still getting Canny crashed at

cv::SymmRowSmallVec_8u32s::operator()(unsigned char const*, unsigned char*, int, int) const() 0x011fa5ca

OpenCV 2.3, MinGW. Which information would help you?

  • Status changed from Done to Cancelled
  • (deleted custom field) deleted (fixed)

Updated by Pavel Gurevich over 13 years ago

Some more info: the crash occurs also with Qt. Canny crashes on an image sized 320x240; the Canny code runs in a separate thread.

The same code worked O.k. with OpenCV 2.1. Nothing has changed besides the library version.

Updated by Vadim Pisarevsky over 13 years ago

Which MinGW do you use? Which compiler options do you use? Can you provide the output of CMake? MinGW (even the recent versions) known to produce bad code with -O3 enabled.

Updated by Pavel Gurevich over 13 years ago

I'm using g++ 4.5.1

Debugged it further; the crash only happens when I provide aperture size of 5 or 7 for Canny, so maybe, the problem is burried inside Sobel.

Attached is CMake output you requested (cmake-output.txt).

Updated by Vadim Pisarevsky over 13 years ago

hm. that's very strange problem. And I do not see where Canny is called in the supplied sample. There is opencv/samples/cpp/edge.cpp sample that calls Canny. If you change 3 to 7 in the Canny() call, does it crash? If yes, then it's likely the problem of MinGW that you use. On my laptop (running MacOSX) it works well with different aperture sizes: 3, 5, 7.

Also available in: Atom PDF