After 4.17 update, "Switch on string contains duplicate cases"

In my marketplace asset ZText, I have a switch on string blueprint node which is quite large. It covers each letter in the alphabet, case-sensitive, as well as some special characters.

It has worked since 4.13 and up to 4.16. But on 4.17.0, I cannot compile the blueprint as I get the message “Switch on string contains duplicate cases”. I cannot see any duplicate cases, however.

I’ve created a gist with the text-version of the affected blueprint node in both 4.16 and 4.17 if it is of any help. Apart from the error message being different and the line “bHasCompilerMessage=True” being added, there doesn’t seem to be any other significant differences however.

[Switch on string 4.16 vs 4.17 · GitHub

Switch on string 4.16 vs 4.17 · GitHub

Hello,

I am unable to reproduce this issue on our end. I have a few questions for you that will help narrow down what issue it is that you are experiencing.

Quick questions:

  1. Can you reproduce this issue in a clean project?
  2. If so, could you provide a detailed list of steps to reproduce this issue on our end?
  3. Could you provide screen shots of any settings/blueprints that may be involved?

Hey, sorry for the late reply.

I’ve updated to 4.17.1 and now the issue seems to be solved. :slight_smile:

Updating to 4.17.1 solved it.

This is still broken for me on 4.17.1
Create New Project , Third Person, Create new BP ( Actor ) , in construction script add Switch on string Node , get the error

This is still a bug in 4.17.2

Yeah, I’ll have to retract my previous comment because it’s happening again in 4.17.2 for me.

to fix - manually remove all lowercase letters from SwitchOnString. this means you will be restricted to caps, but this will let the blueprint compile.
apparently, Case Sensitive checkmark does not completely work as required - I assume because Unreal capitalizes all values, so string “A” and string “a” are both shown as “A” on the node, and thus considered duplicate.