InterSpec icon indicating copy to clipboard operation
InterSpec copied to clipboard

Freeze on unusual input in nuclide selection dialog

Open manevich opened this issue 3 years ago • 3 comments

InterSpec freezes on unusual input in nuclide selection dialog.

Steps to repeat:

  1. Enter menu "Tools > Nuclide Decay Info"
  2. Press "Add Nuclide"
  3. Type "Co6+"

Not limited to "Co6+" string. Any part of valid nuclide name with at least one digit and "+" or "*" char afterwards makes InterSpec freeze.

I'm using InterSpec v1.0.10 buid date 20220808 on Debian Linux.

manevich avatar Dec 03 '22 18:12 manevich

Thank you very much for reporting this!

I wont have access to my Linux computer for about a week, and I cant reproduce on Windows/macOS, so it will be a little bit until it is fixed.

There is a regular expression used for highlighting the suggested nuclides list, based on your input, so perhaps special regex character are somehow confusing things and causing this issue. There are a number of workarounds in the IsotopeNameFilterModel::nuclideNameMatcherJs() function, which defines this javascript regex, so I will look there first.

wcjohns avatar Dec 04 '22 17:12 wcjohns

Hi, I have the same problem with InterSpec v1.0.11 buid date 20221017 on W10 64.

LaurentCronimus avatar Jan 12 '23 07:01 LaurentCronimus

Thank you for the additional input @LaurentCronimus. I took a look at this, and had a really hard time consistently reproducing it; the error didn't seem to often happen. So I think I'll just re-write the relevant code to do the validation in C++ instead of javascript.

wcjohns avatar Jan 13 '23 06:01 wcjohns