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
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
On Jan 10, 2013, at 9:41 AM, "Cledat, Romain E"
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
From: ocr-dev-bounces(a)lists.01.org [mailto:email@example.com] On Behalf Of
Sent: Wednesday, January 09, 2013 4:30 PM
To: Technical discussion about OCR
Subject: [OCR-dev] What does ocrCleanup clean up ?
I have a function that calls ocrInit and ocrCleanup and this function gets called several
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.
OCR-dev mailing list