Jump to content

UT_AutoInterrupt is misbehaving


Recommended Posts

Hello,

I'm working on a big project which uses 3rd party library and I get some strange results if I try to interrupt my nodes. At first i thought that I'm doing something wrong and UT_AutoInterrupt send to callback of this library is not working properly, so I took example node that comes with Houdini SOP_Flatten, removed almost all code from cookMySop() and tried to interrupt it. This is what I get:

image.png.bce36e4b378eec4f9ee38f7d3a86cb25.png

There should be only Warning set. But I do get additional Error. And I don't know from where it come from. This is the code I have in cookMySOp():
 

OP_ERROR
SOP_Flatten::cookMySop(OP_Context &context)
{
    OP_AutoLockInputs inputs(this);
    if (inputs.lock(context) >= UT_ERROR_ABORT)
        return error();

    auto progress = UT_AutoInterrupt("");    
    for (auto i = 0; i < 10000; i++)
    {
        if (progress.wasInterrupted())
        {            
            this->addWarning(SOP_MESSAGE, "Test interrupted.");
            return error();
        }

        std::cout << "YAY: " << i << "\n";
    }
    
    return error();
}

Anybody knows why I do get this additional Error state when interrupting the node?
I'm on H18.0.348.
 

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...