Render in Mplay from Maya

   5233   6   2
User Avatar
Member
52 posts
Joined: June 2012
Offline
Hi,

I've been trying to promote the button Render in Mplay on my otl and it works nicely except that when I move the mouse or when the render is over, Mplay close suddenly. Is there anything I can do to sort this out or could it be a bug ? I can imagine that when the process is over I would need to do something to hold the Mplay window but I don't understand why when I just move the mouse, the render stops and the window closes.

Also right now I'm using HAPI_LICENCE_MODE to use only an FX license but if I only had a Houdini Engine license, would I still be able to open Mplay ?

Still using 14.0.361, will upgrade soon.

Thanks
Chris
User Avatar
Member
818 posts
Joined: Sept. 2013
Offline
chistof
I've been trying to promote the button Render in Mplay on my otl and it works nicely except that when I move the mouse or when the render is over, Mplay close suddenly.
Hm, I can't reproduce the issue where mplay closes. I've tired this on both Windows and Linux. Which platform are you on? Which Maya version are you running? I wonder if mplay actually crashed. Does it make a difference if you manually start mplay before the render? You can do this from Maya by running this MEL command:
houdiniEngine_run({“mplay -background -render -K”})

chistof
Also right now I'm using HAPI_LICENCE_MODE to use only an FX license but if I only had a Houdini Engine license, would I still be able to open Mplay ?
Yup, you can still run mplay with a Houdini Engine license.
Andrew / アンドリュー
User Avatar
Member
52 posts
Joined: June 2012
Offline
Hi Andrew,

using the mel command works great thanks, is there anyway to call a mel command from the otl ? So I can open Mplay as a pre-script as a temporary solution.

Here are more details to help understanding our issue, I reduced our wrapper to the maximum I could while checking if the issue was still here and it unfortunately was.

Using Maya 2014 sp1 (got same result with sp3) on Linux.
When the render is done, the mplay window stays, the moment the mouse reach the mplay window, it closes without any shell message. If I bring the mouse over the window before the render is over, I get an “Error: Command Exit Code: 4” and “Render failed” messages.

Here is the wrapper :

#!/bin/csh -f

pushd /serv/soft/houdini/14.0.361_x64_gcc44 > /dev/null
source /serv/soft/houdini/14.0.361_x64_gcc44/houdini_setup
popd > /dev/null

setenv HOUDINI_PATH ‘${HIP}:${HFS}/houdini’

setenv HAPI_LICENSE_MODE houdini_fx_only
setenv MAYA_MODULE_PATH /serv/soft/houdini/14.0.361_x64_gcc44/engine/maya/maya2014

/serv/soft/bin64/maya2014-x64.ext.sp1 &

Adding you as well a simple test I made to render from Mplay, in case there is anything strange, though it's all default nodes.

Thanks for your help Andrew
Chris

Attachments:
mayahouTestBoxRender.hda (21.5 KB)

User Avatar
Member
818 posts
Joined: Sept. 2013
Offline
This might be some sort of library conflict. When you ran the MEL command, it unsets the LD_LIBRARY_PATH, so maybe a library in LD_LIBRARY_PATH is causing a problem.

There are a few things to try. At the very top of your script, try unsetting LD_LIBRARY_PATH. This can be done by the csh command:
unsetenv LD_LIBRARY_PATH

You could also try clearing the variable is before loading the Maya plugin with MEL:
putenv LD_LIBRARY_PATH “”;

Maybe you can also try clearing the variable when the render button is clicked with Python:
import os
os.putenv(“LD_LIBRARY_PATH”,“”)

It might help to attach gdb onto mantra or mplay while your render is happening. If the process crashed, gdb would catch it.
Andrew / アンドリュー
User Avatar
Member
52 posts
Joined: June 2012
Offline
Ahah, thanks Andrew ! There was indeed a problem with one of the path in LD LIB, the surprising thing is that it was the default Maya lib which was causing an issue : /serv/soft/maya/maya2014-x64.ext.sp1/lib

Other plugin paths don't seem to affect Mplay. I'm not sure if it's safe to get rid of this path in the LD_LIBRARY_PATH definitely after starting Maya so I plan to modify it before and after render but please let me know if you think it wouldn't matter. I'm not sure when this variable is really important.

Thanks !
Chris
User Avatar
Member
818 posts
Joined: Sept. 2013
Offline
Yeah, I think Maya does rely on the variable, which is getting leaked into Maya. It'd be good if you can try attaching the debugger to mantra and/or mplay. You can do this by finding the process ID for mantra-bin/mplay-bin while the rendering is happening. Then, run
gdb -p <pid>
Once inside gdb, type ‘continue’ and press enter. Then let the render finish, and see if gdb shows a crash. If it does, type ‘bt’ to print out a stack trace. That might help narrowing down on the problem.
Andrew / アンドリュー
User Avatar
Member
52 posts
Joined: June 2012
Offline
I tried to use gdb for mantra and mplay but nothing much happens, when the render is done, unless I bring the mouse on mplay, there is no specific crash and when I do, I just get some exit signal. No stack.

For now I'm using a pre and post script in Mantra to get rid of maya lib before render then set it back after. Not perfect but good enough for the moment. Might want to implement a temp reset of LD_LIBRARY_PATH when opening mplay from he if it's possible ?

Cheers
Chris
  • Quick Links