English 中文(简体)
qt app with opencvlapdown (0xC000004B)
原标题:qt app with opencv fails at shutdown (0xC000004B)

简单的qt(4.7.3)和开放式的(2.3.1)在2008年5月的节奏中用电终止:

...
The thread  Win32 Thread  (0x2418) has exited with code 0 (0x0).
The thread  Win32 Thread  (0x1cc4) has exited with code 0 (0x0).
The thread  Win32 Thread  (0xd7c) has exited with code 0 (0x0).
The thread  Win32 Thread  (0x2108) has exited with code 0 (0x0).
The thread  Win32 Thread  (0x17a0) has exited with code -1073741749 (0xc000004b).
The program  [472] QtArrSurf.exe: Native  has exited with code 0 (0x0).

0xC000004 页: 1 错误代码是指STATUS_THREAD_IS_TERMINAting (有人试图中止已经开始终止的胎面。)

方案来源代码:

#include <QtGui>
#include <opencv2/features2d/features2d.hpp>
int main(int argc, char *argv[]) {
    QApplication a(argc, argv);
    QPushButton b("button");
    b.show();
    QFileDialog::getOpenFileNames(&b, "Dialog", "", "Files(*.png)"); // problem trigger
    cv::SURF detectorSURF;    // just to touch opencv
    return a.exec();
}

If comment dialog everything goes smoothly without 0xc000004b and there is only one thread in program. When dialog is executed a number of threads are spawned, which does not close with dialog:

0 > 6192    Main Thread Main Thread main    Normal  0
0   8928    Worker Thread   Win32 Thread    77a01f36    Normal  0
0   4620    Worker Thread   Win32 Thread    77a01f36    Normal  0
0   9800    Worker Thread   Win32 Thread    77a01f36    Normal  0
0   7924    Worker Thread   Win32 Thread    77a0014d    Normal  0
0   3844    Worker Thread   Win32 Thread    77a01f36    Normal  0
0   2524    RPC Thread  RPC Callback Thread 779ffd81    Normal  0
0   3068    Worker Thread   Win32 Thread    77a00552    Normal  0
...

What these threads are about? They have silent stacks, like this:

ntdll.dll!77a01f36()
[Frames below may be incorrect and/or missing, no symbols loaded for ntdll.dll] ntdll.dll!77a01f36()
ntdll.dll!77a2471e()
kernel32.dll!7587339a()
ntdll.dll!77a19ed2()
ntdll.dll!77a19ea5()

The place of interest is CvModule static object in opencv dll. OpenCV2.3.1modulescoresrcsystem.cpp:

 CvModule cxcore_module( &cxcore_info );

在失败的情况下,我没有接触到他的主子,但(没有方言)确实如此。

情况为0xC000004 B. 实际问题?

Any suggestion where to look for solution?

感谢。

问题回答

I believe your app is not failing.

透镜的退出法可能没有任何意义,从胎面看不出零的回报价值,它只是表明,无论出于何种原因,胎面都回去了这一价值。

除非你遇到坠毁或其他一些问题,否则我就认为你可以安全地忽视这种非零返回价值。 如果你想充分理解,为什么read然回来,那么你就需要贬低QT的代码,并确定谁在这样做。 如果你发现,你可以在其出入口处打断点,看看这一职能的逻辑为何决定收回这一价值。





相关问题
Undefined reference

I m getting this linker error. I know a way around it, but it s bugging me because another part of the project s linking fine and it s designed almost identically. First, I have namespace LCD. Then I ...

C++ Equivalent of Tidy

Is there an equivalent to tidy for HTML code for C++? I have searched on the internet, but I find nothing but C++ wrappers for tidy, etc... I think the keyword tidy is what has me hung up. I am ...

Template Classes in C++ ... a required skill set?

I m new to C++ and am wondering how much time I should invest in learning how to implement template classes. Are they widely used in industry, or is this something I should move through quickly?

Print possible strings created from a Number

Given a 10 digit Telephone Number, we have to print all possible strings created from that. The mapping of the numbers is the one as exactly on a phone s keypad. i.e. for 1,0-> No Letter for 2->...

typedef ing STL wstring

Why is it when i do the following i get errors when relating to with wchar_t? namespace Foo { typedef std::wstring String; } Now i declare all my strings as Foo::String through out the program, ...

C# Marshal / Pinvoke CBitmap?

I cannot figure out how to marshal a C++ CBitmap to a C# Bitmap or Image class. My import looks like this: [DllImport(@"test.dll", CharSet = CharSet.Unicode)] public static extern IntPtr ...

Window iconification status via Xlib

Is it possible to check with the means of pure X11/Xlib only whether the given window is iconified/minimized, and, if it is, how?

热门标签