[jedit:bugs] #4132 freeze when deleting a directory and some children (race condition)
Eric Le Lay via jEdit-devel <[email protected]> Tue, 02 Apr 2024 17:11:26 -0000
| Newsgroups | gmane.editors.jedit.devel |
|---|---|
| Message-ID | </p/jedit/bugs/4132/0ac726c49465abe6e14212612169c9a20cb8c311.bugs@jedit.p.sourceforge.net> |
- **status**: open --> closed-fixed --- **[bugs:#4132] freeze when deleting a directory and some children (race condition)** **Status:** closed-fixed **Group:** normal bug **Created:** Tue Feb 27, 2024 08:09 PM UTC by Eric Le Lay **Last Updated:** Tue Apr 02, 2024 05:11 PM UTC **Owner:** Eric Le Lay There is an issue with `VFSManager.error` calling `ThreadUtilities.runInDispatchThreadAndWait` because `org.gjt.sp.jedit.browser.VFSBrowser.delete(VFSFile[])` is already blocking the EDT waiting for all `DeleteBrowserTask` to complete. This happens when one selects a folder and one or more files inside it, presses Delete and confirm. A big-ish file hierarchy is needed, so that jEdit tries to delete a file that is already deleted when deleting the root folder. It then freezes Steps to reproduce: 1. Prepare the test folder ``` ~> rsync -rvt jedit/releasing/sandbox/BinEd-0.2.1.1/ jedit/coucou/ (...) sent 45.139.767 bytes received 12.270 bytes 90.304.074,00 bytes/sec ~> find jedit/coucou/ | wc -l 869 ``` 2. in jEdit's VFS browser, navigate to jedit 3. select coucou + 5 entries inside it (BinEd, BinEd/images, BinEd/lib, BinEd/src, build.gradle) 4. press Delete 5. confirm 6. jEdit is frozen 7. using a debugger, dump threads stacktrace Failed to reproduce with a single folder with a single file inside it. Tentative fix: replace `runInDispatchThreadAndWait` with `runInDispatchThread` It works fine in this case: 2 errors got condensed in a single error dialog. --- Sent from sourceforge.net because [email protected] is subscribed to https://sourceforge.net/p/jedit/bugs/ To unsubscribe from further messages, a project admin can change settings at https://sourceforge.net/p/jedit/admin/bugs/options. Or, if this is a mailing list, you can unsubscribe from the mailing list. -- ----------------------------------------------- jEdit Developers' List [email protected] https://lists.sourceforge.net/lists/listinfo/jedit-devel