{"record":{"id":"0de867bf5a404a5d","repo":"sxyazi/yazi","slug":"seek-overflow","errorCode":null,"errorMessage":"seek overflow","messagePattern":"seek overflow","errorType":"exception","errorClass":"io::Error","httpStatus":null,"severity":"error","filePath":"yazi-vfs/src/engine/lua/file.rs","lineNumber":141,"sourceCode":"\t\tlet result = ready!(me.pending_read.as_mut().unwrap().as_mut().poll(cx));\n\t\tme.pending_read = None;\n\n\t\tPoll::Ready(result.map(|bytes| {\n\t\t\tlet n = bytes.len().min(buf.remaining());\n\t\t\tbuf.put_slice(&bytes[..n]);\n\t\t\tme.pos = me.pos.checked_add(n as u64).expect(\"offset overflow\");\n\t\t}))\n\t}\n}\n\nimpl AsyncSeek for File {\n\tfn start_seek(self: Pin<&mut Self>, position: SeekFrom) -> io::Result<()> {\n\t\tlet me = self.get_mut();\n\t\tif me.pending_seek.is_some() {\n\t\t\treturn Err(io::Error::other(\"call poll_complete before start_seek\"));\n\t\t}\n\n\t\tme.pending_seek = Some(match position {\n\t\t\tSeekFrom::Start(n) => SeekState::NonBlocking(n),\n\t\t\tSeekFrom::Current(n) => me\n\t\t\t\t.pos\n\t\t\t\t.checked_add_signed(n)\n\t\t\t\t.map(SeekState::NonBlocking)\n\t\t\t\t.ok_or_else(|| io::Error::new(io::ErrorKind::InvalidInput, \"seek overflow\"))?,\n\t\t\tSeekFrom::End(n) => {\n\t\t\t\tlet service = me.service.clone();\n\t\t\t\tlet job = ProvideJob::Metadata { url: me.url.clone() };\n\t\t\t\tSeekState::Blocking(\n\t\t\t\t\tn,\n\t\t\t\t\tBox::pin(async move { Ok(RUNNER.provide::<Cha>(service, job).await.0?.len) }),\n\t\t\t\t)\n\t\t\t}\n\t\t});\n\n\t\tOk(())\n\t}","sourceCodeStart":123,"sourceCodeEnd":159,"githubUrl":"https://github.com/sxyazi/yazi/blob/8ebf930f1796ae2076b7d6b0c5e93a1002c18134/yazi-vfs/src/engine/lua/file.rs#L123-L159","documentation":"Error \"seek overflow\" thrown in sxyazi/yazi.","triggerScenarios":"Thrown at yazi-vfs/src/engine/lua/file.rs:141 when the library encounters an invalid state.","commonSituations":"Seeking to an offset that overflows the file's representable range in a Lua VFS file handle.","solutions":["Seek to an offset within the file's representable range; clamp the requested offset before seeking."],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"8ebf930f1796ae2076b7d6b0c5e93a1002c18134","analyzedAt":"2026-08-19T05:27:26.468Z","contentChangedAt":"2026-08-19T05:27:26.468Z","schemaVersion":2},"datasetVersion":"2026-09-14T00:17:10.932Z"}