{"record":{"id":"63cd23cfb3f12245","repo":"pxb1988/dex2jar","slug":"while-accepting-parameter-annotation-in-parameter","errorCode":null,"errorMessage":"While accepting parameter annotation in parameter: [%d]","messagePattern":"While accepting parameter annotation in parameter: \\[(.+?)\\]","errorType":"exception","errorClass":"DexException","httpStatus":null,"severity":"error","filePath":"dex-reader/src/main/java/com/googlecode/d2j/reader/DexFileReader.java","lineNumber":1098,"sourceCode":"    }\r\n\r\n    private void read_annotation_set_ref_list(int parameter_annotation_offset, DexMethodVisitor dmv) {\r\n        ByteBuffer in = annotationSetRefListIn;\r\n        in.position(parameter_annotation_offset);\r\n\r\n        int size = in.getInt();\r\n        for (int j = 0; j < size; j++) {\r\n            int param_annotation_offset = in.getInt();\r\n            if (param_annotation_offset == 0) {\r\n                continue;\r\n            }\r\n            DexAnnotationAble dpav = dmv.visitParameterAnnotation(j);\r\n            try {\r\n                if (dpav != null) {\r\n                    read_annotation_set_item(param_annotation_offset, dpav);\r\n                }\r\n            } catch (Exception e) {\r\n                throw new DexException(e, \"While accepting parameter annotation in parameter: [%d]\", j);\r\n            }\r\n        }\r\n    }\r\n\r\n    /**\r\n     * the size of class in dex file\r\n     * \r\n     * @return class_defs_size\r\n     */\r\n    public final int getClassSize() {\r\n        return class_defs_size;\r\n    }\r\n\r\n    static class BadOpException extends RuntimeException {\r\n\r\n        private static final long serialVersionUID = 5354839427958139635L;\r\n\r\n        public BadOpException(String fmt, Object... args) {\r","sourceCodeStart":1080,"sourceCodeEnd":1116,"githubUrl":"https://github.com/pxb1988/dex2jar/blob/b5bda4fb4935ae8b3869b422454ae3b3896c7bc1/dex-reader/src/main/java/com/googlecode/d2j/reader/DexFileReader.java#L1080-L1116","documentation":"DexException thrown from read_annotation_set_ref_list when reading one individual parameter's annotation set fails. The message identifies the zero-based parameter index j whose annotation item could not be decoded via read_annotation_set_item.","triggerScenarios":"The annotation_set_item offset for parameter j points to invalid or truncated data, or the annotation item references unknown types/elements, throwing inside read_annotation_set_item.","commonSituations":"Dexes rewritten by obfuscators/packers that corrupt annotation offsets, or hand-patched dex files; also seen converting apk built with exotic tools.","solutions":["Check the cause for the exact decode failure at parameter index j","Rebuild the dex with dx/d8 so annotation offsets are consistent","Verify the dex structure with dexdump before converting","Catch DexException to skip parameter annotations for that method"],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":null,"typeGuard":null,"tryCatchPattern":"try {\n    reader.accept(dmv);\n} catch (DexException e) {\n    logger.warn(\"parameter annotation read failed\", e.getCause());\n}","preventionTips":["Rebuild obfuscated apks with standard annotation handling","Check annotation offsets with dexdump before conversion","Catch per-method to continue batch conversion"],"tags":["dex","annotations","malformed-input","dex-file-reader"],"backgroundTag":"invalid-argument-format","analyzedSha":"b5bda4fb4935ae8b3869b422454ae3b3896c7bc1","analyzedAt":"2026-09-08T00:44:01.258Z","contentChangedAt":"2026-09-08T00:44:01.258Z","schemaVersion":2},"datasetVersion":"2026-09-16T09:17:16.951Z"}