DzCallBack::setDeleteAfterExecution(true) corrupts QScriptEngine stack?

Could someone verify I am not doing something wrong here?

I am running 4.15.0.2 if it matters...

With a node selected, run this script

var oNode = Scene.getPrimarySelection();var oCallBackMgr = App.getCallBackMgr();var oCallBack = oCallBackMgr.createCallBack ("Test", "print ('Test')", true);oCallBack.setDeleteAfterExecution (true);oCallBack.setConnection (oNode, "visibilityChanged()");

Verify the QScriptEngine stack is still good

print (App.getCallBackMgr().getCallBackList())

Change the visibility of the node

Verify the QScriptEngine stack is corrupt

print (App.getCallBackMgr().getCallBackList())

Comments

  • PraxisPraxis Posts: 240

    FWIW: I don't have v4.15 installed, but it works OK for me in v4.12.2.6 Beta (it prints the CallBackList OK both times).

     

  • OmnifluxOmniflux Posts: 362

    Thanks for testing that. It made me think to launch a new instance with default configuration and all is good there too, so there must be something bad in my instance settings...

  • OmnifluxOmniflux Posts: 362

    I spoke too soon. With a new instance, I don't get any errors in the script pane, but DS crashes on exit

    DAZStudio.exe caused ACCESS_VIOLATION in module "C:\Program Files\DAZ 3D\DAZStudio4\dzcore.dll" at 0033:00000000AD75E2F3, DzCallBackMgr::DzCallBackMgr()+1427 byte(s)

     

  • PraxisPraxis Posts: 240

    Yes, me too:  With further testing I get odd stuff as well, using DS v4.12.2.6:

    ---Test 1----------------------------------------------

    Start DS, load and select a G2F figure, load this script and execute it:

    var oNode = Scene.getPrimarySelection();var oCallBackMgr = App.getCallBackMgr();var oCallBack = oCallBackMgr.createCallBack ("Test", "print ('Test')", true);oCallBack.setDeleteAfterExecution (true);oCallBack.setConnection (oNode, "visibilityChanged()");// Verify the QScriptEngine stack is still goodprint (App.getCallBackMgr().getCallBackList());// Change the visibility of the nodeoNode.setVisible( !oNode.isVisible() );// Verify the QScriptEngine stack is corruptprint (App.getCallBackMgr().getCallBackList());// Restore the visibility of the nodeoNode.setVisible( !oNode.isVisible() );

    Result: All OK.

    Exit DS: All OK.

     

    ---Test 2----------------------------------------------

    Start DS, load and select a G2F figure, load the above script and execute it:

    Result: All OK.

    Re-Execute the script: Immediate error:
        ..\..\..\..\..\src\sdksource\general\dzscript.cpp(1178): Unhandled error while executing script.
        QScriptEngine::popContext() doesn't match with pushContext()

    Exit DS: Crash in dzcore.dll

      DzCallBackMgr::DzCallBackMgr()+1427 byte(s)
      DzCallBackMgr::getSignalSignature()+3340 byte(s)
      DzApp::~DzAp()+1084 byte(s)
      ...etc.

     

  • OmnifluxOmniflux Posts: 362

    Okay, with the assumption that we are attempting to use this correctly, I have submitted a ticket - #365400.

  • OmnifluxOmniflux Posts: 362

    I received a response today that customer services was able to reproduce this and have submitted a report to the dev team.

Sign In or Register to comment.