openjdk/jdk · warning
libpng warning: %s
Error message
libpng warning: %s
What it means
libpng's default warning handler inside the JDK splashscreen: prints 'libpng warning: <message>' for conditions libpng considers non-fatal (e.g. a chunk with bad CRC that will be skipped, extra zero bytes at end of file, sRGB profile mismatches). Decoding continues; the longjmp is only taken by the error path, not here.
Source
Thrown at src/java.desktop/share/native/libsplashscreen/libpng/pngerror.c:732
* choice is to terminate the whole process (or maybe the thread); to do
* this the ANSI-C abort() function is used unless a different method is
* implemented by overriding the default configuration setting for
* PNG_ABORT().
*/
PNG_ABORT();
}
#ifdef PNG_WARNINGS_SUPPORTED
/* This function is called when there is a warning, but the library thinks
* it can continue anyway. Replacement functions don't have to do anything
* here if you don't want them to. In the default configuration, png_ptr is
* not used, but it is passed in case it may be useful.
*/
static void /* PRIVATE */
png_default_warning(png_const_structrp png_ptr, png_const_charp warning_message)
{
#ifdef PNG_CONSOLE_IO_SUPPORTED
fprintf(stderr, "libpng warning: %s", warning_message);
fprintf(stderr, PNG_STRING_NEWLINE);
#else
PNG_UNUSED(warning_message) /* Make compiler happy */
#endif
PNG_UNUSED(png_ptr) /* Make compiler happy */
}
#endif /* WARNINGS */
/* This function is called when the application wants to use another method
* of handling errors and warnings. Note that the error function MUST NOT
* return to the calling routine or serious problems will occur. The return
* method used in the default routine calls longjmp(png_ptr->jmp_buf_ptr, 1)
*/
void PNGAPI
png_set_error_fn(png_structrp png_ptr, png_voidp error_ptr,
png_error_ptr error_fn, png_error_ptr warning_fn)
{
if (png_ptr == NULL)View on GitHub (pinned to 88dfb74bbe)
Solutions
- Run 'pngcheck -v image.png' and fix the specific chunk it flags
- Strip ancillary chunks: 'pngcrush -brute in.png out.png' or 'optipng -strip all' produces a clean file
- Re-export from the original source rather than round-tripping through editors that mutate profiles
- Ignore it — warnings do not stop splash rendering
Defensive patterns
Strategy: validation
Validate before calling
// CI step: fail on any pngcheck warning // pngcheck -vw splash.png || echo "fix warnings before release"
Prevention
- Strip ancillary chunks with pngcrush/optipng when finalizing assets
- Re-export from the original artwork rather than round-tripping through many tools
- Treat warnings as build hygiene, not runtime failures
When it happens
Trigger: Loading a splash PNG that has a recoverable defect: incorrect but ignorable chunk CRC, trailing garbage after IEND, an iCCP/sRGB chunk with an odd profile, or an interlaced file with benign issues. Each such chunk makes libpng emit this warning during splash image parsing.
Common situations: Images passed through multiple tools that append metadata; PNGs saved by older Photoshop/GIMP with non-standard iCCP profiles; files with trailing newline bytes appended by text-mode transfers. Cosmetic: the splash still renders.
Related errors
- libpng error: %s
- %s\n
- Could not create SplashScreen thread, error number:%d\n
- Error: Out of memory in ADLC\n
- JVM caught ASAN Error
AI-assisted analysis of openjdk/jdk@88dfb74bbe (2026-08-14).
Data as JSON: /api/errors/3d72bbe271992bf0.
Report an issue: GitHub.