{"record":{"id":"3d72bbe271992bf0","repo":"openjdk/jdk","slug":"libpng-warning-s","errorCode":null,"errorMessage":"libpng warning: %s","messagePattern":"libpng warning: (.+?)","errorType":"console","errorClass":null,"httpStatus":null,"severity":"warning","filePath":"src/java.desktop/share/native/libsplashscreen/libpng/pngerror.c","lineNumber":732,"sourceCode":"    * choice is to terminate the whole process (or maybe the thread); to do\n    * this the ANSI-C abort() function is used unless a different method is\n    * implemented by overriding the default configuration setting for\n    * PNG_ABORT().\n    */\n   PNG_ABORT();\n}\n\n#ifdef PNG_WARNINGS_SUPPORTED\n/* This function is called when there is a warning, but the library thinks\n * it can continue anyway.  Replacement functions don't have to do anything\n * here if you don't want them to.  In the default configuration, png_ptr is\n * not used, but it is passed in case it may be useful.\n */\nstatic void /* PRIVATE */\npng_default_warning(png_const_structrp png_ptr, png_const_charp warning_message)\n{\n#ifdef PNG_CONSOLE_IO_SUPPORTED\n   fprintf(stderr, \"libpng warning: %s\", warning_message);\n   fprintf(stderr, PNG_STRING_NEWLINE);\n#else\n   PNG_UNUSED(warning_message) /* Make compiler happy */\n#endif\n   PNG_UNUSED(png_ptr) /* Make compiler happy */\n}\n#endif /* WARNINGS */\n\n/* This function is called when the application wants to use another method\n * of handling errors and warnings.  Note that the error function MUST NOT\n * return to the calling routine or serious problems will occur.  The return\n * method used in the default routine calls longjmp(png_ptr->jmp_buf_ptr, 1)\n */\nvoid PNGAPI\npng_set_error_fn(png_structrp png_ptr, png_voidp error_ptr,\n    png_error_ptr error_fn, png_error_ptr warning_fn)\n{\n   if (png_ptr == NULL)","sourceCodeStart":714,"sourceCodeEnd":750,"githubUrl":"https://github.com/openjdk/jdk/blob/88dfb74bbeefcf2b0aa11835183bcd949998fc8f/src/java.desktop/share/native/libsplashscreen/libpng/pngerror.c#L714-L750","documentation":"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.","triggerScenarios":"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.","commonSituations":"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.","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"],"exampleFix":null,"handlingStrategy":"validation","validationCode":"// CI step: fail on any pngcheck warning\n// pngcheck -vw splash.png || echo \"fix warnings before release\"","typeGuard":null,"tryCatchPattern":null,"preventionTips":["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"],"tags":["png","libpng","splashscreen","image-decoding","native"],"backgroundTag":null,"analyzedSha":"88dfb74bbeefcf2b0aa11835183bcd949998fc8f","analyzedAt":"2026-08-14T11:45:09.665Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}