OpenCV_HelloWorld project in VC++ 2010 Runtime Error: - visual-studio-2010

I set up the environment according to this tutorial:
http://opencv.willowgarage.com/wiki/VisualC%2B%2B_VS2010
However the picture they want you to use is no longer there, so I just saved the supplied screen shot with the same name as the original file.
Builds fine, Begins to run but then I get a runtime error
Here is the runtime error:
OpenCV_HelloWorld.exe - Application Error : The application was unable to start correctly (0xc0150002). Click OK to close the application.
I looked in Event Viewer and found that it also set off a another error but did not announce
Here is the unannounced error:
Activation context generation failed for "C:\OpenCV2.1\bin\cxcore210d.dll". Dependent Assembly Microsoft.VC90.DebugCRT,processorArchitecture="x86",publicKeyToken="1fc8b3b9a1e18e3b",type="win32",version="9.0.21022.8" could not be found. Please use sxstrace.exe for detailed diagnosis.
As you can see it says to use sxstrace.exe however I don't appear to have that program. After a quick Google I read that the program was included in the Microsoft Windows Platform SDK, so I'm downloading the most relevant version (windows 7 version for c# and .net) and installing that to follow up on that, I'll post what I find as it comes.
Any help is very much appreciated

Unexpectedly the project builds and runs now. The only modifications made were removing spaces in the c++ directory and linker options from the tutorial. External changes were the completed installation of the windows platform SDK, however OpenCV has no dependencies with windows platform sdk. I am unsure how it was resolved, but it's no longer a problem.

Related

ros::init(...) throws an error - Windows roscpp

I'm trying to use ros in cpp with Visual Studio 2012. I wrote the publisher and subscriber tutorial (http://wiki.ros.org/ROS/Tutorials/WritingPublisherSubscriber%28c%2B%2B%29) and first, I configure the project as says in the guide (http://wiki.ros.org/win_ros/hydro/Msvc%20SDK%20Projects).
Then i compiled an linked the publisher, but when I tried to run it, ros::init(argc,argv,"talker") throws an exception... The console says that I ROS_MASTER_URI is not defined but I've got it defined
There are 2 images here:
https://www.dropbox.com/s/o12m0l38gaxiugi/error1.png -
https://www.dropbox.com/s/ocdmf0wj6rj0962/error.png
Can anyone helps me?
Thanks in advance
So, I had the same issue, although I didn't set the ROS_MASTER_URI globally.
I managed to get around this specific issue by adding
ROS_MASTER_URI=http://localhost:11311
to the debugging environment variables (Project->Properties->Configuration Properties->Debugging->Environment).
However, after implementing the above I got an uncaught exception (Unhandled exception at 0x768bc41f in ros_demo.exe: Microsoft C++ exception: std::bad_alloc at memory location 0x0028f0e4..).
That went away when I built, compiled and ran the project in release mode (which matched my ROS SDK build).
I got the idea for the release/debug build from here:
xstring isn't an OSG specific object, so the error is elsewhere in the
3rd party dependency chain. As I know nothing about your OS and
software setup I can't speculate what this might be.
In general though this type of error could well be a linking issue -
for instance Visual Studio is hopeless at handling different libs
being built debug and release and will crash randomly.
That was fun to discover..

Qt Creator "The program has unexpectedly finished."

Yesterday I installed Qt Creator and the Qt Library 5.0.1. When I created a new project and wanted to see how it looks, so I build and run the program and I got the following error:
Starting C:\Users\Khaled\workspace_qt\Test-build-Desktop_Qt_5_0_1_MinGW_32bit-Debug\debug\Test.exe...
The program has unexpectedly finished.
C:\Users\Khaled\workspace_qt\Test-build-Desktop_Qt_5_0_1_MinGW_32bit-Debug\debug\Test.exe exited with code -1073741511
I got the same error when I tried to build and run the address book application from the example section.
I looked for other questions here, and I read one that said to check g++ version and to change toolchain from the Build & Run section in the setting, but there is nothing that says toolchain. I also read one where it said to try to chnage between debug and release mode, both didn't work. I also just read a post about using Event Viewer to see the lacking dlls but I couldn't find anything.
Why am I getting this error message and how can I fix it?
Thanks
If you run your application by clicking on it or using cmd (basically not through Qt), you will get a Windows system error informing you of the problem. If you're missing DLL's (which you seem to be), you'll be told which ones, although it will only tell you one at a time.

Visual C Runtime 2005 version download

I am having one EXE, which is executing on one m/c but not in other, both are having Windows 7.
When I try to execute it, it throw below errror message,
"The application has failed to start because its side-by-side configuration is incorrect. Please see the application event log or use the command-line sxstrace.exe tool for more detail."
As I suggested, I used SXSTrace.exe and found problem is with C-RT,
ERROR: Cannot resolve reference Microsoft.VC80.CRT,processorArchitecture="x86",publicKeyToken="1fc8b3b9a1e18e3b",type="win32",version="8.0.50727.5592".
The m/c where its executing, required file's are present at,
c:\windows\winsxs\x86_microsoft.vc80.crt_1fc8b3b9a1e18e3b_8.0.50727.6195_none_d09154e044272b9a\MSVCM80.DLL
As you know we can't copy inside "winsxs" folder.
Since, I required "Visual C-Runtime version 8 (2005) x86 v 8.0.50727.5592 or 8.0.50727.6195.
Required library files of older versions are present in System:
C:\Windows\winsxs\x86_microsoft.vc80.crt_1fc8b3b9a1e18e3b_8.0.50727.4053_none_d08d7da0442a985d\msvcm80.dll
C:\Windows\winsxs\x86_microsoft.vc80.crt_1fc8b3b9a1e18e3b_8.0.50727.42_none_db5f52fb98cb24ad\msvcm80.dll
C:\Windows\winsxs\x86_microsoft.vc80.crt_1fc8b3b9a1e18e3b_8.0.50727.4940_none_d08cc06a442b34fc\msvcm80.dll
C:\Windows\winsxs\x86_microsoft.vc80.crt_1fc8b3b9a1e18e3b_8.0.50727.762_none_10b2f55f9bffb8f8\msvcm80.dll
I would like to know if I required same library of different version which will be installed inside "winsxs" folder then which installer I required
Can you please pinpoint the url from where I can get this software.
Please go through the link mentioned below.
http://social.msdn.microsoft.com/Forums/en-US/vcmfcatl/thread/c1dc12ae-f032-4c20-9ff9-c16ea531ca08?prof=required
Thanks,
Amit

The application was unable to start correctly 0xc150002

Hey guys so I have combed the internet trying to find a solution to my problems I had decided I want to learn to opencv and am having a hell of a time to get a basic hello world program working.
So I'll start of with I downloaded the OpenCV2.1 from sourceforge
http://sourceforge.net/projects/opencvlibrary/files/opencv-win/2.1/
I am currently running Visual studio 2010 on Windows 7, 32 bit.
So I installed ran the OpenCV2.1.exe file and added OpenCV to my path enviroment, I then build the libraries using cmake and ran through the following instructions
http://opencv.willowgarage.com/wiki/VisualC%2B%2B_VS2010_CMake
When i build the code in the tutorial abovei get a sucesfull build but when I try and start the program i get the "The application was unable to start correctly 0xc150002" error. Anyone have any thought ?
EDIT:
I looked at the event log and this is the information i get
Activation context generation failed for "C:\OpenCV2.1\bin\cxcore210d.dll". Dependent Assembly Microsoft.VC90.DebugCRT,processorArchitecture="x86",publicKeyToken="1fc8b3b9a1e18e3b",type="win32",version="9.0.21022.8" could not be found. Please use sxstrace.exe for detailed diagnosis.
Microsoft.VC90.DebugCRT,processorArchitecture="x86",publicKeyToken="1fc8b3b9a1e18e3b",type="win32",version="9.0.21022.8"
C:\OpenCV2.1\bin\cxcore210d.dll
Had the same problem. Indeed I did rebuild the Dlls, but in the PATH environment variable of Windows the old DLLs C:\OpenCV2.1\bin; were before the new built DLLs C:\OpenCV2.1\build\bin\Debug; which meant that always the old were loaded ... Now it works

Access violation when compiling in debug

I'm trying to profile a C++ project in Embarcadero RAD Studio 2010. To do this I wanted to use AQTime, but I'm running into a bit of a problem.
I can compile and run the application in release mode. But when I compile in debug mode, using the settings mentioned at http://smartbear.com/support/viewarticle/18053/, I get an access violation.
... faulted with message: 'access
violation at 0x062324bd: read of
address 0x62324bd'. Process stopped.
Use Step or Run to continue.
It seems to come when I load a bunch of dll's at the startup. But since it goes well in release mode I can't seem to figure out what could be the cause.
When the access violation occurs I get thrown out into assembly and that isn't one of the languages I'm fluent in ;)
EDIT : When scanning the .exe with Dependency Walker I get a message saying that the following files can't be found
CC32100MT.DLL
INET140.BPL
RTL140.BPL
VCL140.BPL
IESHIMS.DLL
Could this be the problem somehow? Are these debugspecific or is Dependency Walker not giving me correct information? The same files are said to be missing when I try a release compiled version to.
I'm running on Windows 7 x64, if that could be part of the issue. I have had problems before with the symlink-look-alike (user/AppData/Local...) that MS used for some folders. Notably when I ran an apache server and the htdocs folder actually wasn't located where the server thought it was (and where it appeared to be) :)
Have you tried disabling dynamic rtl which can be found in the C++ builder linker options pane?

Resources