godotengine / godot-vscode-plugin

Godot development tools for VSCode
MIT License
1.48k stars 148 forks source link

Crashes occur when trying to print non-English characters or view them in the watcher. #524

Closed rkxhs02 closed 5 months ago

rkxhs02 commented 8 months ago

Godot version

4.13 stable

VS Code version

1.84.0

Godot Tools VS Code extension version

1.3.1

System information

window 10

Issue description

In Godot 4.0, while debugging, if you print a language other than English or if a string variable contains characters from a non-English language, the game instance crashes and terminates.

Steps to reproduce

print("한글")

DaelonSuzuka commented 8 months ago

This seems to already work correctly using the upcoming 1.4.0 version of the Extension. There are a lot of improvements to the debugger in general, so it's possible I fixed this by accident. It's also possible that the problem is with Godot 4.1.3, and has been fixed in the version of 4.2beta3 that I'm running in this screenshot.

image

Code_qMEqHUrdrf

rkxhs02 commented 8 months ago

error I've tested with the master branch of godot-tools, the latest version of vscode, and godot version 4.2, but the same error still occurs. It seems to be because the json "}" is not closed, but I'm not sure exactly what the cause is.

DaelonSuzuka commented 8 months ago

The majority of the debugger changes aren't in master, they're in #452.

DaelonSuzuka commented 7 months ago

The debugger changes from #452 have been merged into master by now. I suspect that the original issue here was caused by the old debugger writing the game's stdout to an output channel instead of the debug console where it belongs.

The new debugger sends prints to the correct system, which can correctly handle all the unicode I've tested it with.

This bug should be fixed in the next release.

Kolgolar commented 6 months ago

I have built the plugin from the current master branch, but the game instance still crashes right before printing non-English characters.

DaelonSuzuka commented 6 months ago

@Kolgolar Do you plan to share the non-English characters you're trying to print(or literally any other details), so I can try to reproduce your issue?

Kolgolar commented 6 months ago

@DaelonSuzuka, yep, for example: print("Тест")

DaelonSuzuka commented 6 months ago

Looks right to me:

image

image

I have built the plugin from the current master branch

Did you build the plugin, and then install the resulting .vsix file?

Kolgolar commented 6 months ago

@DaelonSuzuka Turns out, I forgot to recreate my launch.json file. Now everything works just fine, thank you for the help!

DaelonSuzuka commented 6 months ago

Awesome! I'm glad there wasn't actually a problem.