Closed Bug 972058 Opened 10 years ago Closed 3 years ago

Disable strictmode warnings during known violations

Categories

(Firefox for Android Graveyard :: General, defect)

All
Android
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED INCOMPLETE

People

(Reporter: rnewman, Unassigned, Mentored)

References

Details

(Whiteboard: [lang=java])

+++ This bug was initially created as a clone of Bug #966100 +++

Dumping stuff to the console takes time, and it's a misleading warning.

 StrictMode policy violation; ~duration=30 ms: android.os.StrictMode$StrictModeDiskReadViolation: policy=31 violation=2
 	at android.os.StrictMode$AndroidBlockGuardPolicy.onReadFromDisk(StrictMode.java:1135)
 	at libcore.io.BlockGuardOs.open(BlockGuardOs.java:106)
 	at libcore.io.IoBridge.open(IoBridge.java:400)
 	at java.io.FileInputStream.<init>(FileInputStream.java:78)
 	at java.io.FileInputStream.<init>(FileInputStream.java:105)
 	at org.mozilla.gecko.util.HardwareUtils.getMemSize(HardwareUtils.java:162)
 	at org.mozilla.gecko.GeckoAppShell.getScreenDepth(GeckoAppShell.java:1407)
 	at org.mozilla.gecko.BrowserApp.onCreate(BrowserApp.java:605)
 	at android.app.Activity.performCreate(Activity.java:5058)
 	at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1079)
 	at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2079)
 	at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2153)
 	at android.app.ActivityThread.access$700(ActivityThread.java:137)
 	at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1246)
 	at android.os.Handler.dispatchMessage(Handler.java:99)
 	at android.os.Looper.loop(Looper.java:137)
 	at android.app.ActivityThread.main(ActivityThread.java:5031)
 	at java.lang.reflect.Method.invokeNative(Native Method)
 	at java.lang.reflect.Method.invoke(Method.java:511)
 	at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:792)
 	at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:555)
 	at dalvik.system.NativeStart.main(Native Method)
 StrictMode policy violation; ~duration=24 ms: android.os.StrictMode$StrictModeDiskReadViolation: policy=31 violation=2
 	at android.os.StrictMode$AndroidBlockGuardPolicy.onReadFromDisk(StrictMode.java:1135)
 	at libcore.io.BlockGuardOs.open(BlockGuardOs.java:106)
 	at libcore.io.IoBridge.open(IoBridge.java:400)
 	at java.io.FileInputStream.<init>(FileInputStream.java:78)
 	at java.io.FileReader.<init>(FileReader.java:42)
 	at org.mozilla.gecko.GeckoProfile.readFile(GeckoProfile.java:406)
 	at org.mozilla.gecko.GeckoProfile.readSessionFile(GeckoProfile.java:388)
 	at org.mozilla.gecko.GeckoApp.restoreSessionTabs(GeckoApp.java:1626)
 	at org.mozilla.gecko.GeckoApp.onWindowFocusChanged(GeckoApp.java:1976)
 	at com.android.internal.policy.impl.PhoneWindow$DecorView.onWindowFocusChanged(PhoneWindow.java:2445)
 	at android.view.View.dispatchWindowFocusChanged(View.java:7328)
 	at android.view.ViewGroup.dispatchWindowFocusChanged(ViewGroup.java:939)
 	at android.view.ViewRootImpl$ViewRootHandler.handleMessage(ViewRootImpl.java:2979)
 	at android.os.Handler.dispatchMessage(Handler.java:99)
 	at android.os.Looper.loop(Looper.java:137)
 	at android.app.ActivityThread.main(ActivityThread.java:5031)
 	at java.lang.reflect.Method.invokeNative(Native Method)
 	at java.lang.reflect.Method.invoke(Method.java:511)
 	at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:792)
 	at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:555)
 	at dalvik.system.NativeStart.main(Native Method)
Do we only use Strict mode for local developer builds?
http://mxr.mozilla.org/mozilla-central/source/mobile/android/base/GeckoApp.java#1129

Does that check do more than local developer builds?
I see StrictMode violations when launching Nightly and Aurora, installed via official channels.
(In reply to Richard Newman [:rnewman] from comment #3)
> I see StrictMode violations when launching Nightly and Aurora, installed via
> official channels.

That makes me think the "default" channel is the wrong trigger to use.
Perhaps the problem is that we *enable* strict mode for local builds... but we don't turn it off for the others. And it's on by default.
Wait, I might have mis-spoken. I can't check Aurora right now because it crashes on startup (x86).
Aurora is affected, and its updateChannel is "default" according to FHR.
Depends on: 972152
Taking this out of the good-first-bug pool because of dependencies / unclear resolution.
Whiteboard: [mentor=rnewman][lang=java][good first bug] → [mentor=rnewman][lang=java]
Mentor: rnewman
Whiteboard: [mentor=rnewman][lang=java] → [lang=java]
We have completed our launch of our new Firefox on Android. The development of the new versions use GitHub for issue tracking. If the bug report still reproduces in a current version of [Firefox on Android nightly](https://play.google.com/store/apps/details?id=org.mozilla.fenix) an issue can be reported at the [Fenix GitHub project](https://github.com/mozilla-mobile/fenix/). If you want to discuss your report please use [Mozilla's chat](https://wiki.mozilla.org/Matrix#Connect_to_Matrix) server https://chat.mozilla.org and join the [#fenix](https://chat.mozilla.org/#/room/#fenix:mozilla.org) channel.
Status: NEW → RESOLVED
Closed: 3 years ago
Resolution: --- → INCOMPLETE
Product: Firefox for Android → Firefox for Android Graveyard
You need to log in before you can comment on or make changes to this bug.