FaCTPlusPlusException - bad allocation

Issue #18 resolved
Dmitry Tsarkov repo owner created an issue

Original issue 18 created by dtsarkov on 2009-10-15T08:40:23.000Z:

I am not sure this is right place to ask, but I have problem with FaCT++.

I am writing Java program with OWLAI2.2.0. And I use FaCT++ as DL reasoner.

After starting program, it make exception, FaCTPlusPlusException - bad allocation.

Can you guide me what sorts of behaviors makes this "bad allocation"?

My program loads more than 100 ontologies (All is "Pizza" ontology, but have different logical ontology URIs)and alignment between them. It works during some time, but after that it makes errors.

Please help me. Thank you very much.

Comments (4)

  1. Dmitry Tsarkov reporter

    Comment [#1](https://code.google.com/p/factplusplus/issues/detail?id=18#c1) originally posted by dtsarkov on 2009-10-15T18:52:05.000Z:

    This usually means that FaCT++ needs more memory for the reasoning than it is available for it. So , you can treat is as a "Run out of memory" exception. However, if you are sure that it is not a case, I'd like to see the ontology(-es) and what are you doing with them to check what might it be.

    PS. I assume you are using the latest version of FaCT++

  2. Dmitry Tsarkov reporter

    Comment [#2](https://code.google.com/p/factplusplus/issues/detail?id=18#c2) originally posted by dtsarkov on 2009-10-16T04:40:48.000Z:

    Thanks very much for your comments.

    I am using FaCTpp-OWLAPI-v1.3.0.1.jar and FaCTpp-win-v1.3.0.zip on Windows XP pack3.

    I run java with '-Xms 128m -Xmx1024m'. After runing my program, I monitored memory status with jvisualvm.exe included in JDK package(1.6.0_16). But, my program pops the exeception before reaching 1024m, specifically at the moment near 120m.

    About what am I doing,- In constructor, I used following code, it called only one time during program life time - manager, reasonerFactory, reasoner are member objects of this class. private OWLOntologyManager manager; manager = OWLManager.createOWLOntologyManager(); private OWLReasonerFactory reasonerFactory; reasonerFactory = new FaCTPlusPlusReasonerFactory(); private OWLReasoner reasoner; reasoner = reasonerFactory.createReasoner(manager);

    And then, executes following pattern of code(called by other object), more than thousands of times. pattern: call block 2, whenever finishing block 1. means that at some time, reasoner always loads only 13 ontologies.

    1{ ont = manager.reloadOntology(uri); Set<OWLOntology> imports = manager.getImportsClosure(ont); reasoner.loadOntologies(imports); some inferences ...(i.e. SubClassOf) }

    2{ reasoner.clearOntologies(); }

    Attached files are some parameter of reloadOntology() function. There are pizza0 ~ pizza99 ontologies. and pizza0-pizza1 includes alignments between pizza0 and pizza1. So, there are 100x100 alignments.

    Execuse my English, Thanks you.

  3. Dmitry Tsarkov reporter

    Comment #3 originally posted by dtsarkov on 2015-04-08T16:40:26.000Z:

    1G for such a big problem is not enough. Increasing the memory by passing -Xmx4G or so will help.

  4. Log in to comment