5.7 crash with EditableTextBox.SetStyle?

This is easy to reproduce:

  1. Create an empty 5.7.1 project
  2. Create a user widget and add a Text Box
  3. In the PreConstruct event, call TextBox.SetStyle and give it any style. It can be an empty one or one that’s fully built out.
  4. Compile and go to design view
  5. Instant crash.

Has anyone found a workaround for this? It’s preventing us from upgrading our UI-heavy application.

Thanks!

2 Likes

Having the same issue, very easy to reproduce.

Can only have one embeded media, so will only upload the actual crash

On event Pre Construct

Set Style on a Editable Text Box Using Editable Text Box Style Structure causes crash on save

Tried multiple variation, new blueprint, different folder, different project, change variable names, the issues repeats 100% of the time

Only Work around i found is using a Editable text instead of Editable text box

Crash

1 Like

Just ran into this myself after updating my 5.6 project to 5.7.1. Was a huge pain to figure out what was causing it. I’m actually doing this a number of times throughout my project to switch between font materials to get temporarily blinking red text for alerts and things like that. Wish I had more to add to the conversation but at the moment I’m kinda just peeved that I went through the effort of updating my whole project and it’s plugins just to run into something as randomly jank and detrimental as this 2 months post 5.7’s release :confused:

EDIT: I’m not much of a programmer (my entire project is blueprint-only), however after taking a look I’ve noticed in EditableTextbox.h and in EditableTextbox.cpp on UE5.6 (where I wasn’t having any issues with this) and UE 5.7, they’re exactly the same except a small bit of code has been added in both of the UE 5.7 versions of the files

EditableTextbox.h has this added:

image

EditableTextbox.cpp has this added:

I’m not sure what exactly is causing the issues, but figured it might be relevant/helpful for anyone taking a deeper look.

EDIT2:
I’ve found somewhat of a workaround/fix, but it’s not a fun one. I essentially pulled the UE 5.7.2 engine from github, deleted and replaced the EditableTextbox.h and EditableTextbox.cpp files with their working 5.6 versions, recompiled the editor, and voila, it works now (minus the hassle of getting all of my project’s plugins recompiled as well). In retrospect, it might’ve just been easier to switch all of my textbox widgets to the editable text widgets instead, but that would’ve been a huge pain as well so I opted for this. I haven’t fully tested to see what the full consequences of this change might end up being, but I haven’t seen any issues yet and for the moment it at least seems to have fixed the crashing problem🤞.

1 Like

Hi, I found a in blueprint workaround.

Get the “style” variable from the Editable Text Box and use SetMembersInEditableTextBoxStyle on it (connect to the “Struct Ref” input). When you select that node look in the details panel to expose every member of the style struct as a pin. With a breake node for your custom style variable you can feed every single member into the Set Members In … node.

1 Like

Wow, thanks for posting this! I’m gonna give it a shot right now.

Thank you Bob!

now it doesn’t crash! and it is nice.

But I’m experiencing a strange behaviour in my widget, still with Editable Text Box.

Let’s see if I’m the only one :frowning:

Basically if I call the “Set Members” node with the OnInitialized Event, it works fine.

but when I call that node later during the life of the widget, I see that the modification in the Style are applied, but the widget on screen doesn’t change at all.

I’m trying changing the font color, and in every way i try, the first time it works, but then it stop working!

Do you guys have similar behaviour?

Hi,
I don’t have any problems setting it later.
Can you try to recreate this behaviour in new project and post it here? It’s enough to pack just Config, Content directories and the *.uproject file in a zip file :wink: