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. How to get the root view of current Activity?

View.getRootView().






-- 
Romain Guy
Android framework engineer
romain...@android.com

Note: please don't send private questions to me, as I don't have time
to provide private support.  All such questions should be posted on
public forums, where I and others can see and answer them

--~--~---------~--~----~------------~-------~--~----~

2. Miami Area Users Group

This post is for any developers in the Miami area that are looking for
an Android users group to work with. I would like to form a group that
can be used to help each other with application ideas, mentoring and
android tutorials on a local level. Send me a reply if you are
interested and we can go from there.
--~--~---------~--~----~------------~-------~--~----~

3. How to get the root view of current Activity?

4. setContentURI VideoView

5. Can you make SlidingDrawer slide from top of screen without custom code?

6. J2ME or ANDROID eclipse usage

7. issue with autocompletetextview and ime