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

GDScript parser bug: Trying to advance past the end of stream #63946

Closed
James103 opened this issue Aug 5, 2022 · 12 comments · Fixed by #73410
Closed

GDScript parser bug: Trying to advance past the end of stream #63946

James103 opened this issue Aug 5, 2022 · 12 comments · Fixed by #73410

Comments

@James103
Copy link

James103 commented Aug 5, 2022

Godot version

Since Godot Engine v4.0.alpha12.official
(Originally reported in Godot Engine v4.0.alpha13.official)

System information

Windows 10, 64-bit

Issue description

During parsing/autocomplete of the function name when typing func ..., the GDScript parser logs the following line:

GDScript parser bug: Trying to advance past the end of stream.

This line is logged once every time 300ms passes between consecutive characters typed while writing the function name in func ... at the end of the script. It is also logged when saving the script

This line is logged here:

ERR_FAIL_COND_V_MSG(current.type == GDScriptTokenizer::Token::TK_EOF, current, "GDScript parser bug: Trying to advance past the end of stream.");

Steps to reproduce

Create a new script and write the following code, making sure to type the last line slowly (pace one letter every ≈500ms):

extends Node

func abcdefg

Then, save the script and notice additional lines of GDScript parser bug: Trying to advance past the end of stream. in the log.

Alternatively, open the attached project below, during which the parser reports additional errors like above.

Minimal reproduction project

test.zip

@akien-mga akien-mga added this to the 4.0 milestone Aug 5, 2022
@Calinou
Copy link
Member

Calinou commented Aug 5, 2022

Can you reproduce this in earlier 4.0 alphas?

@James103
Copy link
Author

James103 commented Aug 5, 2022

Bisecting through the alpha releases:

  • Godot 4.0 alpha 10 does not have this issue.
  • Godot 4.0 alpha 11 does not have this issue.
  • Godot 4.0 alpha 12 does have this issue.

Therefore, one of the (most likely GDScript related) changes between alpha 11 and alpha 12 is causing this issue.

@CassianoBelniak
Copy link

CassianoBelniak commented Oct 12, 2022

Still happening on Godot 4.0 beta 2.
Same reproduction steps.

@CalebJohn
Copy link
Contributor

CalebJohn commented Nov 7, 2022

Using git bisect, I was able to narrow introduction of this issue to 4f36b2d (#62900).

@ngotoandev
Copy link

still seeing this error Godot 4.0 beta 8

@MeBadDev
Copy link

MeBadDev commented Jan 5, 2023

this is still in Godot 4.0 beta 10

@MeBadDev
Copy link

MeBadDev commented Jan 5, 2023

image
and i get those weird icons while reproducing

@laingawbl
Copy link

Still there in 4.0 beta 12.

@titusio
Copy link

titusio commented Jan 23, 2023

In 4.0 beta 14 as well.

@AnidemDex
Copy link

Still valid in v4.0.rc5.official [6296b46]

@pacomesoual
Copy link

Sill happening in 4.0 stable :
image

@akien-mga akien-mga changed the title 4.0 alpha 13: GDScript parser bug: Trying to advance past the end of stream GDScript parser bug: Trying to advance past the end of stream Mar 7, 2023
@chandujr
Copy link

chandujr commented Mar 7, 2023

The error went away after I switched to another script and made some changes and came back to the original script. I'm also in the 4.0 stable build.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Archived in project
Status: Todo
Development

Successfully merging a pull request may close this issue.