Closed Bug 1963956 Opened 19 days ago Closed 13 days ago

Crash in [@ nsIWidget::Destroyed]

Categories

(GeckoView :: General, defect)

Unspecified
Android
defect

Tracking

(firefox138 wontfix, firefox139 verified, firefox140 verified)

VERIFIED FIXED
140 Branch
Tracking Status
firefox138 --- wontfix
firefox139 --- verified
firefox140 --- verified

People

(Reporter: m_kato, Assigned: m_kato)

Details

(Keywords: crash)

Crash Data

Attachments

(1 file)

When I added a check whether window is destroyed by bug 1957566, I found new issue that GeckoViewStreamListener doesn't have valid window. (I guess we should abort this stream due no valid window.

Crash report: https://crash-stats.mozilla.org/report/index/e0e9c19a-ba01-4846-be82-89ce50250430

Reason:

SIGSEGV / SEGV_MAPERR

Top 10 frames:

0  libxul.so  nsIWidget::Destroyed() const  widget/nsIWidget.h:512
0  libxul.so  nsWindow::PassExternalResponse(mozilla::jni::Ref<mozilla::java::WebResponse, ...  widget/android/nsWindow.cpp:2964
1  libxul.so  mozilla::GeckoViewStreamListener::HandleWebResponse(nsIRequest*)  mobile/android/components/geckoview/GeckoViewStreamListener.cpp:252
2  libxul.so  mozilla::GeckoViewStreamListener::OnStartRequest(nsIRequest*)  mobile/android/components/geckoview/GeckoViewStreamListener.cpp:97
3  libxul.so  nsDocumentOpenInfo::OnStartRequest(nsIRequest*)  uriloader/base/nsURILoader.cpp:193
4  libxul.so  mozilla::net::ParentProcessDocumentOpenInfo::OnDocumentStartRequest(nsIRequest*)  netwerk/ipc/DocumentLoadListener.cpp:326
4  libxul.so  mozilla::net::ParentProcessDocumentOpenInfo::OnStartRequest(nsIRequest*)  netwerk/ipc/DocumentLoadListener.cpp:368
5  libxul.so  nsBaseChannel::OnStartRequest(nsIRequest*)  netwerk/base/nsBaseChannel.cpp:808
6  libxul.so  nsInputStreamPump::OnStateStart()  netwerk/base/nsInputStreamPump.cpp:504
6  libxul.so  nsInputStreamPump::OnInputStreamReady(nsIAsyncInputStream*)  netwerk/base/nsInputStreamPump.cpp:409

When I added a check whether window is destroyed by bug 1957566, I found
new issue that GeckoViewStreamListener doesn't have valid window.

I think we should abort this stream due no valid window.

Pushed by m_kato@ga2.so-net.ne.jp: https://hg.mozilla.org/integration/autoland/rev/e82f0dce5027 Check valid window when creating GeckoView's StreamListener. r=geckoview-reviewers,nika
Status: NEW → RESOLVED
Closed: 13 days ago
Resolution: --- → FIXED
Target Milestone: --- → 140 Branch

Please nominate this for Beta uplift when you get a chance.

Flags: needinfo?(m_kato)

Comment on attachment 9484995 [details]
Bug 1963956 - Check valid window when creating GeckoView's StreamListener. r=#geckoview-reviewers

Beta/Release Uplift Approval Request

  • User impact if declined/Reason for urgency: Firefox crashes if window is nothing when starting download file, accessing icon from browser, or etc
  • Is this code covered by automated tests?: No
  • Has the fix been verified in Nightly?: Yes
  • Needs manual test from QE?: No
  • If yes, steps to reproduce:
  • List of other uplifts needed: None
  • Risk to taking this patch: Low
  • Why is the change risky/not risky? (and alternatives if risky): Low. check window is valid.
  • String changes made/needed: N/A
  • Is Android affected?: Yes
Flags: needinfo?(m_kato)
Attachment #9484995 - Flags: approval-mozilla-beta?

Comment on attachment 9484995 [details]
Bug 1963956 - Check valid window when creating GeckoView's StreamListener. r=#geckoview-reviewers

Approved for 139.0b9.

Attachment #9484995 - Flags: approval-mozilla-beta? → approval-mozilla-beta+

No crash encountered when downloading several files on Firefox for Android Nightly 140 (2025-05-18) and Firefox for Android 139 beta 10 using Samsung S24 Ultra (Android 14) and Google Pixel 8 (Android 15).

Status: RESOLVED → VERIFIED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: