VFY: arbitrarily rejecting large method

by LinusOnline » Tue, 23 Mar 2010 01:38:28 GMT

Sponsored Links
 After building my project with Java debug information, I get the
following "warning" from dalvikvm when launching my application:

VFY: arbitrarily rejecting large method

It seems the Dalvik VM's verifier is rejecting one of my methods. The
method is named in the warning, and it is indeed very large,
consisting of a long switch statement. I'd like to avoid breaking it
up if I can.

Is there a way to get the verifier to accept this method, including
debug information?


VFY: arbitrarily rejecting large method

by fadden » Tue, 23 Mar 2010 03:24:36 GMT


The value of (number of registers * number of instruction words) is
larger than 2^21.  You can use dexdump to see how close you are.

I wasn't really expecting anyone to hit this -- it's intended to
prevent the verifier from bloating up an app's native heap.  Does the
method take a large number of arguments, or have lots of local
variables?  I've also seen some poor behavior when a method had 4+
invocations of a call to another method that took 15+ arguments; the
register allocator freaked out a bit.

The presence or absence of debug information affects the sorts of
things the "dx" code optimizer is allowed to do (e.g. some unnecessary
instructions will be retained so that the debugger can show something
reasonable while single-stepping).  Usually the overhead is small, but
it may be that you're near the edge and this pushed you over.


Sponsored Links

Other Threads

1. Creation of XML

        I want to create XML with my own tags i want it to create at
runtime . I am unable to use Transform class of java in android is
there any other option available .
      Any help would be appreciated ... Thnx in advance .......

2. Emulator does not find new skins (1.5)


I hope I won't post twice but it seems my first message did not go

Screens beeing always too small :) I am trying to use a skin without
any keyboard.
I got it here : 

I am copying the BILGICIFTLIGI-LAYOUT-P folder inside D:\android\tools
\lib\images\skins (please note my system is on D:\...)

When running the emulator, I get such message :
[2009-04-29 13:30:30 - Emulator] emulator: ERROR: could not find
directory for skin 'BILGICIFTLIGI-LAYOUT-P', please use a different

I tried using the -skindir option and provided the full path :
-skindir "d:\Android\Tools\lib\images\skins" -skin "BILGICIFTLIGI-
...with no success.

If I use -skin HVGA, then it works....

I have tried on 2 different machines and I get the same result.
I also tried renaming BILGICIFTLIGI-LAYOUT-P into NOKBD (short name)
with no more success.
I have btw first tried -skin BILGICIFTLIGI-LAYOUT-P (no ") with no

Anyone would have a hint ?



3. SDK-1.5 Emulator does not find skin

4. How to execute a application automatically after android booting?

5. creating custom intent

6. API to delete SIM contacts & Messages AND erasing the SD card contents

7. Compile problem after repo sync.