10-17-2017 05:41 AM - edited 10-17-2017 05:47 AM
In your code I see that you have placed set_system('thread_pool', 'false') after return, so your function returns to LabVIEW after the execution and never reaches last command. You could place set_system('thread_pool', 'false') before return and that likely should solve the problem. Or you could write additional function, say "ShutDown" or something similar, and call it when you have finished all the work with Halcon in LabVIEW. Place set_system('thread_pool', 'false') as the last operator inside this func and try.
P.S.: I assume you know that for true parallelization and faster image processing (especially on multicore machines inside 64-bit OS'es) you should have thread pool set to true, so set it to false only when you don't need Halcon anymore.
10-17-2017 06:19 AM
I tried all the things whatever you told me but still same problem hanging issue not solved
10-17-2017 07:37 AM
MTrivedi
Unfortunately I don't have PC with LabVIEW, Halcon and Visual Studio at the moment, but I could check your code later (somewhere in a week or so). Right now try to comment ClearObj statement in the end of the code.
HALCON Programmer's Guide:
All of HALCON’s classes, i.e., not only HImage, HRegion, HTuple, HFramegrabber etc., but also the class HObject used when calling operators in the procedural approach, release their allocated resources automatically in their destructor (see also section 5.2.4 on page 49). Furthermore, when constructing instances anew, e.g., by calling CreateBarCodeModel via an already initialized instance as mentioned in section 5.2.3 on page 48, the already allocated memory is automatically released before reusing the instance. Thus, there is no need to call the operator ClearObj in HALCON/C++; what is more, if you do use it HALCON will complain about already released memory. To explicitly release the resources before the instance gets out of scope, you can call the method Clear() of the instance.
10-18-2017 12:52 AM
I tried as per you told me. Now hanging issue not occurred but this error popup.
10-18-2017 05:51 AM - edited 10-18-2017 05:52 AM
Thread pool still should be set to false in the end. And your CLFN should be configured as running in any thread (yellow color). Could you post all your code here? And what about LV code? Is it just a single CLFN or something more complex?
10-22-2017 10:54 PM
It is just single CLFN. Nothing else.
10-23-2017 02:23 PM
MTrivedi
Have you done what I suggested in the last post?
@dadreamer wrote:
Thread pool still should be set to false in the end. And your CLFN should be configured as running in any thread (yellow color).
10-23-2017 11:17 PM
Yes I tried this also
10-24-2017 03:39 AM
But still same problem is occurred
10-24-2017 07:38 AM
This is what i have done as per you suggest. But still hanging issue occurs