i ran into something similar compiling the 
as-yet-unreleased-for-some-reason version 1.4 of the apache commons 
codec stuff. i wanted it to get the streaming versions of the Base64 
codec, but it was not to be. compiled and worked fine on the Mac, but 
didn't pass the verifier (bad opcode ???) on the emulator.

don't know whether this data point helps at all...


>Ok, I figured it out. This seems to be a serious bug in the dalvik
>bytecode verifier being overzealous, since it runs fine in every other
>JVM.
>
>In the function calcMultiRange() shown above, if you assign "prevRange
>= range" instead of null on the 5 line, the verify error goes away.
>>From a control flow perspective, the array dereference in the else
>clause (prevRange[prevIndex]) will never be an NPE because the else
>clause won't execute until the second iteration of the for-loop, in
>which cause the prevRange variable will not be null. Even more
>bizarrely, the verify error occurs if compiled with javac, but not if
>compiled via JDT in Eclipse Ganymede.
>
>This is a kind of heisenbug, in that it can show up in perfectly
>reasonable looking code, that passes all unit tests with 100%
>coverage, but bite you when you deploy, and the diagnostics produced
>in logcat don't make it easy to track down the problem. I tracked it
>down myself by selectively commenting out parts of the function until
>I zeroed into the prevRange deference.
>
>-Ray
>


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to