Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

NullReferenceException in CommitStaged #139

Open
ccady opened this issue May 20, 2024 · 3 comments
Open

NullReferenceException in CommitStaged #139

ccady opened this issue May 20, 2024 · 3 comments

Comments

@ccady
Copy link
Contributor

ccady commented May 20, 2024

The following code demonstrates a NullReferenceException when invoking CommitStaged:

public void SymSpellTest()
{
	// Demonstrates a problem in SymSpell.
	var spell = new SymSpell();
	var stage = new SymSpell.SuggestionStage(10);
	spell.CreateDictionaryEntry("word", 10, stage);
	spell.CommitStaged(stage); // this causes a NullReferenceException
}

I have been having trouble figuring this out. I apologize for not debugging further.

@wolfgarbe
Copy link
Owner

Thank you for reporting the issue. I will look into this.

@EugeneZaitsev
Copy link

This is still an issue. "deletes" dictionary created in LoadDictionary method, but not in CommitStaged method, that causes exception.

@wolfgarbe
Copy link
Owner

wolfgarbe commented Jan 4, 2025

I think the issue has already been fixed with #126 .
Possibly you are using the NuGet package or the release v6.7.2 which both have not been updated since.
When using the latest code from the master branch the problem should disappear.

I have updated both the NuGet package and the release.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants