Hi benoit,
I opened bug #5 related to that and fixed it too.
Let me know if that solves your problem.
Best,
Vincent
On Jan 10, 2013, at 6:54 PM, Benoit Meister <meister(a)reservoir.com> wrote:
Thanks! Let me know if your tests bring something up, otherwise
I'll make a repro.
On Thu, Jan 10, 2013 at 12:50 PM, Vincent Cavé <vc8(a)rice.edu> wrote:
Hi Benoit,
Romain is right, the runtime doesn't keep track of events and edts. There's no
automatic cleanup for any data structure associated with them.
It's the responsibility of the user/generated code to cleanup events and edts using
the ocr api: ocrEventDestroy, ocrEdtDestroy (I'm not 100% sure what's the rule for
DBs). init/cleanup just build "infrastructure" data-structures such as workers,
queues etc… It could be that something is not correctly init/cleanup, leaving corrupted
pointers somewhere.
Benoit, if you have a simple example I can play with, I'll be glad to have a look to
understand where the segfault occurs.
I'll also write some simple tests calling init/cleanup in sequence see if I can get
it to fail.
Best,
Vincent
On Jan 10, 2013, at 9:41 AM, "Cledat, Romain E"
<romain.e.cledat(a)intel.com> wrote:
> Hello,
>
> This may be a bug so please file a bug report with a test case (btw, you mentioned
you can’t add attachments to bug reports, is this correct? Rob, can we fix this?).
>
> The idea behind ocrInit and ocrCleanup is indeed to create and destroy the OCR
environment so they should, in theory, be able to be called multiple times as long as they
are properly paired and not nested.
>
> I’ll let Vincent answer on whether or not ocrCleanup will try to cleanup events/DBs
that have already been cleaned up but I do not think so so I think the problem may be
elsewhere.
>
> Thanks,
> Romain
>
>
> From: ocr-dev-bounces(a)lists.01.org [mailto:ocr-dev-bounces@lists.01.org] On Behalf
Of Benoit Meister
> Sent: Wednesday, January 09, 2013 4:30 PM
> To: Technical discussion about OCR
> Subject: [OCR-dev] What does ocrCleanup clean up ?
>
> Hi again,
>
> I have a function that calls ocrInit and ocrCleanup and this function gets called
several times.
> I'm cleaning up all sorts of things at each call, including events (since
they're sticky), DBs, etc.
> But I don't know if I should do that or if I'm conflicting with ocrCleanup.
>
> I get segfaults at the second call of the function, when it first calls
ocrEdtCreate, which is why I'm suspecting an interference problem.
>
> Thanks,
> - Benoit
> _______________________________________________
> OCR-dev mailing list
> OCR-dev(a)lists.01.org
>
https://lists.01.org/mailman/listinfo/ocr-dev
_______________________________________________
OCR-dev mailing list
OCR-dev(a)lists.01.org
https://lists.01.org/mailman/listinfo/ocr-dev
_______________________________________________
OCR-dev mailing list
OCR-dev(a)lists.01.org
https://lists.01.org/mailman/listinfo/ocr-dev