Classes Implementing a trait throw errors from lines that don't exist
Maintainers usually reply within 1 day
A pull request for this has already been merged.
- #1566 by @DuBearte — merged
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 48/100
Research direction
Start with the attached minimal reproduction project and trace how trait methods map runtime errors to source locations in the engine. Reproduce the error in the debugger, then follow the relevant trait and error-reporting entry points to see why the reported line falls past the class script. Done when the debugger points to the trait line that caused the runtime error.
Written by the indexing model from the issue text.
Description
Tested versions
26.3
System information
GDScript
Issue description
When a class pulls in a trait and that trait causes a runtime error, the error is reported in the debugger as coming from a nonexistent line off the end of the class script. It somehow needs to be reported as caused by the trait in order to point to the line that actually caused the error.
Steps to reproduce
- Write a trait with a method that throws an error when called, such as calling a method on a null instance
- Write a class that uses the trait.
- Call the error method.
Alternatively, run the MRP and observe the error.
Minimal reproduction project (MRP)
- Dominant language
- C++
- Stars
- 6.1k
- Forks
- 337
- Avg merge
- 4d 5h
- Merged PRs (30d)
- 52
Getting set up
- No Dockerfile or Docker Compose file
- Has a pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from Redot-Engine/redot-engine
-
bug confirmed topic:3d topic:rendering
Difficulty 5/5 Over a week Newbie friendliness 35/100
Redot-Engine/redot-engine#1568 ·
Maintainers usually reply within 1 day
-
bug enhancement
Difficulty 3/5 1-2 days Newbie friendliness 57/100
Redot-Engine/redot-engine#1559 ·
Maintainers usually reply within 1 day
-
bug topic:3d topic:editor usability
Difficulty 3/5 1-2 days Newbie friendliness 48/100
Redot-Engine/redot-engine#1554 ·
Maintainers usually reply within 1 day
-
bug topic:animation
Difficulty 3/5 1-2 days Newbie friendliness 54/100
Redot-Engine/redot-engine#1552 · 3 comments ·
Maintainers usually reply within 1 day
-
AnimationTree does not respect AnimationPlayer's speed_scale or the AnimationClip's update modeOpenbug topic:animation
Difficulty 4/5 3-5 days Newbie friendliness 45/100
Redot-Engine/redot-engine#1551 ·
Maintainers usually reply within 1 day
All issues in Redot-Engine/redot-engine
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
cython/cython#8110 · 2 comments ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
ROCm/rocm-systems#14923 ·
Maintainers usually reply within 2 days
-
arrays asr pass bug ICE intrinsic medium priority
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
Maintainers usually reply within 1 day
-
Area: World-Readiness
Difficulty 1/5 Under an hour Newbie friendliness 90/100
microsoft/calculator#2522 ·
-
missing `catch.hpp`Open
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
microsoft/inflatelib#34 · 1 comment ·