Crash when getting the individuals of a description

Issue #12 resolved
Dmitry Tsarkov repo owner created an issue

Original [issue 12](https://code.google.com/p/factplusplus/issues/detail?id=12) created by dtsarkov on 2008-04-18T21:55:50.000Z:

I am experiencing a crash when getting the individuals of an OWLDescription that is a intersection of a class and a OneOf.

The error message when it crashes is: java: tSaveStack.h:50: T* TSaveStack<T>::pop(unsigned int) [with T = DlCompletionGraph::SaveState]: Assertion `this->last >= depth' failed.

Attached is a test case. Look at the code there are some comments that describe what I am seeing, including a case in which there is no crash, but the result is incorrect (I thought it might be related). Below is the stack trace from the crash.

  1.  0 0x00002b7a42822cab in raise () from /lib/libc.so.6
  2.  1 0x00002b7a42824660 in abort () from /lib/libc.so.6
  3.  2 0x00002b7a4281c436 in assert_fail () from /lib/libc.so.6
  4.  3 0x00002aaaf2afb758 in TSaveStack<DlCompletionGraph::SaveState>::pop (this=0x2aaaf43a2300, depth=1) at tSaveStack.h:50
  5.  4 0x00002aaaf2afa0e9 in DlCompletionGraph::restore (this=0x2aaaf43a2280, level=1) at dlCompletionGraph.cpp:163
  6.  5 0x00002aaaf2ac438c in DlSatTester::restore (this=0x2aaaf43a2240, newTryLevel=1) at Reasoner.cpp:705
  7.  6 0x00002aaaf2ac444c in DlSatTester::reInit (this=0x2aaaf43a2240) at Reasoner.cpp:86
  8.  7 0x00002aaaf2abf4b6 in DlSatTester::runSat (this=0x2aaaf43a2240, p=517, q=-540) at Reasoner.h:782
  9.  8 0x00002aaaf2ab4b33 in TBox::isSubHolds (this=0x2aaaf4323bb0, pConcept=0x2aaaf43a9e80, qConcept=0x2aaaf4362220) at dlTBox.cpp:164
  10.  9 0x00002aaaf2aecffc in DLConceptTaxonomy::testSub (this=0x2aaaf437d610, p=0x2aaaf43a9e80, q=0x2aaaf4362220) at DLConceptTaxonomy.cpp:81
  11.  10 0x00002aaaf2aed0a8 in DLConceptTaxonomy::testSubsumption (this=0x2aaaf437d610, upDirection=true, cur=0x2aaaf4359e60) at DLConceptTaxonomy.cpp:165
  12.  11 0x00002aaaf2aed1fb in DLConceptTaxonomy::enhancedSubs (this=0x2aaaf437d610, upDirection=true, cur=0x2aaaf4359e60) at DLConceptTaxonomy.cpp:158
  13.  12 0x00002aaaf2aed264 in DLConceptTaxonomy::searchBaader (this=0x2aaaf437d610, upDirection=true, cur=0x2aaaf437d6e0) at DLConceptTaxonomy.cpp:124
  14.  13 0x00002aaaf2a9b97a in DLConceptTaxonomy::runBottomUp (this=0x2aaaf437d610) at DLConceptTaxonomy.h:113
  15.  14 0x00002aaaf2add33b in Taxonomy::generalTwoPhaseClassification (this=0x2aaaf437d610) at Taxonomy.cpp:122
  16.  15 0x00002aaaf2addbcf in Taxonomy::performClassification (this=0x2aaaf437d610, p=0x2aaaf4362220) at Taxonomy.cpp:76
  17.  16 0x00002aaaf2ade56d in Taxonomy::doClassification (this=0x2aaaf437d610, p=0x2aaaf4362220) at Taxonomy.h:134
  18.  17 0x00002aaaf2addc8f in Taxonomy::classifyTop (this=0x2aaaf437d610) at Taxonomy.cpp:327
  19.  18 0x00002aaaf2adde50 in Taxonomy::classifyEntry (this=0x2aaaf437d610, p=0x2aaaf4362220) at Taxonomy.cpp:258
  20.  19 0x00002aaaf2ab3d81 in TBox::classifyTempConcept (this=0x2aaaf4323bb0) at dlTBox.cpp:275
  21.  20 0x00002aaaf2adfff4 in ReasoningKernel::setUpCache (this=0x2aaaf4246310, query=0x2aaaf4362750, level=ReasoningKernel::csClassified) at Kernel.cpp:188
  22.  21 0x00002aaaf2aa8f05 in ReasoningKernel::getDescendants<JTaxonomyActor<IndividualPolicy> > (this=0x2aaaf4246310, C=0x2aaaf4362750, actor=@0x40229a80) at ../Kernel/Kernel.h:547
  23.  22 0x00002aaaf2aa8f5e in ReasoningKernel::getInstances<JTaxonomyActor<IndividualPolicy> > (this=0x2aaaf4246310, C=0x2aaaf4362750, actor=@0x40229a80) at ../Kernel/Kernel.h:647
  24.  23 0x00002aaaf2a875f9 in Java_uk_ac_manchester_cs_factplusplus_FaCTPlusPlus_askInstances (env=0x40114590, obj=0x40229b90, arg=0x40229b88) at FaCTPlusPlus.cpp:1637

Comments (2)

  1. Dmitry Tsarkov reporter

    Comment [#1](https://code.google.com/p/factplusplus/issues/detail?id=12#c1) originally posted by dtsarkov on 2008-04-25T16:58:18.000Z:

    I am experiencing another crash that may or may not be related to this one. They both only occur in the presence of ObjectOneOf restrictions. However this crash is non-deterministic. I can predictably make it happen by repeatedly running a function that creates classes that are equivalent to an ObjectOneOf restriction.

    I have attached the trace that the JVM produces.

    I have not been able to replicate the problem outside my large codebase, so at least for now there is no minimal test case.

  2. Log in to comment