The default bug view has changed. See this FAQ.

java.lang.NullPointerException: at org.mozilla.gecko.Favicons.cancelFaviconLoad(Favicons.java)

RESOLVED FIXED in Firefox 15

Status

()

Firefox for Android
General
--
critical
RESOLVED FIXED
5 years ago
5 years ago

People

(Reporter: Scoobidiver (away), Assigned: bnicholson)

Tracking

({crash})

14 Branch
Firefox 16
ARM
Android
crash
Points:
---

Firefox Tracking Flags

(firefox15 fixed)

Details

(Whiteboard: [native-crash][14.0b2], crash signature)

Attachments

(1 attachment)

(Reporter)

Description

5 years ago
There are 3 crashes in 14.0 Beta, the latest one is: bp-919a8a6a-47e1-4f6c-ab65-53ed52120519.

java.lang.NullPointerException
	at org.mozilla.gecko.Favicons.cancelFaviconLoad(Favicons.java:207)
	at org.mozilla.gecko.GeckoApp.maybeCancelFaviconLoad(GeckoApp.java:600)
	at org.mozilla.gecko.GeckoApp.loadFavicon(GeckoApp.java:607)
	at org.mozilla.gecko.GeckoApp.access$000(GeckoApp.java:98)
	at org.mozilla.gecko.GeckoApp$7.run(GeckoApp.java:734)
	at android.os.Handler.handleCallback(Handler.java:587)
	at android.os.Handler.dispatchMessage(Handler.java:92)
	at android.os.Looper.loop(Looper.java:150)
	at android.app.ActivityThread.main(ActivityThread.java:4293)
	at java.lang.reflect.Method.invokeNative(Native Method)
	at java.lang.reflect.Method.invoke(Method.java:507)
	at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:849)
	at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:607)
	at dalvik.system.NativeStart.main(Native Method)

More reports at:
https://crash-stats.mozilla.com/report/list?signature=java.lang.NullPointerException%3A+at+org.mozilla.gecko.Favicons.cancelFaviconLoad%28Favicons.java%29
(Reporter)

Updated

5 years ago
Crash Signature: [@ java.lang.NullPointerException: at org.mozilla.gecko.Favicons.cancelFaviconLoad(Favicons.java)] → [@ java.lang.NullPointerException: at org.mozilla.gecko.Favicons.cancelFaviconLoad(Favicons.java) ]
(Assignee)

Comment 1

5 years ago
Created attachment 631095 [details] [diff] [review]
synchronize accesses to mLoadTasks

The favicon task is likely getting removed between
    if (!mLoadTasks.containsKey(taskId))
and
    LoadFaviconTask task = mLoadTasks.get(taskId);
causing a NPE when calling task.cancel().
Assignee: nobody → bnicholson
Attachment #631095 - Flags: review?(blassey.bugs)
(Assignee)

Comment 2

5 years ago
On a related note, what is the synchronized block here accomplishing?

        public LoadFaviconTask(String pageUrl, String faviconUrl, OnFaviconLoadedListener listener) {
            synchronized(this) {
                mId = ++mNextFaviconLoadId;
            }
            ...
        }

The "this" is an AsyncTask, so this code seems wrong.
Attachment #631095 - Flags: review?(blassey.bugs) → review+
(Assignee)

Comment 3

5 years ago
http://hg.mozilla.org/integration/mozilla-inbound/rev/c0afa3c27907
(In reply to Brian Nicholson (:bnicholson) from comment #2)
> On a related note, what is the synchronized block here accomplishing?
> 
>         public LoadFaviconTask(String pageUrl, String faviconUrl,
> OnFaviconLoadedListener listener) {
>             synchronized(this) {
>                 mId = ++mNextFaviconLoadId;
>             }
>             ...
>         }
> 
> The "this" is an AsyncTask, so this code seems wrong.

Yeah, looks like a thinko, feel free to fix it.
https://hg.mozilla.org/mozilla-central/rev/c0afa3c27907

(Merged by Ed Morley)
Status: NEW → RESOLVED
Last Resolved: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 16
(Assignee)

Comment 6

5 years ago
Comment on attachment 631095 [details] [diff] [review]
synchronize accesses to mLoadTasks

[Approval Request Comment]
Bug caused by (feature/regressing bug #): 
User impact if declined: small chance of crashing
Testing completed (on m-c, etc.): 1 week m-c
Risk to taking this patch (and alternatives if risky): low risk
String or UUID changes made by this patch: none
Attachment #631095 - Flags: approval-mozilla-aurora?

Comment 7

5 years ago
Comment on attachment 631095 [details] [diff] [review]
synchronize accesses to mLoadTasks

[Triage Comment]
Low risk crash fix - given where we are in the cycle, approving for Aurora 15.
Attachment #631095 - Flags: approval-mozilla-aurora? → approval-mozilla-aurora+
(Reporter)

Updated

5 years ago
status-firefox15: --- → affected
(Assignee)

Comment 8

5 years ago
http://hg.mozilla.org/releases/mozilla-aurora/rev/26d6082c7e2c
status-firefox15: affected → fixed
You need to log in before you can comment on or make changes to this bug.