Repository navigation
fix archive extract crash (#1718) - #1869
Conversation
|
It would be better to pass a runtime handle and ensure we have async I/O running on the compio excecutor. |
So I have a local commit that now runs the flush on the compio executor via |
|
It's fine to pass the data to the compio executor's thread to handle it there. |
8ffb7ab to
c679e2c
Compare
c679e2c to
cf75330
Compare
There was a problem hiding this comment.
On 3e3ef7d, I'm still seeing #1718 occur (COSMIC Files crashes if I attempt to open a second ZIP file while the first one's extraction dialog is still open).
The output's a little different than what was quoted in the issue:
system76@pop-os:~$ RUST_BACKTRACE=full cosmic-files
system76@pop-os:~$
thread 'main' (4533) panicked at /home/system76/cosmic-files/vendor/libcosmic/src/app/mod.rs:488:9:
no view for window Id(2)
stack backtrace:
0: 0x596b30da3aba - <unknown>
1: 0x596b30dbf51a - <unknown>
2: 0x596b30daa9d2 - <unknown>
3: 0x596b30d7dd6f - <unknown>
4: 0x596b30d99841 - <unknown>
5: 0x596b30d99abb - <unknown>
6: 0x596b30d7de28 - <unknown>
7: 0x596b30d74cf9 - <unknown>
8: 0x596b30d7f27d - <unknown>
9: 0x596b30dbfe1c - <unknown>
10: 0x596b2f59f810 - <unknown>
11: 0x596b2f5ee6d1 - <unknown>
12: 0x596b2f2ae475 - <unknown>
13: 0x596b2f69aaaf - <unknown>
14: 0x596b2f2aeaf6 - <unknown>
15: 0x596b2f2a1fb6 - <unknown>
16: 0x596b2f2aedc7 - <unknown>
17: 0x596b2f69c743 - <unknown>
18: 0x596b2f6c90bf - <unknown>
19: 0x596b2f305168 - <unknown>
20: 0x596b2f1c2899 - <unknown>
21: 0x596b2f1772a6 - <unknown>
22: 0x596b2f1771e5 - <unknown>
23: 0x596b30d98014 - <unknown>
24: 0x596b2f17738d - <unknown>
25: 0x755c8042a1ca - <unknown>
26: 0x755c8042a28b - __libc_start_main
27: 0x596b2f1770e5 - <unknown>
28: 0x0 - <unknown>
system76@pop-os:~$
calling compio fs from the spawn_blocking thread panicked 'not in a compio runtime'. now extract returns the written files/dirs and perform flushes each archive on the compio executor via compio::runtime::spawn, per-archive like before.
opening a second archive while the first's "extract to" dialog was still open overwrote file_dialog_opt without closing the first dialog's window, leaving an orphaned window that panicked "no view for window" on render. close any existing dialog before opening a new one.
3e3ef7d to
6329e0e
Compare
Try now I pushed a fix that closes the existing dialog before opening a new one. |
jacobgkau
left a comment
There was a problem hiding this comment.
I may've misunderstood #1718; I wasn't able to replicate COSMIC Files crashing on actually finishing the extraction for multiple ZIP files in a row. But the fix for the second dialog crash is working as well. Thank you for these fixes!
Regression testing passed:
Checklist
Basic navigation
- Middle-click opens directory in a new tab (not focused).
- Open two scrollable tabs. Scroll one tab, then switch to the other tab; it should not have scrolled.
- Hover over the top item in the folder, then scroll down until it's out of view (while still hovered). On scrolling back up (with the mouse in a different position), the item should not have the hover highlight.
- Right-click an item in the sidebar. No visual change should occur with the rest of the items.
- Remove an item from the sidebar, then re-pin it.
File operations
- Right-click -> Create a new folder, then enter it.
- Right-click in the empty folder -> Create a new file.
- Navigate to the parent folder, create another new file, then drag it into the created folder.
- Files can be renamed.
- Files can be opened with non-default apps & browsing store for new apps works.
- Normal right-click shows
Move to trashoption. - Shift right-click, and right-click followed by Shift, both show
Permanently deleteoption.
Advanced navigation & view settings
- Image and video thumbnails generate & display in local folders.
- Gallery preview shows with Spacebar.
- Details pane shows with Ctrl+Spacebar.
- Zoom in/out and reset to default zoom work.
- Ctrl+1 and Ctrl+2 switch between list and icon view.
- Ctrl+H shows/hides hidden files.
- Directories can be sorted at top or inline.
- Settings -> Theme works.
- Settings -> Type to Search affects behavior as designed.
- Single-click to open setting takes effect.
- Recents in sidebar setting works.
- Sorting options work.
- Cutting, copying, and pasting files works.
- F5 reloads current directory.
- Left sidebar can be collapsed and expanded.
External filesystems
- Add a network drive (e.g. SFTP) and navigate into it.
- Plug in a USB drive; able to mount, browse, and eject.
Integrations
- Desktop icons display as expected
- Drag-and-drop into Firefox works
So the archive::extract runs inside spawn_blocking, but sync_to_disk used compio's async fs so it panics "not in a compio runtime" and kills the extract. swapped that flush to plain std::fs since we're already on a blocking thread.
fixes #1718