[SOLVED] Yarn Dialogue System fails to parse json file?

Hi! Thought this was too detailed for the discord, so here we go.
The game crashes upon launch (tested by my “Esc to close” not working). This happens when changing Text or BBText to display DialogueTree::LineText() or ClippedLineText().
The important info:
Here’s the developer console log of original project, isolated scene/event sheet/dialogue sheet (new project), and error opening the dialogue demo project.

(it’s stiched together images due to new user limitation; the final one about error message is attempt to open the dialogue demo)
Using DialogueTree::BranchText() turns the text blank (similiar to displaying nonexistant variable) but the game runs.
I have Japanese locale and keyboard set to default (Half-width Alphanumeric).
Other stuff:
The example project runs fine, using Mozilla 72. Does the browser/desktop version have differences that could cause this?
Debugging is enabled, I enabled it by accident and not sure how to turn it off (IIRC it always turns itself off unless one runs the scene using the bug icon)
Finally, navigator.userAgent of the crashed game (the new project with 1 event): “Mozilla/5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) GDevelop5/5.0.0-beta88 Chrome/66.0.3359.181 Electron/3.0.9 Safari/537.36”

Overall, my guess is something with the .json file, and my Japanese locale/keyboard settings. I’ll try changing those to US locale & keyboard later, and post any progress.
Feel free to ask anything else you need, thanks for reading the long post.

edit 5/2/20: Nope that didn’t fix it. Same issue & error pattern.
Time to figure out how to make a dialogue system…

edit 13/2/20: Finally displayed my own dialogue in my project. All I needed was 3 serparate events, it’s true, they should not be done all at once (atleast until Yarn allows it). Phew! (The picture is more for my own reference)

Btw everyone, thanks for contributing to this bug report in some way, and definitely blurymind for doing the code. Thank you again!

Have you seen if exporting to Windows fixes the issue? Maybe it’s something weird with browser incompatibility?

@blurymind users need help with Yarn :pray:

Thanks for the reply.
Nope, it’s stuck at loading the desktop game. I don’t know how to get error logs from it since Ctrl+Shift+I doesn’t work. Is there another way to do so?

I also remade the one-event example on an older laptop running Win 7 (7601), but same stuff as the pic here both on preview and export (although it doesn’t even show GDevelop logo, just a black screen). I’ll see if Win 10 makes a difference a while after I post this.
Should clarify when I meant “opening example project” or “dialogue demo” above, I mean the one at the wiki, with the platforming character, with the ant NPC.
P/S: I’m available to troubleshoot the problem outside the forum, if it’s needed. I understand an extension this ambitious needs more time before it’s perfect! Or that it’s something really specific to my computers…
Edit: Ran the preview and exported game(s) on Win 10 using dualboot - no luck!
In the slim chance it helps, here’s my System Information:
(The intergrated graphics card is comparable to an Intel HD Graphics series)

Interesting… Can you send the faulty project to blurymind@gmail.com ? Or send me just the yarn json file you have?

If both yarn and the yarn runtime refuse to open your json file it is likely that it is somehow corrupt. Some data in it is breaking things

Sure, I’ve sent it from an elk[something]@gmail.com. Just in case you didn’t check yet

I will have a look tonight.

Please use github to report any editor or game crashing issues like this one

Also always attach a zip project when possible - by drag and dropping it into the text area

Right, so my guess is that your game crashes because you are doing everything at the beginning of the scene. Also you are reading from yarn parser without checking if it is running or it is of text type.

I submited a fix to gdevelop to stop it from crashing, but if you want this to work, I suggest that you look more carefully at the provided example project. If you skip some steps, it will not work properly.

My fix prevents it from crashing

1 Like

submitted fix here

1 Like

a limitation of the extension is that you cant start read dialogue at the beginning of a scene. You only load data at the beginning!

Thanks for the reply!
I’ve tried loading a dialogue branch and waiting a few seconds before displaying the text, but to no avail.

I’ll look at the dialogue tutorial again later - somehow, I haven’t grasped the logic of it yet. (specifically, which is “Branch” in the Yarn Editor? Would it be “Start2” or “Start”? Although I’ve tried both)
If you’re so kind to tell me what events/code I need to change in my picture(s) to display the single Empty Text dialogue, that’d be great too. Alternatively, there seems to be some videos about Yarn Editor on YouTube that seems useful, so I’ll look at them when I have the time.

I’ll keep GitHub usage in mind for next bug report (and attach project files there). When I get it to work will reply again if neccesary.

I submitted a fix to my pr to allow loading everything at the beginning of scene.

On the title, its loading them by the title field.
If you attach the zipped project of the above screenshot as a comment to the thread here:

I will have a look.

When you post screenshots its really impossible for me to say why it doesnt work because I cant know whats inside your yarn file

Looking at your screenshot, the title field says “Start”, not “Start2”, so in the event sheet you need to start the dialogue from “Start”, as “Start2” node doesnt exist- nothing will happen

1 Like

So can you re-test this and confirm if fixed? :slight_smile: We need to mark this issue as solved when fixed

Thanks for your interest! But, no, the crash still occurs with the same events.
Note that GDevelop has not updated yet, so your code fixes may not be applied until it does update to beta89? (Trying to update tells me beta88 is the latest version)

The crash log, if you want to compare if it, indeed, has updated the plugin…

Other than that, yes, my current project is now properly handling Yarn things.

The fix is in release 89, which just came out

please download and re-test :slight_smile:

1 Like

I’ve downloaded it, and this has been fixed now. Thank you! (Edited topic name)


I made a super simple Yarn tutorial in case anyone was stuck (like I was!) Hope it help beginners like me:

Also I have example code if anyone want it!

1 Like

Please share the yarn json file