PDA

View Full Version : Maya Release Plugin doesn't load


DannySanJose
04-12-2005, 12:28 AM
I read another thread in this section which dealt with compiling a maya plugin, however the thread is not really on the same vein as what I'm having a problem with... so I'm hoping someone can help me out or point me in the right direction.


I have a Maya exporter plugin that I wrote (it's litterally a copy of the maTranslator sample code) . As luck would have it, it works beautifully on my machine as a debug built mll.... but that's not something I can distribute to the rest of my team. However when I compile it as a release build (after doing a compair and contrast of the debug project settings vs the release project settings), I find that the created mll will not load in Maya.

On my machine I can atleast load the debug mll in Maya, but the release mll just gets ignored no matter what combination of "load" "auto-load" "close and open Maya", etc, that I try.

My questions:
--is this something common? If I wanted to get the maTranslator sample code to compile in release and load in Maya, is it common to have these problems.
--Is there a FAQ someone can point me to?
--Is there a way to get Maya to give me more feedback that will help me debug, track down the problem? (I'd can't even use a debug print since the mll never even gets loaded.)

Thank you for any info,
~Danny B.

mbaas
04-12-2005, 08:31 AM
--is this something common? If I wanted to get the maTranslator sample code to compile in release and load in Maya, is it common to have these problems.

I don't think so...

--Is there a way to get Maya to give me more feedback that will help me debug, track down the problem?

Isn't there an error message in the script editor?

Well, you can run "dumpbin" on your plugin to see what external dependencies there are and then check if they're all present:

dumpbin /dependents filename.mll

Then you should see something like this (this is a plugin for Maya 6.5):


...
File Type: DLL

Image has the following dependencies:

FOUNDATION.dll
OpenMaya.dll
OpenMayaAnim.dll
MSVCP71.dll
MSVCR71.dll
KERNEL32.dll
...


In your case, I could imagine that there's a dll that isn't found by Maya....
(also check how you link the C/C++ runtime, i.e. single-threaded, multi-threaded, etc.)

- Matthias -

rakmaya
04-12-2005, 02:18 PM
Dependancy and Threading setup might be the most common. Also check all the settings are the same in the Release as it was in the Debug.

DannySanJose
04-12-2005, 06:03 PM
Thanks so much for the replies.

When I run the debug build straight from the compiler, everything works great.

If I run Maya seperate and load in the Debug mll, when I choose the "Export All", enter my file name and then hit "Export" ---instantly Maya just closes and my export file doesn't even get created. (hence no debug print output)

If I run Maya seperate and load in the Release mll, well nothing happens because Maya will let me check the box that says "loaded" but my export file extention doesn't appear in the "Export All" options dialog. (no warnings or anything in the script output window)

I'm trying to comment out various parts of my code to see if I can figure out what line it's crashing on... but it's a slow process and I don't think it's working. It feels like Maya is caching my mll or something... because I'll change a line of code, delete my mll, build, and then run maya and the results are not always consistent when maya closes/crashes on me.

Is there a way to check if maya is using the absolute latest version of my mll and not some cached version or something?

Matthias:

This command: "dumpbin /dependents filename.mll" sound really useful... is it in Maya 6.0.1? because Maya's not recognising it at all for me.

Also, my C/C++ Runtime Library is set to "Multi-threaded DLL (/MD)". Is that good or bad? I've never changed this option before.


rakmaya:

I've done this and I've double and triple checked that things look "okay" when comparing the two configurations... but I'll look again regardless.


Thank you both for you help!
~Danny

mbaas
04-12-2005, 09:43 PM
If I run Maya seperate and load in the Release mll, well nothing happens because Maya will let me check the box that says "loaded" but my export file extention doesn't appear in the "Export All" options dialog.
Does the "loaded" checkbox really remain checked? (this would indicate that the plugin was actually loaded successfully)

Is there a way to check if maya is using the absolute latest version of my mll and not some cached version or something?

If you unload the plugin and load the new version again then it should be the latest version (I suppose you did unload first, otherwise you wouldn't be able to delete the old version anyway (unless it was never loaded in the first place)).


This command: "dumpbin /dependents filename.mll" sound really useful... is it in Maya 6.0.1? because Maya's not recognising it at all for me.

dumpbin is a tool that comes with Visual Studio and that has to be used from the command line (inside a DOS box). Depending on how you've installed Visual Studio you might have to add the path to the MSVC bin directory first (or call that vcvars32.bat batch file).

Also, my C/C++ Runtime Library is set to "Multi-threaded DLL (/MD)". Is that good or bad? I've never changed this option before.

This setting is ok.

- Matthias -

CGTalk Moderation
04-12-2005, 09:43 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.