Tab crash after drag-and-dropping and reading nested folder structure
Categories
(Core :: DOM: File, defect)
Tracking
()
People
(Reporter: kimbatt16, Assigned: jari)
References
(Blocks 1 open bug)
Details
(Keywords: regression, topcrash, webcompat:platform-bug, Whiteboard: [adv-esr140.10.2-][adv-esr115.35.2-])
Crash Data
Attachments
(7 files)
|
252.71 KB,
video/webm
|
Details | |
|
997 bytes,
text/html
|
Details | |
|
48 bytes,
text/x-phabricator-request
|
Details | Review | |
|
48 bytes,
text/x-phabricator-request
|
phab-bot
:
approval-mozilla-beta+
|
Details | Review |
|
48 bytes,
text/x-phabricator-request
|
phab-bot
:
approval-mozilla-esr115+
|
Details | Review |
|
48 bytes,
text/x-phabricator-request
|
phab-bot
:
approval-mozilla-esr140+
|
Details | Review |
|
48 bytes,
text/x-phabricator-request
|
phab-bot
:
approval-mozilla-release+
|
Details | Review |
User Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:150.0) Gecko/20100101 Firefox/150.0
Steps to reproduce:
A tab can be crashed by drag-and-dropping a specific folder structure, and trying to recursively list their sub-folders.
This crash happens on windows, when dragging a folder from windows explorer. (Might also happen in other cases)
Note that this doesn't crash the entire browser, only the affected tab.
I'm using windows 10, and firefox developer edition 150.0b7
To reproduce, add this javascript code to a webpage:
window.addEventListener("dragover", ev => ev.preventDefault());
window.addEventListener("drop", async ev => {
ev.preventDefault();
const { dataTransfer } = ev;
if (dataTransfer === null) {
return;
}
/** @type {FileSystemEntry[]} */
const queue = [];
for (const item of dataTransfer.items) {
const entry = item.webkitGetAsEntry();
if (entry !== null) {
queue.push(entry);
}
}
while (queue.length > 0) {
const entry = queue.pop();
if (entry.isDirectory) {
/** @type {FileSystemDirectoryEntry} */
const folder = entry;
const reader = folder.createReader();
/** @type {FileSystemEntry[]} */
const entries = await new Promise(res => {
reader.readEntries(res);
});
if (entries !== null) {
queue.push(...entries);
}
}
}
});
Then drop a folder onto the page, which has at least one sub-folder. For example:
drop this
└─── test
(the drop this folder has a test sub-folder)
After dropping the folder, the tab crashes after reaching the reader.readEntries line for the second time.
Actual results:
The tab crashed.
Expected results:
The tab should not crash.
Comment 1•28 days ago
|
||
Confirmed crash on Nightly : https://crash-stats.mozilla.org/report/index/20364201-87f8-4bea-b891-640a50260409
Updated•28 days ago
|
Comment 2•28 days ago
|
||
Open the testcase and drag-and-drop a nested folder onto it.
Comment 3•28 days ago
|
||
The bug is linked to a topcrash signature, which matches the following criterion:
- Top 10 desktop browser crashes on nightly
For more information, please visit BugBot documentation.
| Assignee | ||
Comment 4•24 days ago
|
||
Thank you for the excellent report!
| Assignee | ||
Comment 5•24 days ago
|
||
Updated•24 days ago
|
Comment 6•23 days ago
|
||
I'll call this S2 because it is at least one piece of a top crash.
Comment 8•17 days ago
|
||
| bugherder | ||
Updated•16 days ago
|
| Assignee | ||
Comment 9•16 days ago
|
||
Original Revision: https://phabricator.services.mozilla.com/D293871
Updated•16 days ago
|
Comment 10•16 days ago
|
||
firefox-beta Uplift Approval Request
- User impact if declined/Reason for urgency: Fixes a top crasher: prevents users from dragging and dropping folders on Windows.
- Code covered by automated testing?: yes
- Fix verified in Nightly?: yes
- Needs manual QE testing?: yes
- Steps to reproduce for manual QE testing: 1. Create a upper folder, which contains a lower folder, which contains some file (content doesn't matter.)
- Use google drive, youtube upload etc. where you can drag-and-drop file system items to a browser window. The site should be such that it keeps inventory locally. This can be checked from devtools storage panel - it should show something under IDB/indexedDB menu.
- Drag and drop the upper folder to the appropriate drop target.
- Expected: The content gets loaded appropriately
- Without the fix: The tab will crash
- Risk associated with taking this patch: low
- Explanation of risk level: This is easy to validate and it's a small, well-localized fix.
- String changes made/needed?: -
- Is Android affected?: yes
Comment 11•16 days ago
|
||
Updated the affected versions based on the regressor
:jari, is this a nightly only crash due to asserts? Wondering why we don't see it in beta for Fx150?
Updated•15 days ago
|
Updated•15 days ago
|
Comment 12•15 days ago
|
||
| uplift | ||
| Assignee | ||
Comment 13•15 days ago
|
||
(In reply to Donal Meehan [:dmeehan] from comment #11)
Updated the affected versions based on the regressor
:jari, is this a nightly only crash due to asserts? Wondering why we don't see it in beta for Fx150?
No this is an IPC_FAIL response which will crash the tab and impacts popular sites under particular conditions. If I read it correctly, the regressor is in 150 and this fix is strictly necessary.
Updated•15 days ago
|
Comment 14•15 days ago
|
||
I was able to reproduce the tab crash on Win11x64 using Firefox build 150.0(20260415192539) and steps from comment #10.
Verified as fixed on Win11x64 using Firefox build 152.0a1(20260421211246).
Waiting for next Beta to check in the fix.
Comment 15•15 days ago
|
||
(In reply to Jari Jalkanen [:jari] from comment #13)
(In reply to Donal Meehan [:dmeehan] from comment #11)
Updated the affected versions based on the regressor
:jari, is this a nightly only crash due to asserts? Wondering why we don't see it in beta for Fx150?No this is an IPC_FAIL response which will crash the tab and impacts popular sites under particular conditions. If I read it correctly, the regressor is in 150 and this fix is strictly necessary.
We're not seeing any crash volume outside of nightly. This would also need uplift requests for release and ESR115/ESR140
Comment 16•14 days ago
|
||
Verified as fixed on Win11x64/Mac15.5/Ubuntu 24.04 using Firefox build 151.0b1(20260422120759).
Comment 18•9 days ago
|
||
:jari did you want to uplift this for next weeks dot release (desktop+esr)? I did see it mentioned in reddit just not sure if it is the same thing
Comment 19•7 days ago
|
||
firefox-esr115 Uplift Approval Request
- User impact if declined/Reason for urgency: Fixes a windows crasher: prevents users from dragging and dropping folders on Windows.
NB: Replicating the beta uplift request modulo not calling this a top crasher because comment 15 said reported crashes were only experienced on nightly. I am requesting esr115 since bug 2022276 was uplifted there as well.
- Code covered by automated testing?: yes
- Fix verified in Nightly?: yes
- Needs manual QE testing?: yes
- Steps to reproduce for manual QE testing: 1. Create a upper folder, which contains a lower folder, which contains some file (content doesn't matter.)
- Use google drive, youtube upload etc. where you can drag-and-drop file system items to a browser window. The site should be such that it keeps inventory locally. This can be checked from devtools storage panel - it should show something under IDB/indexedDB menu.
- Drag and drop the upper folder to the appropriate drop target.
- Expected: The content gets loaded appropriately
- Without the fix: The tab will crash
- Risk associated with taking this patch: low
- Explanation of risk level: This is easy to validate and it's a small, well-localized fix.
- String changes made/needed?: -
- Is Android affected?: yes
Comment 20•7 days ago
|
||
Original Revision: https://phabricator.services.mozilla.com/D293871
Comment 21•7 days ago
|
||
Original Revision: https://phabricator.services.mozilla.com/D293871
Updated•7 days ago
|
Comment 22•7 days ago
|
||
firefox-esr140 Uplift Approval Request
- User impact if declined/Reason for urgency: Fixes a windows crasher: prevents users from dragging and dropping folders on Windows.
NB: Replicating the beta uplift request modulo not calling this a top crasher because comment 15 said reported crashes were only experienced on nightly. I am requesting esr115 since bug 2022276 was uplifted there as well.
- Code covered by automated testing?: yes
- Fix verified in Nightly?: yes
- Needs manual QE testing?: yes
- Steps to reproduce for manual QE testing: 1. Create a upper folder, which contains a lower folder, which contains some file (content doesn't matter.)
- Use google drive, youtube upload etc. where you can drag-and-drop file system items to a browser window. The site should be such that it keeps inventory locally. This can be checked from devtools storage panel - it should show something under IDB/indexedDB menu.
- Drag and drop the upper folder to the appropriate drop target.
- Expected: The content gets loaded appropriately
- Without the fix: The tab will crash
- Risk associated with taking this patch: low
- Explanation of risk level: This is easy to validate and it's a small, well-localized fix.
- String changes made/needed?: -
- Is Android affected?: yes
Comment 23•7 days ago
|
||
Original Revision: https://phabricator.services.mozilla.com/D293871
Updated•7 days ago
|
Comment 24•7 days ago
|
||
firefox-release Uplift Approval Request
- User impact if declined/Reason for urgency: Fixes a windows crasher: prevents users from dragging and dropping folders on Windows.
NB: Replicating the beta uplift request modulo not calling this a top crasher because comment 15 said reported crashes were only experienced on nightly. I am requesting esr115 since bug 2022276 was uplifted there as well.
- Code covered by automated testing?: yes
- Fix verified in Nightly?: yes
- Needs manual QE testing?: yes
- Steps to reproduce for manual QE testing: 1. Create a upper folder, which contains a lower folder, which contains some file (content doesn't matter.)
- Use google drive, youtube upload etc. where you can drag-and-drop file system items to a browser window. The site should be such that it keeps inventory locally. This can be checked from devtools storage panel - it should show something under IDB/indexedDB menu.
- Drag and drop the upper folder to the appropriate drop target.
- Expected: The content gets loaded appropriately
- Without the fix: The tab will crash
- Risk associated with taking this patch: low
- Explanation of risk level: This is easy to validate and it's a small, well-localized fix.
- String changes made/needed?: -
- Is Android affected?: yes
Updated•7 days ago
|
Updated•7 days ago
|
Comment 25•7 days ago
|
||
| uplift | ||
Updated•7 days ago
|
Comment 29•7 days ago
|
||
I was able to verify the fix on Win11x64 using treeherder build 140.11.0esr(20260429200123). Marking as verified.
Updated•7 days ago
|
Updated•7 days ago
|
Comment 30•7 days ago
|
||
| uplift | ||
Updated•6 days ago
|
Updated•6 days ago
|
Comment 31•6 days ago
|
||
| uplift | ||
Updated•2 days ago
|
Comment 32•2 days ago
|
||
| 140.10.2 uplift | ||
Updated•2 days ago
|
Comment 33•2 days ago
|
||
| 115.35.2 uplift | ||
Updated•2 days ago
|
Updated•1 day ago
|
Updated•1 day ago
|
Updated•1 day ago
|
Updated•1 day ago
|
Updated•1 day ago
|
Updated•23 hours ago
|
Comment 34•10 hours ago
|
||
I was able to verify the fix on Win11x64 using builds 115.35.2esr(20260506115224) and 150.0.2(20260506140522).
Description
•