# Kernel crash with KeySelect and repeated keys on list of rules [closed]

After running

KeySelect[{"a" -> 0, "a" -> 1}, True &]


my kernel either hangs forever (possibly with the eventual warning that "the kernel is not responding to a Dynamic evaluation") or crashes on the next evaluation. Please confirm.

Strangely enough, it only seems to crash when the above line is the last command submitted to the kernel. Evaluating the following seems fine:

KeySelect[{"a" -> 0, "a" -> 1}, True &]
0


(That is, evaluating the expression that makes it crash, then the expression 0 which evaluates fine in a single Frontend -> Kernel roundtrip seems to catch the crash.)

Context:

\$Version

"11.1.1 for Microsoft Windows (64-bit) (April 18, 2017)"


Notebook demonstration

## closed as off-topic by Edmund, LCarvalho, m_goldberg, bbgodfrey, Bob HanlonNov 4 '17 at 16:00

This question appears to be off-topic. The users who voted to close gave these specific reasons:

• "The question is out of scope for this site. The answer to this question requires either advice from Wolfram support or the services of a professional consultant." – m_goldberg, Bob Hanlon
• "This question arises due to a simple mistake such as a trivial syntax error, incorrect capitalization, spelling mistake, or other typographical error and is unlikely to help any future visitors, or else it is easily found in the documentation." – Edmund, LCarvalho, bbgodfrey
If this question can be reworded to fit the rules in the help center, please edit the question.

• running Association on the input first fixes the problem. – masterxilo Oct 23 '17 at 12:45
• The documentation for KeySelect states that it operates on an Association not a list of rules. – Edmund Oct 23 '17 at 15:07
• @Edmund - in all the versions I have installed, it says "KeySelect can be applied not only to Association objects, but also to lists of rules." This is a bug, but for me it seems to be fixed. I get the wrong behavior in version 10.3.1 but not 11.1.1 – Jason B. Oct 23 '17 at 18:04
• @masterxilo - your two examples seem identical... – Jason B. Oct 23 '17 at 18:05
• In MMA everything is an expression. Running something with possibly invalid output should not crash the kernel (barring edge cases that eat up all your memory, etc). I see no reason to close this question. – LLlAMnYP Oct 30 '17 at 16:00