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

ebiten: test fails with Go 1.22 on 32bit Windows #2867

Closed
1 of 11 tasks
hajimehoshi opened this issue Dec 20, 2023 · 6 comments
Closed
1 of 11 tasks

ebiten: test fails with Go 1.22 on 32bit Windows #2867

hajimehoshi opened this issue Dec 20, 2023 · 6 comments

Comments

@hajimehoshi
Copy link
Owner

Ebitengine Version

fa483ad

Operating System

  • Windows
  • macOS
  • Linux
  • FreeBSD
  • OpenBSD
  • Android
  • iOS
  • Nintendo Switch
  • PlayStation 5
  • Xbox
  • Web Browsers

Go Version (go version)

1.22-rc.1

What steps will reproduce the problem?

Run go test .

What is the expected result?

The tests pass.

What happens instead?

The test fails.

-test.shuffle 1703091731083356900
=== RUN   TestImageNewImageFromEbitenImage
    image_test.go:3172: img1.At(0, 0): got: {0 0 0 0}, want: {4 4 0 255}
    image_test.go:3172: img1.At(1, 0): got: {0 0 0 0}, want: {5 4 0 255}
    image_test.go:3172: img1.At(2, 0): got: {0 0 0 0}, want: {6 4 0 255}
    image_test.go:3172: img1.At(3, 0): got: {0 0 0 0}, want: {7 4 0 255}
    image_test.go:3172: img1.At(4, 0): got: {0 0 0 0}, want: {8 4 0 255}
    image_test.go:3172: img1.At(5, 0): got: {0 0 0 0}, want: {9 4 0 255}
    image_test.go:3172: img1.At(6, 0): got: {0 0 0 0}, want: {10 4 0 255}
    image_test.go:3172: img1.At(7, 0): got: {0 0 0 0}, want: {11 4 0 255}
    image_test.go:3172: img1.At(0, 1): got: {0 0 0 0}, want: {4 5 0 255}
    image_test.go:3172: img1.At(1, 1): got: {0 0 0 0}, want: {5 5 0 255}
    image_test.go:3172: img1.At(2, 1): got: {0 0 0 0}, want: {6 5 0 255}
    image_test.go:3172: img1.At(3, 1): got: {0 0 0 0}, want: {7 5 0 255}
...

https://github.com/hajimehoshi/ebiten/actions/runs/7278421007/job/19832581602

Anything else you feel useful to add?

As this is an RC version, there might be an issue in Go. Let's investigate this anyway...

@hajimehoshi hajimehoshi added this to the v2.7.0 milestone Dec 20, 2023
hajimehoshi added a commit that referenced this issue Dec 20, 2023
This reverts commit fa483ad.

Reason: tests fail on 32bit Windows

Updates #2867
@hajimehoshi
Copy link
Owner Author

@hajimehoshi
Copy link
Owner Author

The test passed on my local (Parallels) machine

> $env:GOARCH = "386"
> go1.22rc1 test . -short
ok      github.com/hajimehoshi/ebiten/v2        11.585s

@hajimehoshi
Copy link
Owner Author

hajimehoshi commented Jan 25, 2024

This seems to happen with DirectX 12. I could reproduce this on my local machine.

$env:GOARCH="386"
$env:EBITENGINE_DIRECTX="version=12"
go1.22rc2.exe test . -run=^TestImageNewImageFromEbitenImage$ -count=1

@hajimehoshi
Copy link
Owner Author

hajimehoshi commented Jan 25, 2024

One liner not to pollute global environments:

& (Get-Process -Id $PID).Path { $env:GOARCH="386"; $env:EBITENGINE_DIRECTX="version=12"; go1.22rc2.exe test . -run=^TestImageNewImageFromEbitenImage$ -count=1 }

I could reproduce this on Intel Windows, but not on Arm Windows.

@hajimehoshi
Copy link
Owner Author

I'll create a debug mode to trace all the DirectX (12) calls

@hajimehoshi
Copy link
Owner Author

hajimehoshi commented Jan 25, 2024

Note to myself: execute a binary to draw an image in the same way as TestImageNewImageFromEbitenImage but without reading pixels.

Also, let's try another version of Ebitengine like v2.6.

hajimehoshi added a commit that referenced this issue Jan 27, 2024
…irectX 12 didn't work well

Apparently, a pseudo padding was needed for D3D12_RESOURCE_DESC,
but this is still mysterious.

This change also add Go 1.22 to the GitHub Actions.

Closes #2867
@hajimehoshi hajimehoshi modified the milestones: v2.7.0, v2.6.5 Jan 27, 2024
hajimehoshi added a commit that referenced this issue Jan 27, 2024
…irectX 12 didn't work well

Apparently, a pseudo padding was needed for D3D12_RESOURCE_DESC,
but this is still mysterious.

This change also add Go 1.22 to the GitHub Actions.

Closes #2867
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant