Skip to content

process is still alive when finishing the automation #173

Closed
@bjrmatos

Description

@bjrmatos

Short summary

Seems like there is some active handle that prevents the node.js process to exit, probably related when execution the logic when trying to find a match for an image

Desired execution environment / tested on

  • Virtual machine (Windows 10, with node 14.12.0)
  • Docker container
  • Dev/Host system

Detailed question

I was working on my app and doing a lot of debugging and noticed that the process was not ended even when reaching the end of the execution, so i've used the why-is-node-running module to check what active resources/handles that prevent the process to exit.

here is the output of why-is-node-running:

# nan:AsyncWorker
Z:\accounting-processes-bot\node_modules\opencv4nodejs-prebuilt\lib\promisify.js:18                                      - fn.apply(this, args);
Z:\accounting-processes-bot\node_modules\opencv4nodejs-prebuilt\lib\promisify.js:9                                       - return new Promise((resolve, reject) => {
Z:\accounting-processes-bot\node_modules\@nut-tree\nut-js\dist\lib\provider\opencv\match-image.function.js:14            - const match = await haystack.matchTemplateAsync(needle, cv.TM_SQDIFF_NORMED);
Z:\accounting-processes-bot\node_modules\@nut-tree\nut-js\dist\lib\provider\opencv\template-matching-finder.class.js:92  - const matchResult = await match_image_function_1.matchImages(haystack, scaledNeedle);
Z:\accounting-processes-bot\node_modules\@nut-tree\nut-js\dist\lib\provider\opencv\template-matching-finder.class.js:118 - const matches = await this.findMatches(matchRequest, debug);

any clue how to prevent this? maybe there is some method that am i missing to call that closes something related to the opencv?

thanks.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions