Closed Bug 864339 Opened 11 years ago Closed 11 years ago

Crash on 'New Private Tab' @ org.mozilla.gecko.mozglue.NativeZip.createInputStream(NativeZip.java:71)

Categories

(Firefox for Android Graveyard :: General, defect)

23 Branch
ARM
Android
defect
Not set
critical

Tracking

(firefox22 unaffected, firefox23+ verified, fennec23+)

RESOLVED FIXED
Firefox 23
Tracking Status
firefox22 --- unaffected
firefox23 + verified
fennec 23+ ---

People

(Reporter: aaronmt, Assigned: cpeterson)

References

Details

(4 keywords, Whiteboard: [native-crash])

Crash Data

Attachments

(2 files)

E/GeckoAppShell( 9698): >>> REPORTING UNCAUGHT EXCEPTION FROM THREAD 512 ("GeckoBackgroundThread")
E/GeckoAppShell( 9698): java.lang.IllegalArgumentException: Got compression 8, but expected 0 (STORE)!
E/GeckoAppShell( 9698): 	at org.mozilla.gecko.mozglue.NativeZip.createInputStream(NativeZip.java:71)
E/GeckoAppShell( 9698): 	at org.mozilla.gecko.mozglue.NativeZip._getInputStream(Native Method)
E/GeckoAppShell( 9698): 	at org.mozilla.gecko.mozglue.NativeZip.getInputStream(NativeZip.java:61)
E/GeckoAppShell( 9698): 	at org.mozilla.gecko.util.GeckoJarReader.getStream(GeckoJarReader.java:114)
E/GeckoAppShell( 9698): 	at org.mozilla.gecko.util.GeckoJarReader.getBitmapDrawable(GeckoJarReader.java:44)
E/GeckoAppShell( 9698): 	at org.mozilla.gecko.util.GeckoJarReader.getBitmap(GeckoJarReader.java:31)
E/GeckoAppShell( 9698): 	at org.mozilla.gecko.Favicons$LoadFaviconTask.downloadFavicon(Favicons.java:271)
E/GeckoAppShell( 9698): 	at org.mozilla.gecko.Favicons$LoadFaviconTask.doInBackground(Favicons.java:364)
E/GeckoAppShell( 9698): 	at org.mozilla.gecko.Favicons$LoadFaviconTask.doInBackground(Favicons.java:230)
E/GeckoAppShell( 9698): 	at org.mozilla.gecko.util.UiAsyncTask$BackgroundTaskRunnable.run(UiAsyncTask.java:48)
E/GeckoAppShell( 9698): 	at android.os.Handler.handleCallback(Handler.java:725)
E/GeckoAppShell( 9698): 	at android.os.Handler.dispatchMessage(Handler.java:92)
E/GeckoAppShell( 9698): 	at android.os.Looper.loop(Looper.java:137)
E/GeckoAppShell( 9698): 	at org.mozilla.gecko.util.GeckoBackgroundThread.run(GeckoBackgroundThread.java:32)

STR: Open a 'New Private Tab'

bp-9c146cdd-fcac-4ec7-8b64-a31422130422

--
Nightly (04/22)
LG Nexus 4 (Android 4.2.2)
tracking-fennec: --- → ?
Regression from bug 849589?
Blocks: 849589
What landed for bug 849589 was not a fix, but sort of diagnostics, so this is actually the same bug, but with a different message, hopefully more helpful.
Status: NEW → RESOLVED
Closed: 11 years ago
Resolution: --- → DUPLICATE
So, it appears it is not exactly the same thing ; that is, that bug 849589 did add a crashing case that didn't exist before.
Status: RESOLVED → REOPENED
Resolution: DUPLICATE → ---
This is blocking any testing of private browsing on Nightly for both QA and end-users.
Assigning to Chris, as the bug 849589 patch is his.
Assignee: nobody → cpeterson
Add InflaterInputStream support back to NativeZip.createInputStream().
Attachment #741082 - Flags: review?(mh+mozilla)
Part 2: Replace GeckoJarReader EmptyStackException with an empty() check. Exceptions have a small performance overhead, plus we can easily avoid triggering and catching this EmptyStackException.
Attachment #741086 - Flags: review?(wjohnston)
I was not able to reproduce this private browsing exception with my local builds, even though I could with Nightly builds. But I *was* able to reproduce it locally after I switched my local builds from using the "unofficial" (Fennec) branding to the "nightly" branding resources!

So there seems to be some jar difference between mobile/android/branding/nightly/content/favicon32.png and mobile/android/branding/unofficial/content/favicon32.png.

Some logcat:

  downloadFavicon: jar:jar:file:///data/app/org.mozilla.fennec_cpeterson-2.apk!/omni.ja!/chrome/chrome/content/branding/favicon32.png
  getStream: filename=omni.ja
  getStream: filename=chrome/chrome/content/branding/favicon32.png

which triggers the "Unexpected compression: 8" exception from NativeZip.createInputStream().
(In reply to Chris Peterson (:cpeterson) from comment #10)
> I was not able to reproduce this private browsing exception with my local
> builds, even though I could with Nightly builds. But I *was* able to
> reproduce it locally after I switched my local builds from using the
> "unofficial" (Fennec) branding to the "nightly" branding resources!
> 
> So there seems to be some jar difference between
> mobile/android/branding/nightly/content/favicon32.png and
> mobile/android/branding/unofficial/content/favicon32.png.
> 
> Some logcat:
> 
>   downloadFavicon:
> jar:jar:file:///data/app/org.mozilla.fennec_cpeterson-2.apk!/omni.ja!/chrome/
> chrome/content/branding/favicon32.png
>   getStream: filename=omni.ja
>   getStream: filename=chrome/chrome/content/branding/favicon32.png
> 
> which triggers the "Unexpected compression: 8" exception from
> NativeZip.createInputStream().

Ah, that makes sense. Reading the file would get an input stream, wouldn't it? That is supposed to be supported. What is not is using the (deflated) input stream again as a zip.
Attachment #741082 - Flags: review?(mh+mozilla) → review+
Status: NEW → ASSIGNED
Patch 1 of 2:
https://hg.mozilla.org/integration/mozilla-inbound/rev/d7a0a407d1ce
Whiteboard: [native-crash] → [native-crash], [leave-open]
tracking-fennec: ? → 23+
Comment on attachment 741086 [details] [diff] [review]
part-2-remove-EmptyStackException.patch

Review of attachment 741086 [details] [diff] [review]:
-----------------------------------------------------------------

I don't really like using a try-catch to wallpaper this.
Attachment #741086 - Flags: review?(wjohnston) → review-
Comment on attachment 741086 [details] [diff] [review]
part-2-remove-EmptyStackException.patch

Review of attachment 741086 [details] [diff] [review]:
-----------------------------------------------------------------

Oh wait. This isn't what I thought it was. Apologies!
Attachment #741086 - Flags: review- → review+
https://hg.mozilla.org/integration/mozilla-inbound/rev/30bc2a74313c
Whiteboard: [native-crash], [leave-open] → [native-crash]
https://hg.mozilla.org/mozilla-central/rev/30bc2a74313c
Status: ASSIGNED → RESOLVED
Closed: 11 years ago11 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 23
Product: Firefox for Android → Firefox for Android Graveyard
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: