Description
Tested versions
- Reproducible in
4.0-stable
,4.3-stable
and the recent4.4.1-stable
(must be an old issue) - Reproducible in
4.5-dev4
- Not reproducible with
dev_build=yes
Tested on Linux and macOS.
System information
Godot v4.5.dev4 - Arch Linux #1 SMP PREEMPT_DYNAMIC Fri, 02 May 2025 06:44:33 +0000 on Wayland - Wayland display driver, Multi-window, 2 monitors - Vulkan (Forward+) - dedicated NVIDIA GeForce RTX 3060 Laptop GPU - 11th Gen Intel(R) Core(TM) i7-11800H @ 2.30GHz (16 threads)
Issue description
GDScript stack traces involving coroutines do not report proper line numbers:

f1, f2, f3 are coroutines.
Originally posted by @limbonaut in #91006 (review)
This is unrelated to the script backtrace PR, as I can reproduce it on stable versions as well:

Steps to reproduce
MRP provided. Run a project with the following script to trigger an error and check the Debugger -> Stack Trace
:
extends Node2D
func _ready() -> void:
await f1()
var a
a.hello() # trigger nullref access error
func f1():
print("starting f1")
await f2()
print("finishing f1")
func f2():
print("starting f2")
await f3()
print("finishing f2")
func f3():
print("starting f3")
await get_tree().process_frame
print("finishing f3")
You should see something similar in the editor:

Note the line numbers in the stack trace.
UPDATE:
Make sure you are building with dev_build=no
. Apparently it's not reproducible with dev_build=yes
.
Minimal reproduction project (MRP)
Metadata
Metadata
Assignees
Type
Projects
Status