Closed
Bug 1305271
Opened 6 years ago
Closed 6 years ago
[geckoview] java.lang.ClassNotFoundException: Didn't find class "org.mozilla.gecko.GeckoJavaSampler"
Categories
(GeckoView :: General, defect)
GeckoView
General
Tracking
(firefox52 fixed)
RESOLVED
FIXED
mozilla52
Tracking | Status | |
---|---|---|
firefox52 | --- | fixed |
People
(Reporter: nalexander, Assigned: jchen)
References
Details
Attachments
(3 files)
11.22 KB,
patch
|
snorp
:
review+
|
Details | Diff | Splinter Review |
13.63 KB,
patch
|
snorp
:
review+
|
Details | Diff | Splinter Review |
5.14 KB,
patch
|
snorp
:
review+
|
Details | Diff | Splinter Review |
Sadly Bug 1303806 leaves Gecko without an implementation of the "Java Sampler", and it's enabled unconditionally at compile time. 09-24 16:45:01.972 1325-1346/org.mozilla.geckoview_example I/GeckoThread: RunGecko - args = org.mozilla.geckoview_example -greomni /data/app/org.mozilla.geckoview_example-1/base.apk chrome://browser/content/headless.xul -P default -purgecaches 09-24 16:45:02.009 1325-1346/org.mozilla.geckoview_example W/System.err: java.lang.ClassNotFoundException: Didn't find class "org.mozilla.gecko.GeckoJavaSampler" on path: DexPathList[[zip file "/system/framework/android.test.runner.jar", zip file "/data/app/org.mozilla.geckoview_example-1/base.apk"],nativeLibraryDirectories=[/data/app/org.mozilla.geckoview_example-1/lib/arm, /data/app/org.mozilla.geckoview_example-1/base.apk!/lib/armeabi-v7a, /vendor/lib, /system/lib]] 09-24 16:45:02.010 1325-1346/org.mozilla.geckoview_example W/System.err: at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:56) 09-24 16:45:02.010 1325-1346/org.mozilla.geckoview_example W/System.err: at java.lang.ClassLoader.loadClass(ClassLoader.java:511) 09-24 16:45:02.010 1325-1346/org.mozilla.geckoview_example W/System.err: at java.lang.ClassLoader.loadClass(ClassLoader.java:469) 09-24 16:45:02.010 1325-1346/org.mozilla.geckoview_example W/System.err: at org.mozilla.gecko.mozglue.GeckoLoader.nativeRun(Native Method) 09-24 16:45:02.011 1325-1346/org.mozilla.geckoview_example W/System.err: at org.mozilla.gecko.GeckoThread.run(GeckoThread.java:513) 09-24 16:45:02.011 1325-1346/org.mozilla.geckoview_example W/System.err: Suppressed: java.lang.ClassNotFoundException: org.mozilla.gecko.GeckoJavaSampler 09-24 16:45:02.011 1325-1346/org.mozilla.geckoview_example W/System.err: at java.lang.Class.classForName(Native Method) 09-24 16:45:02.011 1325-1346/org.mozilla.geckoview_example W/System.err: at java.lang.BootClassLoader.findClass(ClassLoader.java:781) 09-24 16:45:02.012 1325-1346/org.mozilla.geckoview_example W/System.err: at java.lang.BootClassLoader.loadClass(ClassLoader.java:841) 09-24 16:45:02.012 1325-1346/org.mozilla.geckoview_example W/System.err: at java.lang.ClassLoader.loadClass(ClassLoader.java:504) 09-24 16:45:02.012 1325-1346/org.mozilla.geckoview_example W/System.err: ... 3 more 09-24 16:45:02.012 1325-1346/org.mozilla.geckoview_example W/System.err: Caused by: java.lang.NoClassDefFoundError: Class not found using the boot class loader; no stack trace available
Reporter | ||
Comment 1•6 years ago
|
||
I was able to get to the same issue with ANRReporter after copying GeckoJavaSampler into geckoview, so both will need to be addressed.
Assignee | ||
Updated•6 years ago
|
Assignee: nobody → nchen
Status: NEW → ASSIGNED
Assignee | ||
Comment 2•6 years ago
|
||
Move GetClassGlobalRef in AndroidBridge to GetClassRef in jni/Utils. The new function now returns a local reference instead of a global reference.
Attachment #8795342 -
Flags: review?(snorp)
Assignee | ||
Comment 3•6 years ago
|
||
Add jni::IsFennec() that returns whether we're in a Fennec environment (defined as the presence of the GeckoApp class). Then, add jni::IsFennec() checks to places where we use JNI for Fennec-only classes.
Attachment #8795343 -
Flags: review?(snorp)
Assignee | ||
Comment 4•6 years ago
|
||
Distribution.getDistributionDirectories is currently annotated with @WrapForJNI, but because it's used from JS through JNI.jsm, the @JNITarget annotation is more appropriate.
Attachment #8795344 -
Flags: review?(snorp)
Attachment #8795342 -
Flags: review?(snorp) → review+
Attachment #8795343 -
Flags: review?(snorp) → review+
Attachment #8795344 -
Flags: review?(snorp) → review+
Pushed by nchen@mozilla.com: https://hg.mozilla.org/integration/mozilla-inbound/rev/105160f6218d 1. Move GetClassGlobalRef out of AndroidBridge; r=snorp https://hg.mozilla.org/integration/mozilla-inbound/rev/41f3ef358765 2. Add and use jni::IsFennec() for Fennec-only code; r=snorp https://hg.mozilla.org/integration/mozilla-inbound/rev/d700a47ef295 3. Use @JNITarget for Distribution.getDistributionDirectories; r=snorp
Pushed by nchen@mozilla.com: https://hg.mozilla.org/integration/mozilla-inbound/rev/a461830b4d2f Only enable Java profiling on Android; r=bustage on CLOSED TREE
Comment 7•6 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/105160f6218d https://hg.mozilla.org/mozilla-central/rev/41f3ef358765 https://hg.mozilla.org/mozilla-central/rev/d700a47ef295 https://hg.mozilla.org/mozilla-central/rev/a461830b4d2f
Status: ASSIGNED → RESOLVED
Closed: 6 years ago
status-firefox52:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → Firefox 52
Updated•4 years ago
|
Product: Firefox for Android → GeckoView
Updated•4 years ago
|
Target Milestone: Firefox 52 → mozilla52
You need to log in
before you can comment on or make changes to this bug.
Description
•