Importing malformed spice model causes Unhandled exception

In the Symbol Editor, I used “Edit Simulation Model” to add a spice model to a part. The author (National Semiconductor) had omitted the leading "*" from the first line. I.e. instead of a "*" followed by a bunch of "/", it was merely:
//////////////////////////////////////////////////
It understandably could not find a Model. I clicked “OK”. I then re-entered “Edit Simulation Model” to investigate and received:
Unhandled Exception dialog:
An Unhandled exception occurred. Press “Abort” to terminate the program.
“Retry” to exit the program normally and “Ignore” to try to continue.

That does sound like a bug. Either in Kicad itself or in ngspice. Probably best to create an issue on gitlab with some steps to reproduce the error. Issues · KiCad / KiCad Source Code / kicad · GitLab

I was able to reproduce the problem that you are seeing and submitted a merge request that fixes the issue. I think the devs are very busy with the v9 release at the moment, so not sure if anybody will have time to review and merge this.

Edit: The bug fix has been merged into the master branch. So, the issue should be gone in the upcoming v9 release.