Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Text field with unsupported character makes the editor crash #1296

Open
Ascor8522 opened this issue Oct 24, 2020 · 3 comments
Open

Text field with unsupported character makes the editor crash #1296

Ascor8522 opened this issue Oct 24, 2020 · 3 comments

Comments

@Ascor8522
Copy link

Ascor8522 commented Oct 24, 2020

Noticed 3 weird behaviours, and they are all linked together.

Expected Behavior

The editor should display the default "unsupported" character (some kind of rectangle) when a character is not supported and the editor shouldn't crash.

Actual Behavior

The editor displays the default character when editing the text.
When exiting the text tool, the editor crashes.
When the editor reloads, the text tool is unusable.

Steps to Reproduce

Open the Scratch project editor.
Go to the paint editor (sprite or stage, doesn't matter).

1st bug:
Select the text tool.
Click on the canvas, just like you would, to add text.
Enter an unsupported character (on Windows) by pressing the Alt key + entering a number (I'm using the keypad).
Sometimes, the "unsupported" character is displayed properly, and sometimes it isn't. idk why.
Don't exit the text tool yet.
If the character is displayed propery, delete the text field, click the Scratch logo to know the Scratcn version, and repeat the instructions.
I've only tried this with the sans serif font, which is the default font of the paint editor in my language.
So somehow, by clicking the Scratch button, some characters that were disdplaying correctly are now not displaying correctly anymore.

2nd bug
If the unsupported character is displayed as a "rectangle", you can continue and everything is fine (other than the character not being displayed properly).
Exit the text tool (by selecting another tool or creating a new text field somewhere else)

Case 2A
The paint editor crashes.

Case 2B
The paint editor doesn't crash, but is in a weird state.
The checked background is gone, no background borders, etc...

3rd bug
If the editor crashes, you can reload the paint editor.
The whole editor reloads.
Go to the paint editor again.
Try to use the text tool normally.
You can't enter text.
If you can, try reproducing the bug n°2 until the bug happens.
If you still can't reproduce this, try writing supported characters before entering the unsupported character, like wrtiting "a�".

Operating System and Browser

Microsoft Windows [version 10.0.19042.608]
Scratch Desktop 1.17.1

@BryceLTaylor
Copy link
Contributor

@Ascor8522 can you give some specific examples of unsupported characters? If different characters give slightly different results can you specify those differences?

@BryceLTaylor
Copy link
Contributor

@Ascor8522 Also, is it possible to save a project in this state, and if so, can you link to a project that is broken in this way?

@Ascor8522
Copy link
Author

can you give some specific examples of unsupported characters? If different characters give slightly different results can you specify those differences?

As I wrote, I'm entering a character using the "Alt" key and a number. For example: Alt + 26, to create an arrow pointing to the right.

Enter an unsupported character (on Windows) by pressing the Alt key + entering a number (I'm using the keypad).

Sometimes the character is displayed correctly and sometimes it isn't. I didn't find any logic in this behaviour, however doing "weird" actions, like clicking the Scratch logo, leads to the character not being displayed correctly.
Displayed correctly:
Displayed correctly
Same character displayed uncorrectly:
Displayed uncorrectly


Also, is it possible to save a project in this state, and if so, can you link to a project that is broken in this way?

Sorry, but it's not possible. As soon as you exit the text tool, the paint editor instantly crashes.
The costume is not saved. The saved project doesn't contain the costume with the text field.

Exit the text tool (by selecting another tool or creating a new text field somewhere else)
If the editor crashes, you can reload the paint editor.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants