Eclipse debugger stops at DexFile.defineClass on startup?

by thrusty » Sun, 30 Mar 2008 18:30:32 GMT


Sponsored Links
 When I upgraded to the latest SDK recently, I found that when I launch
my application under the Eclipse debugger (on Mac OS X 10.5.2), the
app consistently stops at DexFile.defineClass on startup. (Clicking
"Continue" allows the app to continue launching OK, as far as I can
tell.) There is no debug info available other than the stack trace
(pasted below), and a consistently printed line in LogCat:

DEBUG/(749): zip_openZipFile(/data/app/myapp.apk)

I'm trying to figure out if this is indicative of an actual error in
my application, or if this is simply a debugging configuration
problem.

Thanks for any help!


DexFile.defineClass(String, ClassLoader, int, ProtectionDomain) line:
not available [native method]
DexFile.loadClass(String, ClassLoader) line: 87
PathClassLoader.findClass(String) line: 165
PathClassLoader(ClassLoader).loadClass(String, boolean) line: 442
PathClassLoader(ClassLoader).loadClass(String) line: 414
Instrumentation.newActivity(ClassLoader, String, Intent) line: 821
ActivityThread.performLaunchActivity(ActivityThread$ActivityRecord)
line: 1691
ActivityThread.handleLaunchActivity(ActivityThread$ActivityRecord)
line: 1770
ActivityThread.access$1500(ActivityThread, ActivityThread
$ActivityRecord) line: 99
ActivityThread$H.handleMessage(Message) line: 1271
ActivityThread$H(Handler).dispatchMessage(Message) line: 80
Looper.loop() line: 91
ActivityThread.main(String[]) line: 3052
Method.invokeNative(Object, Object[], Class, Class[], Class, int,
boolean) line: not available [native method]
Method.invoke(Object, Object...) line: 356
ZygoteInit$MethodAndArgsCaller.run() line: 1547
ZygoteInit.main(String[]) line: 1445
NativeStart.main(String[]) line: not available [native method]

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



Eclipse debugger stops at DexFile.defineClass on startup?

by thrusty » Tue, 01 Apr 2008 16:55:35 GMT


 This appears to be related to implementing View.OnKeyListener in an
Activity.  For some reason DexFile.defineClass doesn't like this, and
causes the debugger to stop in this native method.

I'll file a bug report.




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


Sponsored Links


Eclipse debugger stops at DexFile.defineClass on startup?

by thrusty » Tue, 01 Apr 2008 17:02:59 GMT


 Scratch that-- it was simply a matter of a breakpoint being
(accidentally) set at the class-definition level (i.e. a breakpoint
set in Eclipse on the line "public class MyActivity..."

I guess the way the Android emulator handles this kind of breakpoint
is to stop in DexFile.defineClass.  Lesson learned!







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