View Full Version : api: This application has failed to start

12 December 2009, 03:33 PM
When I try to load my plugin on other machines with the same os and maya version as my machine, I get the following error:

"This application has failed to start because the application configuration is incorrect. Reinstalling the application may fix this problem."

The plugin runs fine on my machine. Why is that?

12 December 2009, 03:51 PM
VC redistributable problems, there's a bug reported on one of the builds. just install latest redistributable version on the user machine, see google for details.

12 December 2009, 04:27 PM
doesn't seem to work.

The plugin is build in visual c++ express 2008 with maya 2009 x64. I have tryed installing Microsoft Visual C++ 2008 Redistributable Package (x64) on the user machine, but it still gives me the same error.

12 December 2009, 10:20 PM
did you uninstall the previous version first? this needs some fiddling around, but i'm pretty sure this message comes from improper redistributable, i've had this message on several machines trying to install my custom node, and removing old redistributables/installing new fixed the error.

01 January 2010, 11:07 AM
Uninstalling the old redistrubutable didnt fix it. I have tried uninstalling all the redistrubutables and only installing the 2008x64. Still no luck.

01 January 2010, 10:47 AM
You can either install the latest redistributable on each machine that will be using your plug-in as suggested above, or you can remove the manifest dependency from the build settings of the project:

Right Click on the project -> Properties -> Linker -> Manifest File -> Generate Manifest => No.

This should remove the manifest dependency from your dll. That's what I started doing since Microsoft silently updated my visual studio to generate plug-ins that would not load on target systems :)
Note that if you are developing stand alone applications that use Maya API, removing the manifest will prevent your application from being able to dynamically load plug-ins.

01 January 2010, 11:21 AM
When I disable the manifest and rebuild. Maya gives me the following error (even on my own workstation):

// Error: line 1: Unable to dynamically load : C:/Program Files/Autodesk/Maya2009/bin/plug-ins/myPlugin.mll
The specified module could not be found.

01 January 2010, 01:29 PM
That's odd. Did try this on Maya API plug-in examples?
Try some simple ones from the dev-kit to see if there's a problem loading them without a manifest. If there isn't try to see what's the difference between your project build options and the dev-kit example.

01 January 2010, 01:38 PM
It gives me the same error:
// Error: file: C:/Program Files/Autodesk/Maya2009/scripts/others/pluginWin.mel line 663: Unable to dynamically load : C:/Program Files/Autodesk/Maya2009/devkit/plug-ins/clothPaintAttrCmd.mll
The specified module could not be found.

The only thing I did was open the clothPaintAttrCmd project. Disable the manifest and build the project, and maya gives me the error above. If I build with the manifest enabled the plugin loads up fine.

01 January 2010, 01:47 PM
i have the same question
i use maya 2008 and vc 2005 with wizard 2.0

when i build my mll file.its works well on my workstation.
but on the other computers its reports:

// Error: line 1: Unable to dynamically load : C:/Program Files/Autodesk/Maya2008/bin/plug-ins/etc.mll
The specified module could not be found. //

my os:
ms vista sp2 x64
vs 2005 sp1
maya 2008 32bit
maya 2010 64bit

error computer:
ms xp sp3 32bit
maya 2008 32bit

01 January 2010, 02:13 PM
furn: Are you distributing the debug version or the release one?

Jacobborsting: Is it Visual Studio 2005? I am constantly building plug-ins without the manifest and they work on numerous work stations, including mine at work and at home.

The module could not be found thing usually happens when your compiled plug-in dll references a library that is not recognized by the loader and this the dynamic loading of your dll fails.

It might be the case that what your visual studio is linking your dll is not the same library as the one you have in system32 (or in other folder where the libraries are looked up).

Try using the static linking for the CRT runtime:
Right Click on the project -> Properties -> C/C++ -> Code Generation-> Runtime Library => Multi-threaded (/MT).

If that doesn't help, I would try using Dependency Walker to see what your plug-in depends on and see if all references can be properly resolved on your system.

01 January 2010, 02:48 PM
I'm using VC++ 2008 Express. If I change the runtime-libary to /MT, I get the following error:

1>libcpmtd.lib(xdebug.obj) : error LNK2019: unresolved external symbol _malloc_dbg referenced in function "void * __cdecl operator new(unsigned __int64,struct std::_DebugHeapTag_t const &,char *,int)" (??2@YAPEAX_KAEBU_DebugHeapTag_t@std@@PEADH@Z)
1>libcpmtd.lib(xdebug.obj) : error LNK2019: unresolved external symbol _free_dbg referenced in function "void __cdecl operator delete(void *,struct std::_DebugHeapTag_t const &,char *,int)" (??3@YAXPEAXAEBU_DebugHeapTag_t@std@@PEADH@Z)

01 January 2010, 02:56 PM
Well, you can't expect that a Debug version of your application will link with the Release version of the library... :)
You need to link against the Debug Multi Threaded in debug. The flag that I have given is for release.

And, do not expect debug versions of the plug-ins to work on other machines. The debug version has dependencies on libraries that are usually installed only on developer work stations, not on artists ones.

01 January 2010, 03:01 PM
Oh and by the way, you should not be using VS 2008 to compile plug-ins for Maya 2009.
Maya is compiled with VS 2005 Sp1 and you better stick with the same compiler for binary compatibility. I won't be surprised that the Unable to find module error you are getting is due to the different compiler version.,topicNumber=d0e651855

The required compiler is VC8, which is VS 2005. VS 2008 is VC9.

01 January 2010, 03:11 PM
I switched to release and now everything is working perfect, on my machine aswell as the target machines.

Thank's for all your input. :)

CGTalk Moderation
01 January 2010, 03:11 PM
This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.