DzCallBack::setDeleteAfterExecution(true) corrupts QScriptEngine stack?
Omniflux
Posts: 377
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
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).
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...
I spoke too soon. With a new instance, I don't get any errors in the script pane, but DS crashes on exit
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:
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.
Okay, with the assumption that we are attempting to use this correctly, I have submitted a ticket - #365400.
I received a response today that customer services was able to reproduce this and have submitted a report to the dev team.
http://docs.daz3d.com/doku.php/public/software/dazstudio/4/change_log#4_15_0_25