Reputation: 55
I'm running a program in Eclipse that involves doing a bit of math and database inputting. At one point it seems to be too much because Eclipse gives me a VerifyError. When I delete a little bit it runs fine, doesn't matter what I delete so it's not a specific part causing the error but the length of it all, it seems. Here's the error message:
10-27 17:04:03.855: W/dalvikvm(12618): VFY: warning: method is huge (regs=643 insnsSize=7090)
10-27 17:04:03.855: W/dalvikvm(12618): VFY: rejected Lcom/example/simpledatabasetutorial/DatabaseManageActivity;.onClick (Landroid/view/View;)V
10-27 17:04:04.114: W/dalvikvm(12618): VFY: register2 v12-13 values 0,0
10-27 17:04:04.114: W/dalvikvm(12618): VFY: rejecting opcode 0xab at 0x10f2
10-27 17:04:04.114: W/dalvikvm(12618): VFY: rejected Lcom/example/simpledatabasetutorial/DatabaseManageActivity;.onClick (Landroid/view/View;)V
10-27 17:04:04.114: W/dalvikvm(12618): Verifier rejected class Lcom/example/simpledatabasetutorial/DatabaseManageActivity;
10-27 17:04:04.114: W/dalvikvm(12618): Class init failed in newInstance call (Lcom/example/simpledatabasetutorial/DatabaseManageActivity;)
10-27 17:04:04.114: D/AndroidRuntime(12618): Shutting down VM
10-27 17:04:04.114: W/dalvikvm(12618): threadid=1: thread exiting with uncaught exception (group=0x40015560)
10-27 17:04:04.145: E/AndroidRuntime(12618): FATAL EXCEPTION: main
10-27 17:04:04.145: E/AndroidRuntime(12618): java.lang.VerifyError: com.example.simpledatabasetutorial.DatabaseManageActivity
Any ideas of a quick solution? Maybe this is far from enough info, if that's the case just let me know and I'll include what ever is relevant.
Upvotes: 1
Views: 191
Reputation: 52313
The problem isn't actually that your method is too large. As of gingerbread, excessively-large methods no longer cause the method to be rejected. (The first "rejected" message just appears because it's using the LOG_VFY_METH
macro to report the method name.)
The real problem is the second complaint, register2 v12-13 values 0,0 ... rejecting opcode 0xab
. 0xab is an "add-double" instruction, which takes a 64-bit argument, which means the types on the two 32-bit Dalvik registers should be "double low" and "double high". The verifier found that they're both type zero, which is "unknown".
So either there's a bug in the Dalvik verifier or there's a bug in the generated code (possibly originating in the "dx" tool). You should file a report on http://b.android.com/.
Upvotes: 1