I think I'm running into the same issue hinka is.
What I did to get this error is as follows:
1. I load the debug level and import a map png.
2. I add a unit to the map.
3. Save, and watch my terminal puke:
Saving D:/FEHacking/lex-talionis/Editor/../Data/LevelDEBUG/MapSprite.png (a 240x160 image)...
libpng error: profile 'sRGB': 2000000h: length does not match profile
Loading D:/FEHacking/lex-talionis/Editor/../Data/LevelDEBUG/MapSprite.png (a 0x0 image)...
Saved LevelDEBUG
QPainter::begin: Paint device returned engine == 0, type: 3
QPainter::end: Painter not active, aborted
QPainter::begin: Paint device returned engine == 0, type: 3
QPainter::end: Painter not active, aborted
QPainter::begin: Paint device returned engine == 0, type: 3
QPainter::end: Painter not active, aborted
QPainter::begin: Paint device returned engine == 0, type: 3
QPainter::end: Painter not active, aborted
QPainter::begin: Paint device returned engine == 0, type: 3
QPainter::end: Painter not active, aborted
QPainter::begin: Paint device returned engine == 0, type: 3
QPainter::end: Painter not active, aborted
For reference that map sprite I'm importing is the same png image that's on the GitLab wiki (fe8map1.png). It looks like a sRGB error causes the level's MapSprite to get overwritten with a 0x0 png (which explains why QPainter flipped its lid).
Here's my startup:
pygame 1.9.6
Hello from the pygame community. https://www.pygame.org/contribute.html
Debug: 1
ERROR! No words.txt file found in the data directory.
Version: v0.9.3.14
libpng warning: iCCP: known incorrect sRGB profile
libpng warning: sBIT: invalid
Setting Seed 0
A bunch of KeyErrors for other and enemy2 team map animations are printed (no idea if that's expected behavior or not), and after that is this:
Loading ..\Data\LevelDEBUG/MapSprite.png (a 0x0 image)...
Properties
Units
QPainter::begin: Paint device returned engine == 0, type: 3
QPainter::end: Painter not active, aborted
I'm almost positive that sRGB profile error is what's causing this. I wonder if it's because of a PyQt5 update. My PyQt5 is Version: 5.14.1, could that cause issues? Or is it something weirder?
Oh yeah and hi I like your engine/fangame.