Seems it happens just with some png files while other reliably load.
Wrote a small test application to outline the issue.
(code makes use of OpenMP and therefore require visual studio (2k5SP1) redist)
Sample pngs available too.
test-bad.png was created using XNView IIRC.
test-ok.png created by Ubuntu screen capture.
Code: Select all
gflpng.exe <numfiles <numthreads> <file> gflpng.exe 100 5 test-bad.png
AMD Athlon64 X2
Core 2 Duo
Both dual core systems fail >90% of all loads.
That single core system fails <10%.
Using only one thread is always successful.
JPEG, BMP readers seem to work always; other readers not tested.
There is still *some* code in the png implementation that is not thread-safe. That code is not always triggered.