{"record":{"id":"2304cdedafbcfcd4","repo":"kovidgoyal/kitty","slug":"this-must-be-run-as-kitten-ask","errorCode":null,"errorMessage":"This must be run as kitten ask","messagePattern":"This must be run as kitten ask","errorType":"console","errorClass":"SystemExit","httpStatus":null,"severity":"warning","filePath":"kittens/ask/main.py","lineNumber":73,"sourceCode":"\n\n--unhide-key\ndefault=u\nThe key to be pressed to unhide hidden text\n\n\n--hidden-text-placeholder\nThe text in the message to be replaced by hidden text. The hidden text is read via STDIN.\n\"\"\"\n\n\nclass Response(TypedDict):\n    items: list[str]\n    response: str | None\n\n\ndef main(args: list[str]) -> Response:\n    raise SystemExit('This must be run as kitten ask')\n\n\n@result_handler()\ndef handle_result(args: list[str], data: Response, target_window_id: int, boss: BossType) -> None:\n    if data['response'] is not None:\n        func, *args = data['items']\n        getattr(boss, func)(data['response'], *args)\n\n\nif __name__ == '__main__':\n    main(sys.argv)\nelif __name__ == '__doc__':\n    cd = sys.cli_docs  # type: ignore\n    cd['usage'] = ''\n    cd['options'] = option_text\n    cd['help_text'] = 'Ask the user for input'\n    cd['short_desc'] = 'Ask the user for input'\n","sourceCodeStart":55,"sourceCodeEnd":91,"githubUrl":"https://github.com/kovidgoyal/kitty/blob/6d5d0c440603ad9bdf6dcd599f73f6dde21acb44/kittens/ask/main.py#L55-L91","documentation":"kitty failed to munmap a memory-mapped background image bitmap in free_bgimage_bitmap (kitty/state.c). The background image was loaded via mmap (e.g. from a preprocessed image cache file) and the OS refused to unmap it at shutdown or when reloading the background image. It usually indicates the mapping address/size were corrupted or the mapping was already released elsewhere.","triggerScenarios":"Setting background_image in kitty.conf, then changing the background image at runtime (kitten @set-background-image), sending it to the GPU repeatedly, or quitting kitty. Only fires when bgimage->mmap_size != 0 and munmap() returns non-zero.","commonSituations":"Corrupted image cache files in kitty's cache dir (~/.cache/kitty), a background image file that changed size while mapped, or memory corruption from a GPU driver issue. Rarely seen on healthy systems.","solutions":["Clear kitty's image cache: rm -rf ~/.cache/kitty and restart kitty.","Verify the background image file is a valid, non-truncated PNG/JPEG (re-save it).","Reproduce with a different image file to rule out file corruption.","If reproducible, report to kitty GitHub with the exact kitty version and kernel version - munmap failing on a valid mapping suggests a real bug."],"exampleFix":"# before\nbackground_image ~/corrupted-wallpaper.png\n# after\nrm -rf ~/.cache/kitty\nbackground_image ~/re-saved-wallpaper.png","handlingStrategy":"fallback","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":["Keep kitty's image cache (~/.cache/kitty) clean when images change often.","Use stable, valid PNG/JPEG files for background_image.","Update kitty when updating the OS/kernel."],"tags":["kitty","mmap","background-image","memory","cleanup"],"backgroundTag":"mmap-unmap-failed","analyzedSha":"6d5d0c440603ad9bdf6dcd599f73f6dde21acb44","analyzedAt":"2026-08-27T14:20:20.142Z","schemaVersion":2},"datasetVersion":"2026-08-27T19:17:21.184Z"}