Closed Bug 1824549 Opened 3 years ago Closed 3 years ago

Firefox completely crashes when trying to drag in files from Windows Explorer or pasting a link in to Firefox

Categories

(Core :: DOM: Copy & Paste and Drag & Drop, defect)

Firefox 111
defect

Tracking

()

RESOLVED WORKSFORME

People

(Reporter: feedmetrashpeasants, Unassigned)

Details

Crash Data

User Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:109.0) Gecko/20100101 Firefox/110.0

Steps to reproduce:

Drag and drop a file from windows explorer into Firefox.
Copy and paste a link within Firefox to another tab in Firefox.

Actual results:

Firefox completely closes and shows a crash pop-up to restart Firefox. No crash log is ever generated.

Expected results:

No crashing/closing.

Extra Note: The only solution I have found for this issue was to revert from Ver 111 to Ver 110 where the issue no longer happens.

The Bugbug bot thinks this bug should belong to the 'Core::DOM: Copy & Paste and Drag & Drop' component, and is moving the bug to that component. Please correct in case you think the bot is wrong.

Component: Untriaged → DOM: Copy & Paste and Drag & Drop
Product: Firefox → Core

UPDATE: I manage to find a Crash ID if that will be needed for this.

What would be an "incomplete crash"? :)

UPDATE: I manage to find a Crash ID if that will be needed for this.

Then please share the Crash ID.

Flags: needinfo?(feedmetrashpeasants)

I mean completely crashes in a sense that it just closes itself instead of going to "Not Responding"

What would be an "incomplete crash"? :)

bp-30a72faa-00e8-4d30-a376-327410230325
This is the Crash ID that I eventually found when I tried Drag-and-Dropping and Copy & Pasting again after trying to do a Firefox Refresh and receiving the same result of Firefox closing itself completely.

Then please share the Crash ID.

Flags: needinfo?(feedmetrashpeasants)

I mean completely crashes in a sense that it just closes itself instead of going to "Not Responding"

Then you do not experience a crash but a hang.

Crash Signature: [@ nsLinebreakHelpers::ConvertPlatformToDOMLinebreaks]

The bug has a crash signature, thus the bug will be considered confirmed.

Status: UNCONFIRMED → NEW
Ever confirmed: true

The crash signature indicates a bad write when converting the line breaks in the incoming data. The exact line number reported is no useful. Chances are that the bug is in inlined code.

The code involved is pretty bad. It assumes it can cast a pointer to bytes to a char16_t*. That's generally UB, but the pointer seems to come from malloc always, so that's probably not it.

In general, the line break conversion code could use a rewrite with more modern and safer style.

Edgar, does anything stand out to you as the cause of the crash?

Flags: needinfo?(echen)

Bug 1776879 touched the relevant code recently and it matches the version that the crash occurred on. But I have no idea how crash occur.

Elfie, does this crash also occur in Nightly on your system, and can you consistently reproduce it? It would be very helpful if you could run mozregression to get the regression window. Thank you!

Flags: needinfo?(echen) → needinfo?(feedmetrashpeasants)

(In reply to Edgar Chen [:edgar] from comment #9)

Bug 1776879 touched the relevant code recently and it matches the version that the crash occurred on. But I have no idea how crash occur.

Elfie, does this crash also occur in Nightly on your system, and can you consistently reproduce it? It would be very helpful if you could run mozregression to get the regression window. Thank you!

I am not sure if I am able to reproduce it as my fix was to revert back to update 110, I eventually reinstalled 111 and the issue seemed to have been resolved after some attempts to reproduce, I'm not sure if it was just a bad install on my side. Unfortunately I'm not the best with programming and I'm just a client for Firefox, I wanted to make the bug report due to the only viable way I was able to fix the issue and Firefox directed me to Bugzilla to make the report. Apologies if this caused any confusion.

Flags: needinfo?(feedmetrashpeasants)

I'll leave this open in case more crashes show up with the same signature, but right now there isn't much we can do to investigate. However, this area of code could use a modern rewrite in any case.

Severity: -- → S4

Closing because no crashes reported for 12 weeks.

Status: NEW → RESOLVED
Closed: 3 years ago
Resolution: --- → WORKSFORME
You need to log in before you can comment on or make changes to this bug.