如何调试dalvikvm拒绝运code? [英] How to debug dalvikvm rejecting opcode?

查看:340
本文介绍了如何调试dalvikvm拒绝运code?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何使这些错误的意义吗?这是所有的日志猫releavant到错误。其他均为GC类型的消息。

  01-07 19:14:08.536:W / dalvikvm(5780):VFY:寄存器2 V4-5值6,24
01-07 19:14:08.536:W / dalvikvm(5780):VFY:在拒绝运code 0xce 0x004a
01-07 19:14:08.536:W / dalvikvm(5780):VFY:拒绝LNZ / CO / great_ape / headsup / sat_track / SGP4unit_sgp4; .sgp4(LNZ / CO / great_ape / headsup / sat_track / SGP4SatData; D [D [ D)ž
01-07 19:14:08.536:W / dalvikvm(5780):验证拒绝类LNZ / CO / great_ape / headsup / sat_track / SGP4unit_sgp4;

我知道code,它是关于400 SGP4卫星跟踪软​​件行(不是我的code)。

当我创建这个类的一个实例,这个问题被触发(这是长400多线)和我已经简单地注释掉所有code,然后取消追踪问题降至code本节-commenting部分,直到错误再次出现,

所有的变量在这里双打。那么,为什么是Android的拒绝这个code。与运算codeS的东西像OP_DIV_DOUBLE和OP_DIV_DOUBLE_2ADDR

什么办法,这里是code的部分。

  / * --------------更新周期短periodics ------------ * /
            如果(satrec.method =='D')
            {
                cosisq = cosip * cosip;
                satrec.con41 = 3.0 * cosisq - 1.0;
                satrec.x1mth2 = 1.0 - cosisq;
                satrec.x7thm1 = 7.0 * cosisq - 1.0;
            }
            MRT = RL *(1.0 - 1.5 * TEMP2 * *β1的satrec.con41)+
                    0.5 * temp1中* satrec.x1mth2 * cos2u;
            SU =苏 - 0.25 * TEMP2 * satrec.x7thm1 * sin2u;
            xnode = nodep + 1.5 * TEMP2 * cosip * sin2u;
            xinc = xincp + 1.5 * TEMP2 * cosip * sinip * cos2u;
            MVT = rdotl - 纳米* *的temp1 * satrec.x1mth2 sin2u / XKE;
            rvdot = rvdotl +纳米* *的temp1(satrec.x1mth2 * cos2u +
                    1.5 * satrec.con41)/ XKE;


解决方案

确定。似乎从来就没有什么不对的地方code作为这样的,只是方法​​的长度和变量的数目。声明它们的方法外解决了这个问题。

您可以在这里得到更多的信息:

https://groups.google.com/forum/?fromgroups=#!topic/android-developers/lxiTkNzOvZY

How do I make sense of these errors? This is all the log cat releavant to the error. all others are GC type messages.

01-07 19:14:08.536: W/dalvikvm(5780): VFY: register2 v4-5 values 6,24
01-07 19:14:08.536: W/dalvikvm(5780): VFY:  rejecting opcode 0xce at 0x004a
01-07 19:14:08.536: W/dalvikvm(5780): VFY:  rejected Lnz/co/great_ape/headsup/sat_track/SGP4unit_sgp4;.sgp4 (Lnz/co/great_ape/headsup/sat_track/SGP4SatData;D[D[D)Z
01-07 19:14:08.536: W/dalvikvm(5780): Verifier rejected class Lnz/co/great_ape/headsup/sat_track/SGP4unit_sgp4;

I know the code, it's about 400 lines of sgp4 satellite tracking software (not my code).

The problem is triggered when I create an instance of this class (it's long 400+ lines) and I have tracked the problem down to this section of code by simply commenting out all the code, then un-commenting sections until the error returns,

All the variables here are doubles. So why is android rejecting this code with opcodes for things like OP_DIV_DOUBLE and OP_DIV_DOUBLE_2ADDR

Any way, here is the section of code.

            /* -------------- update for short period periodics ------------ */
            if(satrec.method == 'd')
            {
                cosisq = cosip * cosip;
                satrec.con41 = 3.0 * cosisq - 1.0;
                satrec.x1mth2 = 1.0 - cosisq;
                satrec.x7thm1 = 7.0 * cosisq - 1.0;
            }
            mrt = rl * (1.0 - 1.5 * temp2 * betal * satrec.con41) +
                    0.5 * temp1 * satrec.x1mth2 * cos2u;
            su = su - 0.25 * temp2 * satrec.x7thm1 * sin2u;
            xnode = nodep + 1.5 * temp2 * cosip * sin2u;
            xinc = xincp + 1.5 * temp2 * cosip * sinip * cos2u;
            mvt = rdotl - nm * temp1 * satrec.x1mth2 * sin2u / xke;
            rvdot = rvdotl + nm * temp1 * (satrec.x1mth2 * cos2u +
                    1.5 * satrec.con41) / xke;

解决方案

Ok. It seems there was never anything wrong with the code as such, but just the length of the method and the number of variables. Declaring them outside the method solved the problem.

You can get more info here:

https://groups.google.com/forum/?fromgroups=#!topic/android-developers/lxiTkNzOvZY

这篇关于如何调试dalvikvm拒绝运code?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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