Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 916120

Summary: media-libs/libsdl2-2.28.4: SDL_GameControllerOpen() on virtual controller: Unexpected controller element crc
Product: Gentoo Linux Reporter: Michał Górny <mgorny>
Component: Current packagesAssignee: Gentoo Games <games>
Status: RESOLVED INVALID    
Severity: normal CC: sam
Priority: Normal    
Version: unspecified   
Hardware: All   
OS: Linux   
See Also: https://github.com/libsdl-org/SDL/issues/8420
Whiteboard:
Package list:
Runtime testing required: ---

Description Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2023-10-22 14:02:08 UTC
Another problem found with PySDL2 test suite.

The reproducer:

```
#include <SDL.h>

int main() {
	SDL_Init(SDL_INIT_VIDEO|SDL_INIT_GAMECONTROLLER);
	int idx = SDL_JoystickAttachVirtual(SDL_JOYSTICK_TYPE_GAMECONTROLLER, 2, 4, 1);
	SDL_GameControllerOpen(idx);
	printf("%s\n", SDL_GetError());

	return 0;
}
```

$ gcc repro.c $(pkg-config --cflags --libs sdl2)
$ ./a.out 
Unexpected controller element crc
Comment 1 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2023-10-22 17:29:56 UTC
Per upstream this is working as intended, and pysdl2 was wrong.  FWICS pysdl2 was already fixed in git, so nothing to do here.
Comment 2 Larry the Git Cow gentoo-dev 2023-10-22 18:07:07 UTC
The bug has been referenced in the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=3825b89edbaf421648a3aacc290951fd030d7a07

commit 3825b89edbaf421648a3aacc290951fd030d7a07
Author:     Sam James <sam@gentoo.org>
AuthorDate: 2023-10-22 18:06:17 +0000
Commit:     Sam James <sam@gentoo.org>
CommitDate: 2023-10-22 18:06:17 +0000

    dev-python/PySDL2: update test skip comment
    
    Bug: https://bugs.gentoo.org/916118
    Bug: https://bugs.gentoo.org/916120
    Signed-off-by: Sam James <sam@gentoo.org>

 dev-python/PySDL2/PySDL2-0.9.16.ebuild | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)