{"record":{"id":"df075151c1eccefb","repo":"DrKLO/Telegram","slug":"s-sorry-in-memory-destination-manager-was-not-c","errorCode":null,"errorMessage":"%s: sorry, in-memory destination manager was not compiled in\n","messagePattern":"(.+?): sorry, in-memory destination manager was not compiled in\n","errorType":"console","errorClass":null,"httpStatus":null,"severity":"error","filePath":"TMessagesProj/jni/mozjpeg/cjpeg.c","lineNumber":443,"sourceCode":"      outfilename = argv[argn]; /* save it away for later use */\n\n    } else if (keymatch(arg, \"progressive\", 1)) {\n      /* Select simple progressive mode. */\n#ifdef C_PROGRESSIVE_SUPPORTED\n      simple_progressive = TRUE;\n      /* We must postpone execution until num_components is known. */\n#else\n      fprintf(stderr, \"%s: sorry, progressive output was not compiled in\\n\",\n              progname);\n      exit(EXIT_FAILURE);\n#endif\n\n    } else if (keymatch(arg, \"memdst\", 2)) {\n      /* Use in-memory destination manager */\n#if JPEG_LIB_VERSION >= 80 || defined(MEM_SRCDST_SUPPORTED)\n      memdst = TRUE;\n#else\n      fprintf(stderr, \"%s: sorry, in-memory destination manager was not compiled in\\n\",\n              progname);\n      exit(EXIT_FAILURE);\n#endif\n\n    } else if (keymatch(arg, \"quality\", 1)) {\n      /* Quality ratings (quantization table scaling factors). */\n      if (++argn >= argc) {      /* advance to next argument */\n        fprintf(stderr, \"%s: missing argument for quality\\n\", progname);\n        usage();\n      }\n      qualityarg = argv[argn];\n\n    } else if (keymatch(arg, \"qslots\", 2)) {\n      /* Quantization table slot numbers. */\n      if (++argn >= argc)       /* advance to next argument */\n        usage();\n      qslotsarg = argv[argn];\n      /* Must delay setting qslots until after we have processed any","sourceCodeStart":425,"sourceCodeEnd":461,"githubUrl":"https://github.com/DrKLO/Telegram/blob/45ab8f4308496e1f01026a97fcdb0d58a5274474/TMessagesProj/jni/mozjpeg/cjpeg.c#L425-L461","documentation":"cjpeg was built without an in-memory destination manager. This feature is present when JPEG_LIB_VERSION >= 80 OR MEM_SRCDST_SUPPORTED is defined. The -memdst switch (which makes cjpeg write to an in-memory buffer instead of a file/stdout) is therefore unavailable; cjpeg prints this message and exits with EXIT_FAILURE.","triggerScenarios":"Invoking `cjpeg -memdst ...` against a libjpeg older than version 80 that was also not built with MEM_SRCDST_SUPPORTED.","commonSituations":"Embedded or legacy libjpeg builds below v8; vendor SDKs shipping an older libjpeg; toolchains that disable memory source/destination managers.","solutions":["Drop -memdst and write to a file or stdout instead.","Upgrade to libjpeg >= 80 (e.g. libjpeg-turbo/mozjpeg), or rebuild with MEM_SRCDST_SUPPORTED defined, if in-memory output is required."],"exampleFix":"# before\ncjpeg -memdst in.ppm\n\n# after\ncjpeg in.ppm > out.jpg","handlingStrategy":"fallback","validationCode":"# Probe in-memory destination support before using -memdst.\nif cjpeg -h 2>&1 | grep -q memdst; then\n  MEMDST=-memdst\nelse\n  MEMDST=   # fall back to file/stdout output\nfi\ncjpeg $MEMDST in.ppm > out.jpg","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Do not assume -memdst is available on older libjpeg (<80) builds.","Upgrade to libjpeg >= 80 or rebuild with MEM_SRCDST_SUPPORTED if in-memory output is required."],"tags":["mozjpeg","cjpeg","cli","compile-flag","jpeg"],"backgroundTag":null,"analyzedSha":"45ab8f4308496e1f01026a97fcdb0d58a5274474","analyzedAt":"2026-08-14T05:19:30.815Z","schemaVersion":2},"datasetVersion":"2026-08-14T10:17:34.591Z"}