I'm not sure, but could this also be related to short enums? I seem to
remember seeing something like this when I had a mixture of old code
compiled with and new code compiled without short enums.

On Thu, Mar 12, 2009 at 11:53 PM, Dan Bornstein <danf...@android.com> wrote:

>
> On Thu, Mar 12, 2009 at 8:10 AM, vkat <rpran...@gmail.com> wrote:
> > I am in the process of porting the dalvik VM to a glibc based ARM SoC.
> > I have done (hopefully) most of the the porting. Now when I start
> > dalvikvm I am getting an error when dexopt is trying to optimize the
> > core.jar file.
> > [...]
> > W( 5289) Bad index: (pType->typeIdx)(49280) > (state->pHeader-
> >typeIdsSize)(2910)  (dalvikvm)
> > E( 5289) Trouble with item 4 @ offset 0x2393e4  (dalvikvm)
> > E( 5289) Swap of section type 1001 failed  (dalvikvm)
> > E( 5289) ERROR: Byte swap + verify failed  (dalvikvm)
>
> These are the salient lines from the file. It's not entirely clear to
> me where the actual problem is, but what the above log says is that
> item #4 in the type_list section (that's what section type 1001 is;
> see the dex format specification document) contains a type index
> that's out of range.
>
> This might be because the dex file is corrupt, because the size of the
> type_ids section is being misinterpreted, because the offset to the
> type_list section is being misinterpreted, or because the contents of
> the type_list in question are being misinterpreted.
>
> To figure out which of these is the case, you should probably start by
> inspecting the dex file. The "dexdump" tool can help with this (in
> particular the "-f" option to display the header), but dexdump won't
> print out the entire contents of the file in general. To get a fully
> annotated dex file, you can produce it at build time by adding a "--
> dump-to=<file>" option to dx (the tool that converts class files to
> dex files). If you are using the standard Android build system, you
> can say "make dex-debug", and this will cause annotated dex files to
> be dropped into dalvik/DEBUG-FILES (in your source tree).
>
> FWIW, this probably won't turn out to be a glibc problem per se, since
> at least a couple of folks on the Android team build Dalvik for a
> Linux host environment without problem.
>
> Best of luck,
>
> -dan
>
> >
>

--~--~---------~--~----~------------~-------~--~----~
unsubscribe: android-porting+unsubscr...@googlegroups.com
website: http://groups.google.com/group/android-porting
-~----------~----~----~----~------~----~------~--~---

Reply via email to