Skip to content

NLP_ENGINE tries to add analyzer already in memory #380

Closed

Description

@amnonma

NLP_Engine tries to add existing analyzer, tries to read kb that is already in memory.
"Active Algo count=1" also means that an Algo data structure is not freed (ie memory leak).

stderr.log file, eg running CodedExamples, shows the below errors.

[addAna: Named analyzer already present: d:\git\mvr\analyzers\CodedExamples]
[con_add_root: Root concept of kb already exists.]
[bind_sys: Enter.]
[Loaded knowledge base.]
0 0 [Exec analyzer time=0.079 sec]
0 0 Active Algo count=1

(I would assign to me, but very long time since I fixed these aspects of the engine....)

Activity

  1. ddehilster commented on Jun 17, 2026

    @ddehilster
    Member

    Fixed by #658 (engine 3.5.6). Same root cause as reported here: NLP_ENGINE::init looked up "is this analyzer already loaded?" by the raw caller path, but the NLP is registered under its basename, so on re-entry it failed to match — re-reading the KB and adding an analyzer already in memory, leaking the prior one (the Active Algo count=1 symptom). The redundant explicit addAna (the NLP constructor already registers) produced the [addAna: Named analyzer already present] log.

    #658 keys the registry on the canonical analyzer name so a re-entrant analyze() reuses the loaded NLP instead of rebuilding, and removes the redundant addAna. Verified in VisualText/py-package-nlpengine#31: the re-entry now logs [Reusing loaded analyzer: ...] with no "already present" noise and no rebuild.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions