Note: There are a few cases of duplicates in user autocompletion which are being worked on.

Crash on about:home if tab title is not defined

VERIFIED FIXED in Firefox 11

Status

()

Firefox for Android
General
P2
critical
VERIFIED FIXED
6 years ago
6 years ago

People

(Reporter: lucasr, Assigned: lucasr)

Tracking

({crash, reproducible})

Trunk
Firefox 13
ARM
Android
crash, reproducible
Points:
---

Firefox Tracking Flags

(firefox11 fixed, firefox12 fixed, firefox13 verified, fennec+)

Details

(Whiteboard: [native-crash])

Attachments

(1 attachment)

(Assignee)

Description

6 years ago
01-30 14:38:45.974: ERROR/GeckoAboutHome(27190): error reading json file
01-30 14:38:45.974: ERROR/GeckoAboutHome(27190): org.json.JSONException: No value for title
01-30 14:38:45.974: ERROR/GeckoAboutHome(27190):     at org.json.JSONObject.get(JSONObject.java:354)
01-30 14:38:45.974: ERROR/GeckoAboutHome(27190):     at org.json.JSONObject.getString(JSONObject.java:510)
01-30 14:38:45.974: ERROR/GeckoAboutHome(27190):     at org.mozilla.gecko.AboutHomeContent.readLastTabs(AboutHomeContent.java:506)
01-30 14:38:45.974: ERROR/GeckoAboutHome(27190):     at org.mozilla.gecko.AboutHomeContent.access$400(AboutHomeContent.java:91)
01-30 14:38:45.974: ERROR/GeckoAboutHome(27190):     at org.mozilla.gecko.AboutHomeContent$5$2.run(AboutHomeContent.java:294)
01-30 14:38:45.974: ERROR/GeckoAboutHome(27190):     at android.os.Handler.handleCallback(Handler.java:587)
01-30 14:38:45.974: ERROR/GeckoAboutHome(27190):     at android.os.Handler.dispatchMessage(Handler.java:92)
01-30 14:38:45.974: ERROR/GeckoAboutHome(27190):     at android.os.Looper.loop(Looper.java:130)
01-30 14:38:45.974: ERROR/GeckoAboutHome(27190):     at org.mozilla.gecko.GeckoAppShell$LooperThread.run(GeckoAppShell.java:185)
01-30 14:38:45.974: ERROR/GeckoAboutHome(27190): error reading json file
01-30 14:38:45.974: ERROR/GeckoAboutHome(27190): org.json.JSONException: No value for title
01-30 14:38:45.974: ERROR/GeckoAboutHome(27190):     at org.json.JSONObject.get(JSONObject.java:354)
01-30 14:38:45.974: ERROR/GeckoAboutHome(27190):     at org.json.JSONObject.getString(JSONObject.java:510)
01-30 14:38:45.974: ERROR/GeckoAboutHome(27190):     at org.mozilla.gecko.AboutHomeContent.readLastTabs(AboutHomeContent.java:506)
01-30 14:38:45.974: ERROR/GeckoAboutHome(27190):     at org.mozilla.gecko.AboutHomeContent.access$400(AboutHomeContent.java:91)
01-30 14:38:45.974: ERROR/GeckoAboutHome(27190):     at org.mozilla.gecko.AboutHomeContent$5$2.run(AboutHomeContent.java:294)
01-30 14:38:45.974: ERROR/GeckoAboutHome(27190):     at android.os.Handler.handleCallback(Handler.java:587)
01-30 14:38:45.974: ERROR/GeckoAboutHome(27190):     at android.os.Handler.dispatchMessage(Handler.java:92)
01-30 14:38:45.974: ERROR/GeckoAboutHome(27190):     at android.os.Looper.loop(Looper.java:130)
01-30 14:38:45.974: ERROR/GeckoAboutHome(27190):     at org.mozilla.gecko.GeckoAppShell$LooperThread.run(GeckoAppShell.java:185)

Updated

6 years ago
Severity: normal → critical
Keywords: crash, reproducible
Hardware: All → ARM
Whiteboard: [native-crash]
(Assignee)

Comment 1

6 years ago
Created attachment 593039 [details] [diff] [review]
Fix crash on about:home when tab isn't present
Attachment #593039 - Flags: review?(mark.finkle)
Comment on attachment 593039 [details] [diff] [review]
Fix crash on about:home when tab isn't present

>-                title = entry.getString("title");
>                 url = entry.getString("url");
>+
>+                String optTitle = entry.optString("title");
>+                if (TextUtils.isEmpty(optTitle))
>+                    title = url;
>+                else
>+                    title = optTitle;


Why use "optTitle"? Can't you just use:

>                 title = entry.optString("title");
>+                if (TextUtils.isEmpty(title))
>+                    title = url;

r+, but drop optTitle if reasonable
Attachment #593039 - Flags: review?(mark.finkle) → review+
(Assignee)

Comment 3

6 years ago
Pushed: http://hg.mozilla.org/integration/mozilla-inbound/rev/2d01f8d3f6a8
(Assignee)

Comment 4

6 years ago
Comment on attachment 593039 [details] [diff] [review]
Fix crash on about:home when tab isn't present

Fixes a potential crash in about:home. Non-risky.
Attachment #593039 - Flags: approval-mozilla-aurora?

Updated

6 years ago
status-firefox12: --- → affected
status-firefox13: --- → affected
(Assignee)

Updated

6 years ago
Attachment #593039 - Flags: approval-mozilla-beta?

Updated

6 years ago
status-firefox11: --- → affected
tracking-fennec: --- → +
Priority: -- → P2

Comment 5

6 years ago
https://hg.mozilla.org/mozilla-central/rev/2d01f8d3f6a8
Status: NEW → RESOLVED
Last Resolved: 6 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 13

Updated

6 years ago
status-firefox13: affected → ---

Comment 6

6 years ago
Comment on attachment 593039 [details] [diff] [review]
Fix crash on about:home when tab isn't present

[Triage Comment]
Mobile only - approved for Aurora 12 and Beta 11.
Attachment #593039 - Flags: approval-mozilla-beta?
Attachment #593039 - Flags: approval-mozilla-beta+
Attachment #593039 - Flags: approval-mozilla-aurora?
Attachment #593039 - Flags: approval-mozilla-aurora+
https://hg.mozilla.org/releases/mozilla-aurora/rev/4e7107d35192
status-firefox12: affected → fixed
status-firefox13: --- → fixed
https://hg.mozilla.org/releases/mozilla-beta/rev/66bf4724d9bc
status-firefox11: affected → fixed
Verified fixed on:

Firefox 13.0a1 (2012-02-28)
20120228031102
http://hg.mozilla.org/mozilla-central/rev/7ce4d9b55863

--
Device: Samsung Galaxy S2
OS: Android 2.3.4
Status: RESOLVED → VERIFIED
status-firefox13: fixed → verified
You need to log in before you can comment on or make changes to this bug.