Hi there @jorio
In the latest stable SDL2 version (2.0.16), some additional assertions were added, so the game presents some assertion failures on boot (which can block the computer if the game is run without a desktop system...)
Seems to be related to SDL_UpdateTexture()
, I have run GDB on the executable to help finding the issue:
Abort/Break/Retry/Ignore/AlwaysIgnore? [abriA] : ^C
Thread 1 "MightyMike" received signal SIGINT, Interrupt.
__GI___libc_read (nbytes=1024, buf=0x5555d26d60, fd=<optimized out>) at ../sysdeps/unix/sysv/linux/read.c:26
26 ../sysdeps/unix/sysv/linux/read.c: No such file or directory.
(gdb) bt
#0 __GI___libc_read (nbytes=1024, buf=0x5555d26d60, fd=<optimized out>) at ../sysdeps/unix/sysv/linux/read.c:26
#1 __GI___libc_read (fd=<optimized out>, buf=0x5555d26d60, nbytes=1024) at ../sysdeps/unix/sysv/linux/read.c:24
#2 0x0000007ff79fa5b8 in _IO_new_file_underflow (fp=0x7ff7af68d0 <_IO_2_1_stdin_>) at libioP.h:948
#3 0x0000007ff79fb6f0 in __GI__IO_default_uflow (fp=0x7ff7af68d0 <_IO_2_1_stdin_>) at libioP.h:948
#4 0x0000007ff79ede10 in __GI__IO_getline_info (fp=fp@entry=0x7ff7af68d0 <_IO_2_1_stdin_>, buf=buf@entry=0x7ffffff600 "", n=31,
delim=delim@entry=10, extract_delim=extract_delim@entry=1, eof=eof@entry=0x0) at iogetline.c:60
#5 0x0000007ff79edee8 in __GI__IO_getline (fp=fp@entry=0x7ff7af68d0 <_IO_2_1_stdin_>, buf=buf@entry=0x7ffffff600 "",
n=<optimized out>, delim=delim@entry=10, extract_delim=extract_delim@entry=1) at iogetline.c:34
#6 0x0000007ff79ecb44 in _IO_fgets (buf=0x7ffffff600 "", n=<optimized out>, fp=0x7ff7af68d0 <_IO_2_1_stdin_>) at iofgets.c:53
#7 0x0000007ff7df463c in SDL_PromptAssertion () from /usr/local/lib/libSDL2-2.0.so.0
#8 0x0000007ff7df48c0 in SDL_ReportAssertion_REAL () from /usr/local/lib/libSDL2-2.0.so.0
#9 0x0000007ff7e3de3c in SDL_UpdateTexture_REAL () from /usr/local/lib/libSDL2-2.0.so.0
#10 0x0000007ff7e14164 in SDL_UpdateTexture () from /usr/local/lib/libSDL2-2.0.so.0
#11 0x000000555556b118 in PresentIndexedFramebuffer () at /root/src/mightymike/src/Heart/Window.c:463
#12 0x0000005555569dd0 in MakeGameWindow () at /root/src/mightymike/src/Heart/Window.c:94
#13 0x000000555558629c in OnChangePlayfieldSize () at /root/src/mightymike/src/Playfield/Playfield.c:230
#14 0x0000005555571030 in ApplyPrefs () at /root/src/mightymike/src/Heart/SettingsScreen.c:1141
#15 0x000000555556eafc in GameMain () at /root/src/mightymike/src/Heart/Main.c:1371
#16 0x0000005555598470 in CommonMain (argc=1, argv=0x7ffffffaf8) at /root/src/mightymike/src/Main.cpp:118
#17 0x00000055555985a8 in main (argc=1, argv=0x7ffffffaf8) at /root/src/mightymike/src/Main.cpp:140
I must remark it won't happen with old SDL2 versions, which means that the issue was there, just being ignored.
The problem seems to be that the game is trying to update a NULL texture in
PresentIndexedFramebuffer()
:
463 SDL_UpdateTexture(gSDLTexture, NULL, gRGBAFramebuffer, VISIBLE_WIDTH*4);
(gdb) p gSDLTexture
$1 = (struct SDL_Texture *) 0x0