Bug#1025775: libsdl2 breaks cataclysm-dda autopkgtest in lxc: only bottom left corner appears in screenshot

Simon McVittie smcv at debian.org
Fri Dec 9 13:45:17 GMT 2022


Control: retitle -1 libsdl2 breaks cataclysm-dda autopkgtest in lxc: only bottom left corner appears in screenshot

On Thu, 08 Dec 2022 at 21:55:07 +0100, Paul Gevers wrote:
> With a recent upload of libsdl2 the autopkgtest of cataclysm-dda fails in
> testing when that autopkgtest is run with the binary packages of libsdl2
> from unstable. It passes when run with only packages from testing. In
> tabular form:
> 
>                        pass            fail
> libsdl2                from testing    2.26.0+dfsg-1
> cataclysm-dda          from testing    0.F-3-8
> all others             from testing    from testing

The test is to:

* run cataclysm-tiles in the background
* wait 15 seconds
* focus the cataclysm-tiles window
* take a screenshot
* use tesseract to do OCR on the window contents
* look for some specific strings in the window contents

This seems to be quite flaky regardless of SDL version: while trying to
reproduce the bug I've seen "New Game" OCR as "(NEWIGAME]", and "World"
OCR as "Morld" or "Hor 1d".

On ci.debian.net with the old SDL, it renders like this:
https://people.debian.org/~smcv/bug1025775/good.png
https://people.debian.org/~smcv/bug1025775/good.txt

On ci.debian.net with the new SDL, it renders like this:
https://people.debian.org/~smcv/bug1025775/bad.png
https://people.debian.org/~smcv/bug1025775/bad.txt

which seems to be the same as the bottom left 640x384 pixel region of
the good rendering?

I can reproduce this with a lxc container inside a bookworm VM:

    $ sudo autopkgtest-build-lxc debian bookworm amd64
    $ apt download libsdl2-2.0-0=2.26.0+dfsg-1
    $ rm -fr ~/artifacts; \
      autopkgtest \
          --no-built-binaries \
          --shell-fail \
          -o ~/artifacts \
          ~/libsdl2-2.0-0_2.26.0+dfsg-1_amd64.deb \
          . \
          -- lxc --sudo autopkgtest-bookworm-amd64

Adapting the test script to take a screenshot of the whole screen instead
of just the window, and use a white background instead of black, it looks
like the game is only rendering into a small region of the screen:
https://people.debian.org/~smcv/bug1025775/bad-screen.png

I *cannot* reproduce this interactively in a bookworm VM with the upgraded
libsdl2. I don't know why lxc is any different, but it seems that it is.
When I run

    $ rm -fr ~/artifacts; \
      mkdir ~/artifacts; \
      AUTOPKGTEST_ARTIFACTS=$HOME/artifacts timeout -v 5m xvfb-run debian/tests/test-tiles

in my VM, even with the upgraded SDL I get a rendering similar
to good.png, good.txt above. I was also unable to reproduce this
interactively in a podman container.

Please see
https://salsa.debian.org/smcv/cataclysm-dda-branches/-/tree/autopkgtest-misc
for some adjustments to the autopkgtest that might make it easier to debug.

    smcv



More information about the Pkg-sdl-maintainers mailing list