uima-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Petr Baudis <pa...@ucw.cz>
Subject CasCopier breakages in uimaj-2.7.0
Date Fri, 22 May 2015 22:21:35 GMT

  I'm trying to bring uimaj-2.7.0 to my code, but I'm hitting some
trouble with my CasCopier code:

  * alreadyCopied(FeatureStructure fs) is gone without an obvious
    replacement; it seems to me that

	alreadyCopied(((FeatureStructureImpl) fs).getAddress())

    is the correct replacement after digging somewhat at CasCopier
    source code, but is that even really right?  I guess this
    is a bug as that interface was public...

  * Even with the fix above, my code, e.g.


crashes with

	Caused by: java.util.ConcurrentModificationException
		at org.apache.uima.cas.impl.FSIndexRepositoryImpl$LeafPointerIterator.checkConcurrentModification(FSIndexRepositoryImpl.java:967)
		at org.apache.uima.cas.impl.FSIndexRepositoryImpl$LeafPointerIterator.ll_get(FSIndexRepositoryImpl.java:1002)
		at org.apache.uima.cas.impl.FSIndexRepositoryImpl$LeafPointerIterator.get(FSIndexRepositoryImpl.java:995)
		at org.apache.uima.cas.impl.FSIteratorWrapper.get(FSIteratorWrapper.java:53)
		at org.apache.uima.cas.impl.FSIteratorImplBase.next(FSIteratorImplBase.java:67)
		at org.apache.uima.cas.impl.FSIteratorImplBase.next(FSIteratorImplBase.java:33)
		at cz.brmlab.yodaqa.analysis.passextract.PassFilter.process(PassFilter.java:74)
		at org.apache.uima.analysis_component.JCasAnnotator_ImplBase.process(JCasAnnotator_ImplBase.java:48)
		at org.apache.uima.analysis_engine.impl.PrimitiveAnalysisEngine_impl.callAnalysisComponentProcess(PrimitiveAnalysisEngine_impl.java:385)
		... 26 more

     so it appears I cannot iterate a source view and simultaneously
     copyFs() from it? What are the exact rules for this?  It seems
     rather contraintuitive to me, and should be documented.
     Using the new .withSnapshotIterator() feature helps to work-around
     this, but it means I need to uglify code currently using JCasUtil


				Petr Baudis
	If you do not work on an important problem, it's unlikely
	you'll do important work.  -- R. Hamming

View raw message