CGTalk > Software > Autodesk Maya > Maya Programming
Login register
Thread Closed share thread « Previous Thread | Next Thread »  
 
Thread Tools Search this Thread Display Modes
Old 05-15-2012, 04:42 PM   #1
Mathieson
Frequenter
 
Mathieson's Avatar
portfolio
Mathieson Facer
Senior TA
EA
Vancouver, Canada
 
Join Date: May 2006
Posts: 289
maya.standalone crashing on file open

I am initializing a maya.standalone instance so that I can process files without needing to open up Maya. However, this standalone instance is crashing when opening relatively simple files. Here is what I get back:

mental ray for Maya 2012
mental ray for Maya: setup
mental ray for Maya: initialize
mental ray: version 3.9.1.36, Feb 2 2011, revision 138829
mental ray for Maya: using 1 license
mental ray for Maya: register extensions
// mental ray Node Factory: loaded
mental ray for Maya: successfully registered
// parsing C:/Program Files/Autodesk/Maya2012/mentalray/include/AdskShaderSDKWrappers.mi
// generating Maya nodes...
// parsing C:/Program Files/Autodesk/Maya2012/mentalray/include/architectural.mi
// loading C:/Program Files/Autodesk/Maya2012/mentalray/lib/architectural.dll
// generating Maya nodes...
// parsing C:/Program Files/Autodesk/Maya2012/mentalray/include/base.mi
// loading C:/Program Files/Autodesk/Maya2012/mentalray/lib/base.dll
// generating Maya nodes...
// parsing C:/Program Files/Autodesk/Maya2012/mentalray/include/contour.mi
// loading C:/Program Files/Autodesk/Maya2012/mentalray/lib/contour.dll
// generating Maya nodes...
// parsing C:/Program Files/Autodesk/Maya2012/mentalray/include/paint.mi
// loading C:/Program Files/Autodesk/Maya2012/mentalray/lib/paint.dll
// generating Maya nodes...
// parsing C:/Program Files/Autodesk/Maya2012/mentalray/include/physics.mi
// loading C:/Program Files/Autodesk/Maya2012/mentalray/lib/physics.dll
// generating Maya nodes...
// parsing C:/Program Files/Autodesk/Maya2012/mentalray/include/production.mi
// loading C:/Program Files/Autodesk/Maya2012/mentalray/lib/production.dll
// generating Maya nodes...
// parsing C:/Program Files/Autodesk/Maya2012/mentalray/include/subsurface.mi
// loading C:/Program Files/Autodesk/Maya2012/mentalray/lib/subsurface.dll
// generating Maya nodes...
// parsing C:/Program Files/Autodesk/Maya2012/mentalray/include/surfaceSampler.mi
// loading C:/Program Files/Autodesk/Maya2012/mentalray/lib/surfaceSampler.dll
// generating Maya nodes...


This has happened with more than one scene. The scene is not complicated by any means: it has a number of primitive poly objects, a few group nodes, two joint chains (neither exceeding three joints), an IK solver, and a few constraints.

I created a scene consisting of just a single poly primitive, and it opened fine. Next step is to start weeding out the problem node.

Has anybody run into this before? Can anybody explain why this might be happening?
 
Old 05-15-2012, 04:59 PM   #2
Mathieson
Frequenter
 
Mathieson's Avatar
portfolio
Mathieson Facer
Senior TA
EA
Vancouver, Canada
 
Join Date: May 2006
Posts: 289
Just realized, after opening a bunch of other test scenes successfully, that this is probably something to do with mental ray's surface sampler. No other scenes are coming up with those mental ray reports posted above.

Not sure why mental ray is getting initialized for this file. I have never rendered this scene and mental ray is not set as the renderer.

Any suggestions?
 
Old 05-15-2012, 05:24 PM   #3
Mathieson
Frequenter
 
Mathieson's Avatar
portfolio
Mathieson Facer
Senior TA
EA
Vancouver, Canada
 
Join Date: May 2006
Posts: 289
After a bit more testing, going off the assumption it is mental ray causing the crash, it appears that mental ray is not getting loaded when Maya launches. None of the files that successfully open in standalone require mental ray, however, the one that is crashing actually loads mental ray when being opened in Maya's GUI. I have set mayatomr.mll to auto load, but it is still causing the crash. Going to test forcing it to load through script after the standalone has been initialized, but before opening the scene file.
 
Old 05-15-2012, 05:49 PM   #4
Mathieson
Frequenter
 
Mathieson's Avatar
portfolio
Mathieson Facer
Senior TA
EA
Vancouver, Canada
 
Join Date: May 2006
Posts: 289
So, just trying to load the mental ray plugin via MEL in standalone maya is yielding a crash :(
 
Old 05-15-2012, 09:34 PM   #5
zoharl
A newbie
 
zoharl's Avatar
portfolio
Zohar
Wellington, New Zealand
 
Join Date: Mar 2009
Posts: 1,820
What's the point in running a stand alone, if loading the environment is as slow as running maya's ide, you are prone to such errors, and you have less feedback and tools?
 
Old 05-15-2012, 10:09 PM   #6
Mathieson
Frequenter
 
Mathieson's Avatar
portfolio
Mathieson Facer
Senior TA
EA
Vancouver, Canada
 
Join Date: May 2006
Posts: 289
I was not yet aware of all of those things :P

After running into the above problems, I am not using it any more.
 
Old 08-04-2012, 02:41 PM   #7
yaoyansi
Veteran
portfolio
yaoyansi
Beijing, China
 
Join Date: Oct 2009
Posts: 47
I encouter this problem either.
Do you solve this problem?
 
Old 08-07-2012, 06:26 AM   #8
H2o-KiD
Veteran
portfolio
Kok Gin Yih
-
Cheras, Malaysia
 
Join Date: Nov 2009
Posts: 77
I used .standalone for grabbing the necessary scene info and batch render in render software. Sometimes, I get the same problem...
 
Old 08-07-2012, 07:09 AM   #9
zoharl
A newbie
 
zoharl's Avatar
portfolio
Zohar
Wellington, New Zealand
 
Join Date: Mar 2009
Posts: 1,820
Okay, I'll ask again:

Quote:
Originally Posted by zoharl
What's the point in running a stand alone, if loading the environment is as slow as running maya's ide, you are prone to such errors, and you have less feedback and tools?
 
Old 10-24-2012, 09:53 PM   #10
Dimich
Frequenter
 
Dimich's Avatar
portfolio
Dimitry Kachkovski
TD
BRON Studios
Vancouver, Canada
 
Join Date: Oct 2005
Posts: 162
Thought I'd bump this thread.

First I'll answer the question:

Quote:
Originally Posted by zoharl
What's the point in running a stand alone, if loading the environment is as slow as running maya's ide, you are prone to such errors, and you have less feedback and tools?


Loading the environment via mayapy.exe is much faster then loading the full UI. One of the simplest areas that makes that true is the lack of graphical user interface. On top of that is also the much smaller amount of libraries being used to initialize maya.standalone.

As to the necessity, for me, I am in need of being able to optionally export data behind the scenes for a user who is currently working on an asset. I am trying to be able to load a file's information file which I pickle, and if such information file is absent, I am interested in launching a process in the background that will load the maya file from which I export the required information, and then pass that data back into the script, all without interrupting the user's current maya session. I have been playing with MayaBatch, and might end up having to go that route for the time being, but if there is a solution someone might have run into, I'd love to hear it...

Cheers,

DK
 
Old 01-30-2013, 05:13 PM   #11
Zeedorf
Terafun
 
Zeedorf's Avatar
Agoston Princz
cg artist
Budapest, Hungary
 
Join Date: Mar 2006
Posts: 29
unloadPlugins

I had a similar situation. When I opened a scene with maya.standalone there was a lot of error message in conneciton with mentalray and after crashed.

I have been searching the method to open file with maya.standalone with unloaded plugins like Mayatomr. There is the command cmds.unloadPlugin('Mayatomr') but it has no effect before the file loaded.
I tried that I delete line:
requires "Mayatomr"
from an mayaAscii file. It makes the maya not crashing anymore. But the file can't be opened until there are mental ray related nodes and attributes.
I think the situation is more complicated when you have a file which contains references with mental ray nodes.
 
Old 01-30-2013, 05:47 PM   #12
Dimich
Frequenter
 
Dimich's Avatar
portfolio
Dimitry Kachkovski
TD
BRON Studios
Vancouver, Canada
 
Join Date: Oct 2005
Posts: 162
Hey Zeedorf,

I ended up solving the issue. Best solution I found was to use pymel as a standalone maya. I have actually made a post on my blog. Have a look:

http://derangedartisan.blogspot.ca/...standalone.html
 
Old 01-31-2013, 11:53 AM   #13
Zeedorf
Terafun
 
Zeedorf's Avatar
Agoston Princz
cg artist
Budapest, Hungary
 
Join Date: Mar 2006
Posts: 29
Thanks Dimich

I went through your blog post.
As a matter of fact I didn't try your example. I tried to implement to my code. It was almost succesful. The result of my script should have been a cache file and it was not created.

Some errors printed inconnection with userSetup.mel.
So I'm not sure what is going on in the background at subprocess. If as you mentioned pymel.core is a specialized maya.standalone modul than it really has nothing to do with userSetup.mel. Our studio setup gives a lot of path when maya starts up. But it is for maya GUI version.

Another interesting thing for me. When I run subprocess from maya script editor whole maya is freezed during the time mayapy.exe is running. My first thought was subprocess should go on the background.
 
Old 01-31-2013, 06:30 PM   #14
Dimich
Frequenter
 
Dimich's Avatar
portfolio
Dimitry Kachkovski
TD
BRON Studios
Vancouver, Canada
 
Join Date: Oct 2005
Posts: 162
Quote:
Originally Posted by Zeedorf
...Another interesting thing for me. When I run subprocess from maya script editor whole maya is freezed during the time mayapy.exe is running. My first thought was subprocess should go on the background.


Heyya! So the reason maya freezes is likely because you are using the lines similar to these:

Code:
subprocess.Popen.wait(mayaVar) a, b = mayaVar.communicate()


subprocess.Popen.wait will force maya to wait for the subprocess to finish, and the mayaVar.communicate will do a very similar thing because it requests the communication signal from the subprocess. As I found, the subprocess communicates (in the example I used) only after it has completed it's function, hence doing a very similar thing to the subprocess.Popen.wait .

Hope that helps man!
 
Old 01-31-2013, 06:30 PM   #15
CGTalk Moderation
Lord of the posts
CGTalk Forum Leader
 
Join Date: Sep 2003
Posts: 1,066,481
Thread automatically closed

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.
__________________
CGTalk Policy/Legalities
Note that as CGTalk Members, you agree to the terms and conditions of using this website.
 
Thread Closed share thread


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
CGSociety
Society of Digital Artists
www.cgsociety.org

Powered by vBulletin
Copyright 2000 - 2006,
Jelsoft Enterprises Ltd.
Minimize Ads
Forum Jump
Miscellaneous

All times are GMT. The time now is 03:53 AM.


Powered by vBulletin
Copyright ©2000 - 2016, Jelsoft Enterprises Ltd.