Hi,
thank you very much for this analysis! I am glad that your problem is hopefully resolved. The missing reset of the annotation-based variables was considered a bug (UIMA-5888) and was resolved in Ruta 2.7.0. For Ruta 2.8.0, there were several improvements for handling null values, e.g., UIMA-5663 and UIMA-5481. I have to check the code, but I think null as an initial value should be the default now, at least for annotation and string variables. Best, Peter Am 05.02.2020 um 00:02 schrieb Mario Juric: > Hi, > > I like to follow up on this one, which I posted a while ago, since the > cause of the issue has finally been identified. > > It turns out that it was caused by uninitialised Ruta annotation > variables. Ruta doesn’t seem to allow an annotation variable to be set > null at the point of declaration or later, so we assumed that it would > implicitly be initialised to null during script execution for every > new CAS, but this is not the case in Ruta 2.6.1. The variable would > hold a reference to an annotation from the previous CAS when it hasn’t > been assigned a new value from the new CAS, because the rule that > makes the assignment is never fired. > > I have illustrated this using the attached example code where a > CasRuntimeException is the result with Ruta 2.6.1, but the problem > seems solved in Ruta 2.8.0. This exception could in our full setup > sometimes trigger a NullpointerException during exception handling, > which is what I first reported. I assume the problem would be gone in > Ruta 3.0.0 as well. > > I think the matter can be considered closed, although we are not > through with all tests yet. I wonder though if it would generally be > useful to allow the null value to be assigned to annotation variables. > > > Cheers, > Mario > > > > > > > > > > > >> On 11 Nov 2019, at 22:19 , Mario Juric <[email protected] >> <mailto:[email protected]>> wrote: >> >> Hi Peter, >> >> Ruta version is 2.7.0 with UIMA version 2.10.2 in this setup. >> >> We are to best of my knowledge not trying to access any internal Ruta >> objects and there is nothing that makes any covered text assignments. >> >> Cheers Mario >> >> >> >> >> >> >> >> >> >> >> >>> On 11 Nov 2019, at 11:13 , Peter Klügl <[email protected] >>> <mailto:[email protected]>> wrote: >>> >>> Hi, >>> >>> >>> and which version of UIMA Ruta? >>> >>> >>> Do you access internal Ruta objects somehow? >>> >>> Do you (by accident) try to assign covered text? >>> >>> >>> >>> Best, >>> >>> >>> Peter >>> >>> >>> >>> Am 11.11.2019 um 10:23 schrieb Richard Eckart de Castilho: >>>> Hi Mario, >>>> >>>> which version of the UIMA Java SDK are you using? >>>> >>>> -- Richard >>>> >>>>> On 11. Nov 2019, at 09:58, Mario Juric <[email protected] >>>>> <mailto:[email protected]>> wrote: >>>>> >>>>> Hi Peter, >>>>> >>>>> A while ago we started to get some erratic null pointer exceptions >>>>> from Ruta because the type of some feature structure element is >>>>> null (see stack trace below). The error is not consistently >>>>> reproducible, in fact it seldomly occurs and when reprocessing the >>>>> document it doesn’t happen again. We therefore think there are >>>>> some race conditions at play when running in a multithreaded >>>>> environment as we do in production, and I was hoping that maybe >>>>> you would get an idea what might be causing it just by looking at >>>>> the stack trace. >>>>> >>>>> Cheers >>>>> Mario >>> >>> -- >>> Dr. Peter Klügl >>> R&D Text Mining/Machine Learning >>> >>> Averbis GmbH >>> Salzstr. 15 >>> 79098 Freiburg >>> Germany >>> >>> Fon: +49 761 708 394 0 >>> Fax: +49 761 708 394 10 >>> Email: [email protected] <mailto:[email protected]> >>> Web: https://averbis.com >>> >>> Headquarters: Freiburg im Breisgau >>> Register Court: Amtsgericht Freiburg im Breisgau, HRB 701080 >>> Managing Directors: Dr. med. Philipp Daumke, Dr. Kornél Markó >>> >> > -- Dr. Peter Klügl R&D Text Mining/Machine Learning Averbis GmbH Salzstr. 15 79098 Freiburg Germany Fon: +49 761 708 394 0 Fax: +49 761 708 394 10 Email: [email protected] Web: https://averbis.com Headquarters: Freiburg im Breisgau Register Court: Amtsgericht Freiburg im Breisgau, HRB 701080 Managing Directors: Dr. med. Philipp Daumke, Dr. Kornél Markó
