Cannot open editor of specific game

Describe the bug:
Cannot open editor of game “Spellfire”. It is new, not yet finished game.

How do you cause this bug?

  • Go to Create
  • Select game Spellfire
  • After some time Stadia shows “your game had a glitch”

It is not happening to other games so far as I can see.

Which platform: Stadia

Which input: keyboard + mouse

Your Crayta username: strowk

Game seen in (including “Hub” or “Editor for XYZ”): Editor of Spellfire

How regularly do you see this? (E.g. 2/3 times - please try 3 times if possible): 4 of 4

Time + date seen: 22-12-2021 18:50 CEST

Version number (found in Help tab in Settings): 0.e3.63.114111

Hi there @str !

Thank you for bringing this to our attention. :slight_smile:
I’ve entered a ticket for your issue and our team will investigate the issue further.

Hey there @str,

I do apologize for any inconvenience this may have caused.

After further investigation it seems that:

The source editor is struggling with a single line in SF_PointerWidget that’s 119,000 characters long.
We recommend rolling back to a previous version of the game that doesn’t have this in it, and using shorter lines until some optimizations are done. :slight_smile:

Huh, it worked fine after I pasted the line in. Editor worked ok and preview had shown me what I intended to see (it was some SVG in windget). I guess that previous version is pretty much blank, so probably I should be creating new one.

I still believe that this is a bug when editor does allow to enter the “too long line”, but then does not allow to open game after some time later. Would it be better to add a limitation while that line being entered rather that crashing afterwards? Otherwise some other changes made at a later point would have to be lost too with the recommended rollback approach…

The bug occurs when you try to open a script with a lot of characters. Keeping the script open causes no issues, but as soon as it’s closed, it will keep crashing your game whenever the game tries to load it. I think 3 lines with 61k characters in each (I’m not sure on the third line) should work, but i recommend splitting the data or preferably compressing it as much as possible (flattening tables/objects, converting numbers which occur a lot into a local variable, multiplying and rounding numbers to get rid of decimal points, converting numbers into characters, converting progressively increasing numbers into relative ones, etc)