The application was unable to start correctly

Discussion of features and help with problems encountered while using libRocket

The application was unable to start correctly

Postby Laurens on Fri Dec 23, 2011 11:11 am

Hi everyone,

I am running Visual Studio C++ 2010 Express and have downloaded the full Win32 source code to libRocket 1.2.1. I have successfully compiled in debug mode without errors or warnings and am now trying to get it to run within my game which is built on top of SFML 1.6. Right now I am just trying to get the SystemInterface working. My code is as follows:

SystemInterface.h
Code: Select all
#include <SFML\System\Clock.hpp>

#include <Rocket\Core\SystemInterface.h>

namespace lg
{
   class SystemInterface : public Rocket::Core::SystemInterface
   {
   public:

      float GetElapsedTime();

   private:

      sf::Clock _timer;
   };
}


SystemInterface.cpp
Code: Select all
float lg::SystemInterface::GetElapsedTime()
{
   return _timer.GetElapsedTime();
};


main.cpp
Code: Select all
_systemInterface = new SystemInterface();


I am linking my game's debug build against RocketCore_d.lib and this also compiles without errors or warnings. As soon as I try to run it, however, I get an error message saying "The application was unable to start correctly (0xc0150002). Click OK to close the application." I have verified that RocketCore_d.dll is present in my output folder. Removing the line "_systemInterface = new SystemInterface();" from Application.cpp, all is fine so I can only conclude that my Rocket setup is faulty somewhere.

When I open my executable with DependencyWalker, I am getting the following error:

Error: The Side-by-Side configuration information for "ROCKETCORE_D.DLL" contains errors. The application has failed to start because its side-by-side configuration is incorrect.


I find this strange because it also shows both my application and RocketCore_d.dll depending on MSVCP100D.DLL and MSVCR100D.DLL. No mismatch there. I have read some threads regarding this same issue but the problems were related to Python. I am only using RocketCore, RocketControls and RocketDebugger for now.

Any pointers on how to resolve this very much appreciated!

Thanks!
Laurens
 
Posts: 4
Joined: Fri Dec 23, 2011 11:00 am

Re: The application was unable to start correctly

Postby Laurens on Fri Dec 23, 2011 11:52 am

I just ran sxstrace to find out why my application is unable to start. These are the results:

=================
Begin Activation Context Generation.
Input Parameter:
Flags = 0
ProcessorArchitecture = Wow32
CultureFallBacks = en-US;en
ManifestPath = C:\Users\Laurens\Documents\Projects\Games\Lost Garden\Binaries\Debug\RocketCore_d.dll
AssemblyDirectory = C:\Users\Laurens\Documents\Projects\Games\Lost Garden\Binaries\Debug\
Application Config File =
-----------------
INFO: Parsing Manifest File C:\Users\Laurens\Documents\Projects\Games\Lost Garden\Binaries\Debug\RocketCore_d.dll.
INFO: Manifest Definition Identity is (null).
INFO: Reference: Microsoft.VC90.DebugCRT,processorArchitecture="x86",publicKeyToken="1fc8b3b9a1e18e3b",type="win32",version="9.0.21022.8"
INFO: Resolving reference Microsoft.VC90.DebugCRT,processorArchitecture="x86",publicKeyToken="1fc8b3b9a1e18e3b",type="win32",version="9.0.21022.8".
INFO: Resolving reference for ProcessorArchitecture WOW64.
INFO: Resolving reference for culture Neutral.
INFO: Applying Binding Policy.
INFO: No publisher policy found.
INFO: No binding policy redirect found.
INFO: Begin assembly probing.
INFO: Did not find the assembly in WinSxS.
INFO: Attempt to probe manifest at C:\Windows\assembly\GAC_32\Microsoft.VC90.DebugCRT\9.0.21022.8__1fc8b3b9a1e18e3b\Microsoft.VC90.DebugCRT.DLL.
INFO: Did not find manifest for culture Neutral.
INFO: End assembly probing.
INFO: Resolving reference for ProcessorArchitecture x86.
INFO: Resolving reference for culture Neutral.
INFO: Applying Binding Policy.
INFO: No publisher policy found.
INFO: No binding policy redirect found.
INFO: Begin assembly probing.
INFO: Did not find the assembly in WinSxS.
INFO: Attempt to probe manifest at C:\Windows\assembly\GAC_32\Microsoft.VC90.DebugCRT\9.0.21022.8__1fc8b3b9a1e18e3b\Microsoft.VC90.DebugCRT.DLL.
INFO: Attempt to probe manifest at C:\Users\Laurens\Documents\Projects\Games\Lost Garden\Binaries\Debug\Microsoft.VC90.DebugCRT.DLL.
INFO: Attempt to probe manifest at C:\Users\Laurens\Documents\Projects\Games\Lost Garden\Binaries\Debug\Microsoft.VC90.DebugCRT.MANIFEST.
INFO: Attempt to probe manifest at C:\Users\Laurens\Documents\Projects\Games\Lost Garden\Binaries\Debug\Microsoft.VC90.DebugCRT\Microsoft.VC90.DebugCRT.DLL.
INFO: Attempt to probe manifest at C:\Users\Laurens\Documents\Projects\Games\Lost Garden\Binaries\Debug\Microsoft.VC90.DebugCRT\Microsoft.VC90.DebugCRT.MANIFEST.
INFO: Did not find manifest for culture Neutral.
INFO: End assembly probing.
ERROR: Cannot resolve reference Microsoft.VC90.DebugCRT,processorArchitecture="x86",publicKeyToken="1fc8b3b9a1e18e3b",type="win32",version="9.0.21022.8".
ERROR: Activation Context generation failed.
End Activation Context Generation.


It would appear that my system is missing the Visual Studio 2008 runtime. Is this correct? Version 9.0.21022 of the VS2008 redistributable is in fact present on my system. But even so, considering I recompiled Rocket using VS2010, shouldn't it be referencing the VS2010 runtime?
Laurens
 
Posts: 4
Joined: Fri Dec 23, 2011 11:00 am

Re: The application was unable to start correctly

Postby Laurens on Mon Dec 26, 2011 11:00 pm

As it turns out, this problem was caused by FreeType. Compiling FreeType using VS2010, and then compiling Rocket to use the new libs solved the problem.
Laurens
 
Posts: 4
Joined: Fri Dec 23, 2011 11:00 am


Return to Using libRocket