In my case it happened to be even worse: it’s Ubuntu version-specific! I have recurrent project I return to from time to time which worked well on Ubuntu 18.04, but after update to Ubuntu 20.04 turned to black screen. I stepped away from it for a while, coming back with Ubuntu 21.04 and it was working great again, which I assumed as “oh, they finally fixed SDL!”.
But today, returning again, but having Ubuntu 22.04, I faced black screen again! Spent many hours digging the problem and trying SDL samples to finally narrow it down to threads issues which I indeed experiencing. Now “I finally fixed it!” ^^
Would be nice if SDL just crashed if rendering functions being called from non-main threads.