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

GD-494: Discover test shows an error when the test root folder is set to empty #494

Closed
voithos opened this issue Jun 6, 2024 · 5 comments · Fixed by #496
Closed

GD-494: Discover test shows an error when the test root folder is set to empty #494

voithos opened this issue Jun 6, 2024 · 5 comments · Fixed by #496
Assignees
Labels
bug Something isn't working UI
Milestone

Comments

@voithos
Copy link

voithos commented Jun 6, 2024

The used GdUnit4 version

4.3.1 (Latest Release)

The used Godot version

v4.2.2.stable.official

Operating System

Windows 11

Describe the bug

After upgrading to 4.3.1 from 4.2.5, I started seeing this error in the output log whenever I run tests:

  ./core/templates/cowdata.h:167 - Index p_index = -1 is out of bounds (size() = 0).

It seems to get printed once per executed GdUnitTestSuite (so if I run only one of the test suites, it only gets printed once). It doesn't seem to affect test success, so only appears to be noise.

Steps to Reproduce

No response

Minimal reproduction project

No response

@voithos voithos added the bug Something isn't working label Jun 6, 2024
@MikeSchulze
Copy link
Owner

These sounds link a .godot cache issue, can you please do the following.

  • close the editor
  • delete the .godot folder
  • run Godot --import from console or start the Godot editor two times to ensure the cache is rebuilt
  • run your tests

@MikeSchulze MikeSchulze added the infos requested Needs additional infos to reproduce label Jun 6, 2024
@MikeSchulze MikeSchulze removed the bug Something isn't working label Jun 6, 2024
@MikeSchulze MikeSchulze changed the title GD-XXX: index -1 error in gdunit4 4.3.1 GD-494: index -1 error in gdunit4 4.3.1 Jun 6, 2024
@MikeSchulze MikeSchulze changed the title GD-494: index -1 error in gdunit4 4.3.1 GD-494: Index p_index = -1 is out of bounds error in gdunit4 4.3.1 when running tests Jun 6, 2024
@voithos
Copy link
Author

voithos commented Jun 7, 2024

Unfortunately, that didn't seem to do it. :( Still get the same exact errors.

@MikeSchulze
Copy link
Owner

MikeSchulze commented Jun 7, 2024

I'm not able to reproduce.
image

Can you give me an example to reproduce, please.
Can you please attach the Godot log of your test session?

@voithos
Copy link
Author

voithos commented Jun 7, 2024

I tried creating an example project + test like you, and got an even weirder error... Godot can't even find the test unless I rename and/or re-save the .gd file. Here's the log:

Godot Engine v4.2.2.stable.official.15073afe3 - https://godotengine.org
Vulkan API 1.3.224 - Forward+ - Using Vulkan Device #0: NVIDIA - NVIDIA GeForce RTX 4090
 
TCP Client: wait to connect ..
TCP Client: Connected to Server: -9223370202249365504
Scan for test suites.
Scanning for test suites in: res://addons
Scanning for test suites in: res://addons/gdUnit4
  core/variant/variant_utility.cpp:1091 - Internal Error: Can't find test suite example_test
  core/variant/variant_utility.cpp:1091 - Internal Error: Can't find test case example_test:test_one
Scanning for test suites in: res://test
Scanning of 1 test suites took 52ms
  core/variant/variant_utility.cpp:1091 - Internal Error: Can't find test case example_test:test_one
  core/variant/variant_utility.cpp:1091 - Internal Error: Can't find test suite example_test
--- Debugging process stopped ---
Running test discovery ..
  ./core/templates/cowdata.h:167 - Index p_index = -1 is out of bounds (size() = 0).
Scanning for test suites in: res://addons
Scanning for test suites in: res://addons/gdUnit4
Scanning for test suites in: res://test
1 test suites discovered.

Here's the example I was trying:
tempgodot.zip

Godot system info:

Godot v4.2.2.stable - Windows 10.0.22631 - Vulkan (Forward+) - dedicated NVIDIA GeForce RTX 4090 (NVIDIA; 31.0.15.2849) - 13th Gen Intel(R) Core(TM) i9-13900K (32 Threads)

@MikeSchulze
Copy link
Owner

Ok I see the error now, it occurs when setting the test root folder empty
image

Running test discovery ..
  ./core/templates/cowdata.h:167 - Index p_index = -1 is out of bounds (size() = 0).
Scanning for test suites in: res://addons
Scanning for test suites in: res://addons/gdUnit4
Scanning for test suites in: res://test
1 test suites discovered.

@MikeSchulze MikeSchulze changed the title GD-494: Index p_index = -1 is out of bounds error in gdunit4 4.3.1 when running tests GD-494: Discover test shows an error when the test root folder is set to empty Jun 7, 2024
@MikeSchulze MikeSchulze added bug Something isn't working and removed infos requested Needs additional infos to reproduce labels Jun 7, 2024
@MikeSchulze MikeSchulze added this to the v4.3.2 milestone Jun 7, 2024
@MikeSchulze MikeSchulze moved this to In Progress in GdUnit4 Jun 7, 2024
@MikeSchulze MikeSchulze added the UI label Jun 7, 2024
@github-project-automation github-project-automation bot moved this from In Progress to Done in GdUnit4 Jun 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working UI
Projects
Status: Done
Development

Successfully merging a pull request may close this issue.

2 participants