Seems it happens just with some png files while other reliably load.
Wrote a small test application to outline the issue.
http://tn123.ath.cx/gfl/png/
(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.
Try: e.g.
Code: Select all
gflpng.exe <numfiles <numthreads> <file>
gflpng.exe 100 5 test-bad.png
AMD Athlon64 X2
Core 2 Duo
Pentium III
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.
Conclusion
---
There is still *some* code in the png implementation that is not thread-safe. That code is not always triggered.