{"action":"reopened","issue":{"url":"https://api.github.com/repos/Storyyeller/Krakatau/issues/60","repository_url":"https://api.github.com/repos/Storyyeller/Krakatau","labels_url":"https://api.github.com/repos/Storyyeller/Krakatau/issues/60/labels{/name}","comments_url":"https://api.github.com/repos/Storyyeller/Krakatau/issues/60/comments","events_url":"https://api.github.com/repos/Storyyeller/Krakatau/issues/60/events","html_url":"https://github.com/Storyyeller/Krakatau/issues/60","id":130556648,"number":60,"title":"Decompilation Errors: KeyError on Constant pool index","user":{"login":"crashish","id":3500959,"avatar_url":"https://avatars.githubusercontent.com/u/3500959?v=3","gravatar_id":"","url":"https://api.github.com/users/crashish","html_url":"https://github.com/crashish","followers_url":"https://api.github.com/users/crashish/followers","following_url":"https://api.github.com/users/crashish/following{/other_user}","gists_url":"https://api.github.com/users/crashish/gists{/gist_id}","starred_url":"https://api.github.com/users/crashish/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/crashish/subscriptions","organizations_url":"https://api.github.com/users/crashish/orgs","repos_url":"https://api.github.com/users/crashish/repos","events_url":"https://api.github.com/users/crashish/events{/privacy}","received_events_url":"https://api.github.com/users/crashish/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":16,"created_at":"2016-02-02T03:01:52Z","updated_at":"2016-02-14T22:36:45Z","closed_at":null,"body":"I'm not sure if this would be better to report to ByteCode Viewer, or how to qualify a \"valid class\" (I assume it is valid, the APK that contains the class seems to run fine, for whatever that's worth), but pasted below is the error I am seeing. I'm pretty new to most of these things (Android/Dalvik reversing, ByteCode Viewer, Krakatau) so please let me know what additional information would help diagnose the problem or where might be better to seek help.\r\n\r\n\r\n```\r\nprocessing target com/google/gson/DefaultTypeAdapters$EnumTypeAdapter, 5267 remaining\r\nLoading com/google/gson/DefaultTypeAdapters$EnumTypeAdapter\r\nDecompiling method <init> ()V\r\nDecompiling method <init> (Lcom/google/gson/DefaultTypeAdapters$1;)V\r\nDecompiling method deserialize (Lcom/google/gson/JsonElement;Ljava/lang/reflect/Type;Lcom/google/gson/JsonDeserializatio\r\nnContext;)Ljava/lang/Enum;\r\nTraceback (most recent call last):\r\n  File \"C:\\Users\\user\\.Bytecode-Viewer\\krakatau_8\\Krakatau-master\\decompile.py\", line 144, in <module>\r\n    decompileClass(path, targets, args.out, args.skip)\r\n  File \"C:\\Users\\user\\.Bytecode-Viewer\\krakatau_8\\Krakatau-master\\decompile.py\", line 91, in decompileClass\r\n    source = printer.visit(javaclass.generateAST(c, makeGraph, skip_errors, add_throws=add_throws))\r\n  File \"C:\\Users\\user\\.Bytecode-Viewer\\krakatau_8\\Krakatau-master\\Krakatau\\java\\javaclass.py\", line 67, in generateAST\r\n\r\n    method_defs = [_getMethod(m, cb, forbidden_identifiers, skip_errors) for m in methods]\r\n  File \"C:\\Users\\user\\.Bytecode-Viewer\\krakatau_8\\Krakatau-master\\Krakatau\\java\\javaclass.py\", line 39, in _getMethod\r\n    code_ast = javamethod.generateAST(method, graph, forbidden_identifiers)\r\n  File \"C:\\Users\\user\\.Bytecode-Viewer\\krakatau_8\\Krakatau-master\\Krakatau\\java\\javamethod.py\", line 864, in generateA\r\nST\r\n    _preorder(ast_root, partial(_addCastsAndParens, env=env))\r\n  File \"C:\\Users\\user\\.Bytecode-Viewer\\krakatau_8\\Krakatau-master\\Krakatau\\java\\javamethod.py\", line 138, in _preorder\r\n\r\n    val = func(scope, item)\r\n  File \"C:\\Users\\user\\.Bytecode-Viewer\\krakatau_8\\Krakatau-master\\Krakatau\\java\\javamethod.py\", line 723, in _addCasts\r\nAndParens\r\n    item.addCastsAndParens(env)\r\n  File \"C:\\Users\\user\\.Bytecode-Viewer\\krakatau_8\\Krakatau-master\\Krakatau\\java\\ast.py\", line 70, in addCastsAndParens\r\n\r\n    self.expr.addCasts(env)\r\n  File \"C:\\Users\\user\\.Bytecode-Viewer\\krakatau_8\\Krakatau-master\\Krakatau\\java\\ast.py\", line 341, in addCasts\r\n    param.addCasts(env)\r\n  File \"C:\\Users\\user\\.Bytecode-Viewer\\krakatau_8\\Krakatau-master\\Krakatau\\java\\ast.py\", line 342, in addCasts\r\n    self.addCasts_sub(env)\r\n  File \"C:\\Users\\user\\.Bytecode-Viewer\\krakatau_8\\Krakatau-master\\Krakatau\\java\\ast.py\", line 457, in addCasts_sub\r\n    def addCasts_sub(self, env): self.fix(env)\r\n  File \"C:\\Users\\user\\.Bytecode-Viewer\\krakatau_8\\Krakatau-master\\Krakatau\\java\\ast.py\", line 451, in fix\r\n    if not isJavaAssignable(env, tt, expr.dtype):\r\n  File \"C:\\Users\\user\\.Bytecode-Viewer\\krakatau_8\\Krakatau-master\\Krakatau\\java\\ast.py\", line 277, in isJavaAssignable\r\n\r\n    return objtypes.isSubtype(env, fromt, to)\r\n  File \"C:\\Users\\user\\.Bytecode-Viewer\\krakatau_8\\Krakatau-master\\Krakatau\\ssa\\objtypes.py\", line 55, in isSubtype\r\n    return isBaseTClass(x) and isBaseTClass(y) and env.isSubclass(xname, yname)\r\n  File \"C:\\Users\\user\\.Bytecode-Viewer\\krakatau_8\\Krakatau-master\\Krakatau\\environment.py\", line 29, in isSubclass\r\n    return name1 == name2 or (name2 in self.getClass(name1).getSuperclassHierarchy())\r\n  File \"C:\\Users\\user\\.Bytecode-Viewer\\krakatau_8\\Krakatau-master\\Krakatau\\environment.py\", line 25, in getClass\r\n    result.loadElements()\r\n  File \"C:\\Users\\user\\.Bytecode-Viewer\\krakatau_8\\Krakatau-master\\Krakatau\\classfile.py\", line 124, in loadElements\r\n    self.methods = [method.Method(m, self, keepRaw) for m in self.methods_raw]\r\n  File \"C:\\Users\\user\\.Bytecode-Viewer\\krakatau_8\\Krakatau-master\\Krakatau\\method.py\", line 95, in __init__\r\n    self.code = self._loadCode(keepRaw)\r\n  File \"C:\\Users\\user\\.Bytecode-Viewer\\krakatau_8\\Krakatau-master\\Krakatau\\method.py\", line 111, in _loadCode\r\n    return Code(self, bytestream, keepRaw)\r\n  File \"C:\\Users\\user\\.Bytecode-Viewer\\krakatau_8\\Krakatau-master\\Krakatau\\method.py\", line 32, in __init__\r\n    self.bytecode = bytecode.parseInstructions(codestream, self.isIdConstructor)\r\n  File \"C:\\Users\\user\\.Bytecode-Viewer\\krakatau_8\\Krakatau-master\\Krakatau\\bytecode.py\", line 14, in parseInstructions\r\n\r\n    if inst[0] == opnames.INVOKESPECIAL and isConstructor(inst[1]):\r\n  File \"C:\\Users\\user\\.Bytecode-Viewer\\krakatau_8\\Krakatau-master\\Krakatau\\method.py\", line 44, in isIdConstructor\r\n    args = self.class_.cpool.getArgsCheck('Method', methId)\r\n  File \"C:\\Users\\user\\.Bytecode-Viewer\\krakatau_8\\Krakatau-master\\Krakatau\\constant_pool.py\", line 178, in getArgsChec\r\nk\r\n    raise KeyError('Constant pool index {} has incorrect type {}'.format(index, typen))\r\nKeyError: 'Constant pool index 1158 has incorrect type Method'\r\n\r\n```"}}