Created
April 2, 2023 12:58
-
-
Save steinarb/234cf172c214b26b33ee92a4e5b5afd1 to your computer and use it in GitHub Desktop.
Emacs stack trace from failing to open .jar file in zip mode
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Debugger entered--Lisp error: (args-out-of-range #<buffer modelstore.services-1.0.0-SNAPSHOT-javadoc.jar> 329454 329458) | |
buffer-substring(329454 329458) | |
(string= "PK\1\2" (buffer-substring p (+ p 4))) | |
(while (string= "PK\1\2" (buffer-substring p (+ p 4))) (let* ((creator (get-byte (+ p 5))) (modtime (archive-l-e (+ p 12) 2)) (moddate (archive-l-e (+ p 14) 2)) (ucsize (archive-l-e (+ p 24) 4)) (fnlen (archive-l-e (+ p 28) 2)) (exlen (archive-l-e (+ p 30) 2)) (fclen (archive-l-e (+ p 32) 2)) (lheader (archive-l-e (+ p 42) 4)) (efnname (let ((str (buffer-substring ... ...))) (decode-coding-string str archive-file-name-coding-system))) (isdir (and (= ucsize 0) (string= (file-name-nondirectory efnname) ""))) (mode (cond ((memq creator '...) (archive-l-e (+ p 40) 2)) ((memq creator '...) (logior 292 (if isdir ... 0) (if ... 146 0))) (t nil))) (modestr (if mode (archive-int-to-mode mode) "??????????")) (fiddle (and archive-zip-case-fiddle (not (not (memq creator ...))) (string= (upcase efnname) efnname))) (ifnname (if fiddle (downcase efnname) efnname)) (width (string-width ifnname)) (text (format " %10s %8d %-11s %-8s %s" modestr ucsize (archive-dosdate moddate) (archive-dostime modtime) ifnname))) (setq maxlen (max maxlen width) totalsize (+ totalsize ucsize) visual (cons (vector text (- (length text) (length ifnname)) (length text)) visual) files (cons (if isdir nil (vector efnname ifnname fiddle mode (list (1- p) lheader))) files) p (+ p 46 fnlen exlen fclen)))) | |
(let ((p (archive-l-e (+ (point) 16) 4)) (maxlen 8) (totalsize 0) files visual emacs-int-has-32bits) (if (= p -1) (progn (search-backward "PK\6\7") (setq p (+ (point-min) (archive-l-e (+ (point) 8) 8))) (goto-char p) (or (string= "PK\6\6" (buffer-substring p (+ p 4))) (error "Unrecognized ZIP file format")) (setq p (archive-l-e (+ p 48) 8)))) (setq p (+ p (point-min))) (while (string= "PK\1\2" (buffer-substring p (+ p 4))) (let* ((creator (get-byte (+ p 5))) (modtime (archive-l-e (+ p 12) 2)) (moddate (archive-l-e (+ p 14) 2)) (ucsize (archive-l-e (+ p 24) 4)) (fnlen (archive-l-e (+ p 28) 2)) (exlen (archive-l-e (+ p 30) 2)) (fclen (archive-l-e (+ p 32) 2)) (lheader (archive-l-e (+ p 42) 4)) (efnname (let ((str ...)) (decode-coding-string str archive-file-name-coding-system))) (isdir (and (= ucsize 0) (string= (file-name-nondirectory efnname) ""))) (mode (cond ((memq creator ...) (archive-l-e ... 2)) ((memq creator ...) (logior 292 ... ...)) (t nil))) (modestr (if mode (archive-int-to-mode mode) "??????????")) (fiddle (and archive-zip-case-fiddle (not (not ...)) (string= (upcase efnname) efnname))) (ifnname (if fiddle (downcase efnname) efnname)) (width (string-width ifnname)) (text (format " %10s %8d %-11s %-8s %s" modestr ucsize (archive-dosdate moddate) (archive-dostime modtime) ifnname))) (setq maxlen (max maxlen width) totalsize (+ totalsize ucsize) visual (cons (vector text (- (length text) (length ifnname)) (length text)) visual) files (cons (if isdir nil (vector efnname ifnname fiddle mode (list ... lheader))) files) p (+ p 46 fnlen exlen fclen)))) (goto-char (point-min)) (let ((dash (concat "- ---------- -------- ----------- -------- " (make-string maxlen 45) "\n"))) (insert "M Filemode Length Date Time Fil..." dash) (archive-summarize-files (nreverse visual)) (insert dash (format " %8d %d file%..." totalsize (length files) (if (= 1 (length files)) "" "s")) "\n")) (apply #'vector (nreverse files))) | |
archive-zip-summarize() | |
funcall(archive-zip-summarize) | |
(setq archive-files (funcall (archive-name "summarize"))) | |
(let ((create-lockfiles nil) (inhibit-read-only t)) (setq archive-proper-file-start (copy-marker (point-min) t)) (set (make-local-variable 'change-major-mode-hook) 'archive-desummarize) (or shut-up (message "Parsing archive file...")) (buffer-disable-undo (current-buffer)) (setq archive-files (funcall (archive-name "summarize"))) (or shut-up (message "Parsing archive file...done.")) (setq archive-proper-file-start (point-marker)) (narrow-to-region (point-min) (point)) (set-buffer-modified-p nil) (buffer-enable-undo)) | |
archive-summarize(nil) | |
(if (and (not force) archive-files) nil (kill-all-local-variables) (let* ((type (archive-find-type)) (typename (capitalize (symbol-name type)))) (make-local-variable 'archive-subtype) (setq archive-subtype type) (make-local-variable 'revert-buffer-function) (setq revert-buffer-function 'archive-mode-revert) (auto-save-mode 0) (add-hook 'write-contents-functions 'archive-write-file nil t) (make-local-variable 'require-final-newline) (setq require-final-newline nil) (make-local-variable 'local-enable-local-variables) (setq local-enable-local-variables nil) (make-local-variable 'file-precious-flag) (setq file-precious-flag t) (make-local-variable 'archive-read-only) (setq archive-read-only (or (not (file-writable-p (buffer-file-name))) (and archive-subfile-mode (string-match file-name-invalid-regexp (aref archive-subfile-mode 0))))) (make-local-variable 'archive-local-name) (or archive-remote (setq archive-remote (or (string-match archive-remote-regexp (buffer-file-name)) (string-match file-name-invalid-regexp (buffer-file-name))))) (setq major-mode 'archive-mode) (setq mode-name (concat typename "-Archive")) (run-mode-hooks (archive-name "mode-hook") 'archive-mode-hook) (use-local-map archive-mode-map)) (make-local-variable 'archive-proper-file-start) (make-local-variable 'archive-file-list-start) (make-local-variable 'archive-file-list-end) (make-local-variable 'archive-file-name-indent) (setq archive-file-name-coding-system (or file-name-coding-system default-file-name-coding-system locale-coding-system)) (set-buffer-multibyte 'to) (archive-summarize nil) (setq buffer-read-only t) (if (and archive-visit-single-files auto-compression-mode (= (length archive-files) 1)) (progn (rename-buffer (concat " " (buffer-name))) (archive-extract)))) | |
(if (= 0 (buffer-size)) (funcall (or (default-value 'major-mode) 'fundamental-mode)) (if (and (not force) archive-files) nil (kill-all-local-variables) (let* ((type (archive-find-type)) (typename (capitalize (symbol-name type)))) (make-local-variable 'archive-subtype) (setq archive-subtype type) (make-local-variable 'revert-buffer-function) (setq revert-buffer-function 'archive-mode-revert) (auto-save-mode 0) (add-hook 'write-contents-functions 'archive-write-file nil t) (make-local-variable 'require-final-newline) (setq require-final-newline nil) (make-local-variable 'local-enable-local-variables) (setq local-enable-local-variables nil) (make-local-variable 'file-precious-flag) (setq file-precious-flag t) (make-local-variable 'archive-read-only) (setq archive-read-only (or (not (file-writable-p (buffer-file-name))) (and archive-subfile-mode (string-match file-name-invalid-regexp (aref archive-subfile-mode 0))))) (make-local-variable 'archive-local-name) (or archive-remote (setq archive-remote (or (string-match archive-remote-regexp (buffer-file-name)) (string-match file-name-invalid-regexp (buffer-file-name))))) (setq major-mode 'archive-mode) (setq mode-name (concat typename "-Archive")) (run-mode-hooks (archive-name "mode-hook") 'archive-mode-hook) (use-local-map archive-mode-map)) (make-local-variable 'archive-proper-file-start) (make-local-variable 'archive-file-list-start) (make-local-variable 'archive-file-list-end) (make-local-variable 'archive-file-name-indent) (setq archive-file-name-coding-system (or file-name-coding-system default-file-name-coding-system locale-coding-system)) (set-buffer-multibyte 'to) (archive-summarize nil) (setq buffer-read-only t) (if (and archive-visit-single-files auto-compression-mode (= (length archive-files) 1)) (progn (rename-buffer (concat " " (buffer-name))) (archive-extract))))) | |
archive-mode() | |
set-auto-mode-0(archive-mode nil) | |
set-auto-mode() | |
normal-mode(t) | |
after-find-file(nil nil t nil nil) | |
revert-buffer--default(nil nil) | |
revert-buffer() | |
revert-buffer-with-coding-system(utf-8-unix) | |
editorconfig-set-coding-system-revert("lf" "utf-8") | |
editorconfig-apply() | |
editorconfig-mode-apply() | |
run-hooks(change-major-mode-after-body-hook after-change-major-mode-hook) | |
normal-mode(t) | |
after-find-file(nil t) | |
find-file-noselect-1(#<buffer modelstore.services-1.0.0-SNAPSHOT-javadoc.jar> "~/workspaces/modelstore/modelstore.services/target..." nil nil "~/workspaces/modelstore/modelstore.services/target..." (4222133 66306)) | |
find-file-noselect("/home/sb/workspaces/modelstore/modelstore.services..." nil nil nil) | |
find-file("/home/sb/workspaces/modelstore/modelstore.services...") | |
dired-find-file() | |
funcall-interactively(dired-find-file) | |
call-interactively(dired-find-file nil nil) | |
command-execute(dired-find-file) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment