Dalvik虚拟机VFY codeS的意义 [英] meaning of dalvik VM VFY codes

查看:169
本文介绍了Dalvik虚拟机VFY codeS的意义的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

运行我的Andr​​oid应用程序(的警告,按顺序输出给出),当我能有人请解释以下警告的含义是:

Can someone please explain to me the meaning of the following warnings when running my Android Application (the warnings are outputted in sequence as given):

04-17 15:29:11.693: I/dalvikvm(4442): DexOpt: access denied from Lcom/kirona/iclient/db/core/services/impl/MiscDatabaseModuleDaoImpl; to field Lcom/kirona/iclient/database/common/impl/AbstractDatabaseModuleDao;.logger
04-17 15:29:11.653: W/dalvikvm(4442): VFY: unable to resolve static field 30 (logger) in Lcom/kirona/iclient/db/core/services/impl/MiscDatabaseModuleDaoImpl;
04-17 15:29:11.653: D/dalvikvm(4442): VFY: replacing opcode 0x62 at 0x0001    
04-17 15:29:11.693: D/dalvikvm(4442): VFY: dead code 0x0046-006e in Lcom/kirona/iclient/db/core/services/impl/MiscDatabaseModuleDaoImpl;.getSequenceNextVal (Ljava/lang/String;)J

应用程序似乎运行正常,但我需要了解的问题,因为我们有一个类似的错误而崩溃dalvikvm。

The application seems to run fine but I need to understand the issue since we have more complicated applications with similar errors which crash the dalvikvm.

推荐答案

这个问题似乎是在 MiscDatabaseModuleDaoImp​​l 类试图访问 AbstractDatabaseModuleDao.logger 字段,但不能,因为访问限制(即私有,保护等)。在这种情况下,sget对象运code(OP code 0X62)正在访问该字段被替换为一个抛出一个验证异常,如果执行,这可能会导致运行时崩溃。

The issue appears to be that the MiscDatabaseModuleDaoImpl class is attempting to access the AbstractDatabaseModuleDao.logger field, but can't, due to access restrictions (i.e. private, protected, etc.). In this case, the sget-object opcode (opcode 0x62) that is accessing this field is replaced with one that throws a verification exception, which would likely cause a runtime crash if executed.

此外,最后一条消息是指在 MiscDatabaseModuleDaoImp​​l.getSequenceNextVal 法死code。这是无害的 - 在运行时也不会造成任何问题。但是,它不会是一个坏主意,找出死者code是什么,并将其删除。可以使用baksmali,与拆卸您的应用程序 - code-偏移选项,然后看拆装该方法。本 - code-偏移选项将加注释包含相互抵消指令之前。每个错误消息,偏移距离将0x46 0x6e都死了code。此外,还应该在附近,这将是从原始的Java文件中相应行号 .line 指令。

Additionally, the last message refers to dead code in the MiscDatabaseModuleDaoImpl.getSequenceNextVal method. This is harmless - it won't cause any issues during runtime. However, it wouldn't be a bad idea to find out exactly what the dead code is, and remove it. You can disassemble your application using baksmali, with the --code-offsets option, and then look at the disassembly for that method. The --code-offsets option will put a comment before each instruction containing the offset. Per the error message, the offsets from 0x46 to 0x6e are dead code. There should also be .line directives in the vicinity, which will be the corresponding line numbers from the original java file.

这篇关于Dalvik虚拟机VFY codeS的意义的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆