Ask Your Question
0

WinRT sample crashed in OpenCV 2.4.6

asked 2013-09-12 05:16:37 -0600

I've downloaded the OpenCV 2.4.6. And, I tried to run WinRT sample on WindowsRT device(ARM).

(1)Building of OpenCV library

I've generated OpenCV library for WindowsRT(ARM) by reference to the following URL. http://code.opencv.org/projects/opencv/wiki/WindowsRT

(2)Building of WinRT sample

I opened "samples\winrt\ImageManipulations\MediaCapture.sln". And I selected "ARM" as "Solution Platform". Building of WinRT sample was successful.

(3)Execution of WinRT sample on WindowsRT device

I transferred the program to the device and executed the program . I tried the following operation.

  • "StartDevice" button pressed : OK
  • "StartPreview" button pressed : OK
  • "Apply" button pressed : NG(crashed!)

image description

In this crashed case, call stack is as follows.

msvcr110d.dll!_CxxThrowException(void * pExceptionObject, const _s__ThrowInfo * pThrowInfo) 行 152 C++ vccorlib110d.dll!__abi_WinRTraiseCOMException(long hr) 行 502 C++ MediaCapture.exe!__abi_WinRTraiseException(long __hrArg) 行 1156 C++ MediaCapture.exe!__abi_ThrowIfFailed(long __hrArg) 行 92 C++ MediaCapture.exe!Windows::Media::Capture::IMediaCapture::AddEffectAsync(Windows::Media::Capture::MediaStreamType __param0, Platform::String ^ __param1, Windows::Foundation::Collections::IPropertySet ^ __param2) C++

Exception has been detected after calling the AddEffectAsync(). Perhaps I think that this program is not able to properly load "OcvTransform.dll". Did I miss anything?

edit retag flag offensive close merge delete

1 answer

Sort by » oldest newest most voted
0

answered 2013-09-12 08:28:48 -0600

Yes, you are right about OcvTransform.dll. Your crash means, that system cannot load it. In most cases crash means, that OpenCV libs were not deployed to appx. You need to add all OpenCV libraries to your application project and mark it as a content in file properties. Also problem may be caused by usage of debug libs without debug CRT. In this case you need to install debug version of CRT on your device.

edit flag offensive delete link more

Comments

I tried to install debug version library on device. Then, I can execute WinRT sample on WindowsRT device!(http://twitpic.com/dd5o0l) Thank you for your help!

[PS] As a result of my investigation, I think that this problem might be caused by another cause. I've generated OpenCV library("release" version and "without TBB"). Then, I can execute WinRT sample on WindowsRT device.

Therefore, I suspect that there is a problem with the link of TBB or how to build TBB.

dandelion1124 gravatar imagedandelion1124 ( 2013-09-12 12:43:34 -0600 )edit
1

I found the cause. TBB is enabled by default. And, "tbb.dll" is generated. On the other hand, "MediaCapture.sln"does not load the "tbb.dll".

This problem is solved by adding a "tbb.dll" to MediaCapture project.

dandelion1124 gravatar imagedandelion1124 ( 2013-09-12 13:36:47 -0600 )edit

Question Tools

1 follower

Stats

Asked: 2013-09-12 05:16:37 -0600

Seen: 807 times

Last updated: Sep 12 '13