Community
Bifrost Forum
Welcome to the Bifrost Forum. This is the place for artists using Bifrost to ask and answer questions, browse popular topics, and share knowledge about creating effects procedurally using Bifrost. You can also visit the Bifrost Community on AREA to download an array of ready-to-use graphs, read Bifrost news and updates, and find the latest tutorials.
cancel
Showing results forย 
Showย ย onlyย  | Search instead forย 
Did you mean:ย 

Hard crash when connecting custom node's outputMesh to BifrostGraph

2 REPLIES 2
SOLVED
Reply
Message 1 of 3
jonathan_khao
228 Views, 2 Replies

Hard crash when connecting custom node's outputMesh to BifrostGraph

Hi, I have a customNode c++ node that outputs a single mesh (MFnMesh.create with MFnMeshData), and it seems to build a correct mesh. But when I plug it into a Bifrost graph, I get a hard crash (see below). 

 

What's odd is if I first generate the mesh, remove history (disconnect it from the custom node), Maya doesn't crash:

[CustoNode.outMesh] --> [Mesh]                     > OK 
[CustoNode.outMesh] --> [Mesh] --> [BifrostGraph]  > CRASH
                        [Mesh] --> [BifrostGraph]  > OK

 

If I replace CustomNode by a makeSphere, or another light custom node, it works properly.  

So I've edited CustomNode to output a simple cube (while still retaining its many inputs plugs and heavier computes), and it crashes back...

 

The top of the crash report seems to indicate there's an issue with getting Set members when the CustomNode is connected:

Crash ID 741299829

 
Exception code: C0000005: ACCESS_VIOLATION - illegal read at address 0xFFFFFFFF
Fault address:  F0FE60CB in C:\Program Files\Autodesk\Maya2024\bin\DataModel.dll
0001:003550CB Logical offset (see .map file for location)

Call stack:
    Module:  C:\Program Files\Autodesk\Maya2024\bin\DataModel.dll (-exported-)
    Location: DataModel.dllTobjectSet::getFlattenedMemberList + 4B bytes
    Decl: public: void __cdecl TobjectSet::getFlattenedMemberList(class TselectionList & __ptr64)const __ptr64
    Module:  C:\Program Files\Autodesk\Maya2024\bin\OpenMaya.dll (-exported-)
    Location: OpenMaya.dllAutodesk::Maya::OpenMaya20240000::MFnSet::getMembers + 59 bytes
    Decl: public: class Autodesk::Maya::OpenMaya20240000::MStatus __cdecl Autodesk::Maya::OpenMaya20240000::MFnSet::getMembers(class Autodesk::Maya::OpenMaya20240000::MSelectionList & __ptr64,bool)const __ptr64
    Module:  C:\Program Files\Autodesk\Bifrost\Maya2024\2.8.0.0\bifrost\bin\BifrostObjectBoardPlugin_2_8_0.dll (-exported-)
    Location: BifrostObjectBoardPlugin_2_8_0.dllmayaVectorArrayToObject + 549D8 bytes
    Decl: class Amino::Ptr<class Bifrost::Object> __cdecl mayaVectorArrayToObject(class Autodesk::Maya::OpenMaya20240000::MPlug const & __ptr64,class Autodesk::Maya::OpenMaya20240000::MDataHandle & __ptr64)
    Module:  C:\Program Files\Autodesk\Bifrost\Maya2024\2.8.0.0\bifrost\bin\BifrostObjectBoardPlugin_2_8_0.dll (-exported-)
    Location: BifrostObjectBoardPlugin_2_8_0.dllmayaVectorArrayToObject + 2516D bytes
    Decl: class Amino::Ptr<class Bifrost::Object> __cdecl mayaVectorArrayToObject(class Autodesk::Maya::OpenMaya20240000::MPlug const & __ptr64,class Autodesk::Maya::OpenMaya20240000::MDataHandle & __ptr64)
    Module:  C:\Program Files\Autodesk\Bifrost\Maya2024\2.8.0.0\bifrost\bin\BifrostObjectBoardPlugin_2_8_0.dll (-exported-)
    Location: BifrostObjectBoardPlugin_2_8_0.dllmayaVectorArrayToObject + 26F94 bytes
    Decl: class Amino::Ptr<class Bifrost::Object> __cdecl mayaVectorArrayToObject(class Autodesk::Maya::OpenMaya20240000::MPlug const & __ptr64,class Autodesk::Maya::OpenMaya20240000::MDataHandle & __ptr64)
    Module:  C:\Program Files\Autodesk\Bifrost\Maya2024\2.8.0.0\bifrost\bin\BifrostObjectBoardPlugin_2_8_0.dll (-exported-)
    Location: BifrostObjectBoardPlugin_2_8_0.dllmayaVectorArrayToObject + 1447A bytes
    Decl: class Amino::Ptr<class Bifrost::Object> __cdecl mayaVectorArrayToObject(class Autodesk::Maya::OpenMaya20240000::MPlug const & __ptr64,class Autodesk::Maya::OpenMaya20240000::MDataHandle & __ptr64)
    Module:  C:\Program Files\Autodesk\Bifrost\Maya2024\2.8.0.0\bifrost\bin\BifrostBoardExecutor_2_2_0.dll (-exported-)
    Location: BifrostBoardExecutor_2_2_0.dllBifrostBoardJob::Requirements::add + 38D064 bytes

 

I also compiled on linux to see if anything else popped up, and I didn't see any differences in the call stack, but on rare occasions, I saw a Qt related message: 

 

qobject::connect: cannot queue arguments of type 'tmodelnode' (make sure 'tmodelnode' is registered using qregistermetatype().)

 

 

I tried making sure the mesh is properly built, witht UVs, objectGroups, etc. Also tried connecting to the BifrostGraph via cmds.connectAttr or cmds.vnnNode, but still no luck. 

 

Any ideas on what could cause this ? I'm getting desperate here ๐Ÿ˜… 

 

2 REPLIES 2
Message 2 of 3

@jonathan_khao It seems like you are accessing invalid memory somwhere. Are you able to share any code? Otherwise we can only speculate what the problem might be.

Message 3 of 3

Thanks for the response @morten.bojsen-hansen

After checking all the custom upstream nodes, I realized that one of them was wrongfully registered as an  MPxParticleAttributeMapperNode (instead of MPxNode).

If this particular node was indirectly connected to BifrostGraph, the crashed occurred.

 

I still have no idea why it makes a difference in terms of how/when BifrostGraph is recieving the mesh data, but I've updated the node registration and it now works properly!

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums