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

Using umlaute in function names breaks the .hex #173

Open
joernalraun opened this issue Apr 4, 2022 · 15 comments
Open

Using umlaute in function names breaks the .hex #173

joernalraun opened this issue Apr 4, 2022 · 15 comments

Comments

@joernalraun
Copy link
Collaborator

You can make use of Umlaute (such as ö, ä, ü, or even ß) in function names.
When saving a hex file from this and trying to open it, the browser window becomes unresponsive after a while. All changes (before it doesn't react anymore) are not saved to the file.

It would be good if certain letters could not be used (and/or a message appears when using them) in such instances.

@joernalraun joernalraun changed the title Using umlaute in function names crashes the .hex Using umlaute in function names breaks the .hex Apr 4, 2022
@Amerlander
Copy link
Collaborator

I can not reproduce it.

Can you provide a sample hex file and check if this also appears in Firefox and Chrome (I suppose you used safari)?

Does this also happen in https://makecode.microbit.org/#editor ?

@joernalraun
Copy link
Collaborator Author

joernalraun commented Apr 4, 2022

It has been the case on Windows 10 with Edge on several computers and is also the case on makecode.microbit.org (from what has been reported).

@Amerlander
Copy link
Collaborator

Well, can reproduce it now. The error message in Edge claims "Out of Memory".

  • Opening https://makecode.microbit.org/_VPoUAzAo1dRa in Edge, Vivaldi or Firefox on Windows 10 ( I didn't test other systems)
  • Click on "Edit"
  • Notice, that the Simulator is not loading
  • Wait, without any interaction:
    • Edge crashes after about 25 seconds
    • Vivaldi crashes after about 35 Seconds
    • Firefox does not seem to crash, but the simulator refuses to work

@pelikhan I guess this is something that has to be fixed in https://github.com/microsoft/pxt

@Amerlander
Copy link
Collaborator

A simpler version (less special characters) is loading the Simulator and seem to work: https://makecode.microbit.org/_2HcbJRbcdHya

@Amerlander
Copy link
Collaborator

Its working well in https://arcade.makecode.com/45552-86181-46605-09798, so I guess it is not a pxt thing, but something pxt-calliope and pxt-microbit having in common.

@elssner
Copy link

elssner commented Apr 10, 2022

This arcade example crashes, when you rename the function to Fußgänger-Ampel. Then go to Home, open the saved project again, change from blocks to javascript and back ... the browser will crash with out of memory.

@elssner
Copy link

elssner commented Apr 10, 2022

From the function name 'ß-A' the '-' is removed in javascript to 'ßA'. This '-' can not be restored to blocks when the name includes 'ß' and the project is re-opened. The function with this name must not be called, it must only exist.

@elssner
Copy link

elssner commented Apr 10, 2022

function ßA () {

}
game.splash("Start")

arcade-Screenshot

@ralf-krause
Copy link

Is the umlaut problem fixed in the current version of MakeCode?
I tested function names and variable names with German and some French umlauts. I tested the desktop browsers Firefox, Chrome, Chromium, Safari (on macOS) in their current versions. I also got no problems in the current Calliope App on iPadOS and Android.

Here is my test program https://makecode.calliope.cc/_2F62y97F4Yku

makecode-umlaute

@elssner
Copy link

elssner commented Jan 7, 2023

In the current version is no umlaut problem, when I write new code.

When I import the old hex-File with this problem, the Edge Browser crashes again.

mini-Ampel5.zip

@ralf-krause
Copy link

What happens when you import my linked project https://makecode.calliope.cc/_2F62y97F4Yku

@elssner
Copy link

elssner commented Jan 7, 2023

When I click the link Code bearbeiten it opens in MakeCode.

(My old hex-File mini-Ampel5.hex was saved on 21.03.2022.)

@ralf-krause
Copy link

Is it possible to edit the linked test project?
Can you use the variable to set a new value?
Can you upload the hex file to the Calliope?
Does the Calliope show this value on the 5x5 display?

@elssner
Copy link

elssner commented Jan 8, 2023

I can edit your project in blocks and in javascript, change the values, upload an see it on the display. It works also whe I rename the function with spaces: usingÜ and ÄinFunctionName

@MKleinSB
Copy link

MKleinSB commented Jan 8, 2023

@elssner makecode.calliope works fine, but you use arcade.makecode.com
so use https://github.com/microsoft/pxt-arcade/issues for issues.

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

No branches or pull requests

5 participants