Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Crash when viewing a file from an archive while a search is in progress #2526

Closed
spnethw opened this issue Nov 24, 2024 · 12 comments · Fixed by #2541
Closed

Crash when viewing a file from an archive while a search is in progress #2526

spnethw opened this issue Nov 24, 2024 · 12 comments · Fixed by #2541

Comments

@spnethw
Copy link
Contributor

spnethw commented Nov 24, 2024

far2l рандомно падает в следующей ситуации:

  1. заходим в директорию с достаточным кол-вом архивов (чтобы последующий поиск не завершался слишком быстро).
  2. Alt+F7, отмечаем "Искать в архивах", вводим какую-то строку в поле "Содержащих текст".
  3. запускаем процесс поиска.
  4. пока он идёт, давим F3 на одном из файлов, найденных в одном из архивов.
  5. падение.

от типа архивов, вроде бы, не зависит, падало на zip, rar, tar.gz
воспроизводится не каждый раз, иногда с десятой-двадцатой попытки.

@exkrexpexfex
Copy link
Contributor

@spnethw Покажите, пожалуйста, записи в ~/.config/far2l/crash.log, если есть

@spnethw
Copy link
Contributor Author

spnethw commented Dec 2, 2024

crash.log почти никогда не успевает создаться, попробовал подцепиться через gdb:

#0  0x00007686c34a53f4 in ?? () from /usr/lib/libc.so.6
#1  0x00007686c344c120 in raise () from /usr/lib/libc.so.6
#2  0x00007686c34334c3 in abort () from /usr/lib/libc.so.6
#3  0x00007686c3434354 in ?? () from /usr/lib/libc.so.6
#4  0x00007686c34af765 in ?? () from /usr/lib/libc.so.6
#5  0x00007686c34b2f54 in ?? () from /usr/lib/libc.so.6
#6  0x00007686c34b3ef4 in malloc () from /usr/lib/libc.so.6
#7  0x000060600e7935da in FARString::Content::Create (nCapacity=1) at /home/testuser/devel/far2l/far2l/src/base/FARString.cpp:122
#8  0x000060600e793671 in FARString::Content::Create (nCapacity=1, SrcData=0x60600e895280 L".", SrcLen=1) at /home/testuser/devel/far2l/far2l/src/base/FARString.cpp:136
#9  0x000060600e561b4d in FARString::Init (this=0x7686b67fb678, SrcData=0x60600e895280 L".", SrcLen=1) at /home/testuser/devel/far2l/far2l/src/base/FARString.hpp:106
#10 0x000060600e561ba0 in FARString::Init (this=0x7686b67fb678, SrcData=0x60600e895280 L".") at /home/testuser/devel/far2l/far2l/src/base/FARString.hpp:113
#11 0x000060600e561c21 in FARString::FARString (this=0x7686b67fb678, lpwszData=0x60600e895280 L".") at /home/testuser/devel/far2l/far2l/src/base/FARString.hpp:128
#12 0x000060600e79e176 in FarMkTempEx (strDest=..., Prefix=0x60600e89526c L"FTMP", WithTempPath=1, UserTempPath=0x0) at /home/testuser/devel/far2l/far2l/src/mix/mix.cpp:144
#13 0x000060600e60f615 in AnalyzeFileItem (hDlg=0x7686b77fa6c0, FileItem=0x76869805bc20, FileName=0x768698000f8c L"f.fb2-200864-203580.inp", FindData=...)
    at /home/testuser/devel/far2l/far2l/src/findfile.cpp:1178
#14 0x000060600e60fa58 in AnalyzeFileItem (hDlg=0x7686b77fa6c0, FileItem=0x76869805bc20, FileName=0x768698000f8c L"f.fb2-200864-203580.inp", FindData=...)
    at /home/testuser/devel/far2l/far2l/src/findfile.cpp:1216
#15 0x000060600e6139b2 in ScanPluginTree (hDlg=0x7686b77fa6c0, hPlugin=0x768698072740, Flags=1039, RecurseLevel=@0x7686b67fb944: 1)
    at /home/testuser/devel/far2l/far2l/src/findfile.cpp:2231
#16 0x000060600e614378 in DoPreparePluginList (hDlg=0x7686b77fa6c0) at /home/testuser/devel/far2l/far2l/src/findfile.cpp:2346
#17 0x000060600e612f92 in ArchiveSearch (hDlg=0x7686b77fa6c0, ArcName=0x76869800596c L"/home/testuser/test/flibusta_all_20130316.inpx")
    at /home/testuser/devel/far2l/far2l/src/findfile.cpp:2088
#18 0x000060600e6135b7 in DoScanTree (hDlg=0x7686b77fa6c0, strRoot=...) at /home/testuser/devel/far2l/far2l/src/findfile.cpp:2185
#19 0x000060600e6140e0 in DoPrepareFileList (hDlg=0x7686b77fa6c0) at /home/testuser/devel/far2l/far2l/src/findfile.cpp:2318
#20 0x000060600e6145fd in FindFileThread::ThreadProc (this=0x7686b77fa630) at /home/testuser/devel/far2l/far2l/src/findfile.cpp:2388
#21 0x000060600e8526b4 in Threaded::sThreadProc (p=0x7686b77fa630) at /home/testuser/devel/far2l/utils/src/Threaded.cpp:22
#22 0x00007686c34a339d in ?? () from /usr/lib/libc.so.6
#23 0x00007686c352849c in ?? () from /usr/lib/libc.so.6

@exkrexpexfex
Copy link
Contributor

@spnethw у меня воспроизвелось. Похоже, идет борьба за строчку с названием временного каталога. Поправил наугад, вроде не падает, попробуйте, пожалуйста.

@spnethw
Copy link
Contributor Author

spnethw commented Dec 3, 2024

К сожалению, не помогает. 😞 Продолжает падать...

#0  0x000079d4641b63f4 in ?? () from /usr/lib/libc.so.6
#1  0x000079d46415d120 in raise () from /usr/lib/libc.so.6
#2  0x000079d4641444c3 in abort () from /usr/lib/libc.so.6
#3  0x000079d464145354 in ?? () from /usr/lib/libc.so.6
#4  0x000079d4641c0765 in ?? () from /usr/lib/libc.so.6
#5  0x000079d4641c3ecc in ?? () from /usr/lib/libc.so.6
#6  0x000079d4641c4ef4 in malloc () from /usr/lib/libc.so.6
#7  0x000057ca0a65fa19 in AnsiToUnicodeBin (lpszAnsiString=0x79d438030804 "121", nLength=80, CodePage=65001) at /home/testuser/far2l-exkrexpexfex/far2l/far2l/src/plug/wrap.cpp:104
#8  0x000057ca0a660121 in ConvertInfoPanelLinesA (iplA=0x79d4380300a8, piplW=0x79d444082ab0, iCount=15) at /home/testuser/far2l-exkrexpexfex/far2l/far2l/src/plug/wrap.cpp:242
#9  0x000057ca0a671b19 in PluginA::ConvertOpenPluginInfo (this=0x79d444082990, Src=..., Dest=0x79d456ffc620) at /home/testuser/far2l-exkrexpexfex/far2l/far2l/src/plug/PluginA.cpp:1051
#10 0x000057ca0a671dec in PluginA::GetOpenPluginInfo (this=0x79d444082990, hPlugin=0x79d43802ede0, pInfo=0x79d456ffc620)
    at /home/testuser/far2l-exkrexpexfex/far2l/far2l/src/plug/PluginA.cpp:1090
#11 0x000057ca0a6517ba in PluginManager::GetOpenPluginInfo (this=0x79d457ffe930, hPlugin=0x79d438034780, Info=0x79d456ffc620)
    at /home/testuser/far2l-exkrexpexfex/far2l/far2l/src/plug/plugins.cpp:953
#12 0x000057ca0a654a17 in PluginManager::UseFarCommand (this=0x79d457ffe930, hPlugin=0x79d438034780, CommandType=1)
    at /home/testuser/far2l-exkrexpexfex/far2l/far2l/src/plug/plugins.cpp:1467
#13 0x000057ca0a5185db in AnalyzeFileItem (hDlg=0x79d457ffb6c0, FileItem=0x79d43804f8e0, FileName=0x79d4380196bc L"f.fb2-254651-258561.inp", FindData=...)
    at /home/testuser/far2l-exkrexpexfex/far2l/far2l/src/findfile.cpp:1176
#14 0x000057ca0a518a58 in AnalyzeFileItem (hDlg=0x79d457ffb6c0, FileItem=0x79d43804f8e0, FileName=0x79d4380196bc L"f.fb2-254651-258561.inp", FindData=...)
    at /home/testuser/far2l-exkrexpexfex/far2l/far2l/src/findfile.cpp:1215
#15 0x000057ca0a51c9b2 in ScanPluginTree (hDlg=0x79d457ffb6c0, hPlugin=0x79d438034780, Flags=1039, RecurseLevel=@0x79d456ffc944: 1)
    at /home/testuser/far2l-exkrexpexfex/far2l/far2l/src/findfile.cpp:2230
#16 0x000057ca0a51d378 in DoPreparePluginList (hDlg=0x79d457ffb6c0) at /home/testuser/far2l-exkrexpexfex/far2l/far2l/src/findfile.cpp:2345
#17 0x000057ca0a51bf92 in ArchiveSearch (hDlg=0x79d457ffb6c0, ArcName=0x79d4380059ac L"/home/testuser/test/flibusta_all_20130505.inpx")
    at /home/testuser/far2l-exkrexpexfex/far2l/far2l/src/findfile.cpp:2087
#18 0x000057ca0a51c5b7 in DoScanTree (hDlg=0x79d457ffb6c0, strRoot=...) at /home/testuser/far2l-exkrexpexfex/far2l/far2l/src/findfile.cpp:2184
#19 0x000057ca0a51d0e0 in DoPrepareFileList (hDlg=0x79d457ffb6c0) at /home/testuser/far2l-exkrexpexfex/far2l/far2l/src/findfile.cpp:2317
#20 0x000057ca0a51d5fd in FindFileThread::ThreadProc (this=0x79d457ffb630) at /home/testuser/far2l-exkrexpexfex/far2l/far2l/src/findfile.cpp:2387
#21 0x000057ca0a75b6b4 in Threaded::sThreadProc (p=0x79d457ffb630) at /home/testuser/far2l-exkrexpexfex/far2l/utils/src/Threaded.cpp:22
#22 0x000079d4641b439d in ?? () from /usr/lib/libc.so.6
#23 0x000079d46423949c in ?? () from /usr/lib/libc.so.6

@exkrexpexfex
Copy link
Contributor

@spnethw перенес блокировку повыше, попробуйте.
Мне не удалось поймать падение

@spnethw
Copy link
Contributor Author

spnethw commented Dec 3, 2024

А вот теперь, вроде бы, не воспроизводится!

@elfmz
Copy link
Owner

elfmz commented Dec 3, 2024

эмм, немного не понимаю что оно фиксит, потому что гонки не вижу. А вот вижу использование GetTempFileName (в FarMkTempEx) с буфером непонятного размера, в то время как ей требуется MAX_PATH, потому корректный фикс имхо вместо
wchar_t *lpwszDest = strDest.GetBuffer(StrLength(Prefix) + strPath.GetLength() + 13);
сделать
wchar_t *lpwszDest = strDest.GetBuffer(std::max(MAX_PATH, StrLength(Prefix) + strPath.GetLength() + 13));
можете проверить фиксит ли оно эту проблему, вернув локи на место?

@spnethw
Copy link
Contributor Author

spnethw commented Dec 3, 2024

Заменил на
wchar_t *lpwszDest = strDest.GetBuffer(std::max((size_t)MAX_PATH, StrLength(Prefix) + strPath.GetLength() + 13));

Не-а, не помогает, падает.

@exkrexpexfex
Copy link
Contributor

@elfmz вот такой отчет для варианта MAX_PATH, посмотрите два потока, которые работали

-------------------------------------
Translated Report (Full Report Below)
-------------------------------------

Process:               far2l [31377]
Path:                  /Users/USER/*/far2l.app/Contents/MacOS/far2l
Identifier:            com.far2l
Version:               2.6.4-2024-12-01-2c03f3a1-beta ()
Code Type:             ARM-64 (Native)
Parent Process:        Exited process [31376]
Responsible:           far2l [92320]
User ID:               501

Date/Time:             2024-12-03 17:54:33.5695 +0300
OS Version:            macOS 15.1.1 (24B91)
Report Version:        12
Anonymous UUID:        263B10B6-62C0-5BCB-287E-D9D1A82C2C2E

Sleep/Wake UUID:       290321D8-9D21-4A54-BD48-C10B30AD8062

Time Awake Since Boot: 1000000 seconds
Time Since Wake:       118131 seconds

System Integrity Protection: enabled

Crashed Thread:        10

Exception Type:        EXC_CRASH (SIGABRT)
Exception Codes:       0x0000000000000000, 0x0000000000000000

Termination Reason:    Namespace SIGNAL, Code 6 Abort trap: 6
Terminating Process:   far2l [31377]

Application Specific Information:
abort() called


Thread 0:
0   libsystem_kernel.dylib        	       0x1842c5e34 0x1842c5000 + 3636
1   libsystem_kernel.dylib        	       0x1842ce9d8 0x1842c5000 + 39384
2   libsystem_kernel.dylib        	       0x1842c617c 0x1842c5000 + 4476
3   CoreFoundation                	       0x1843ededc 0x184370000 + 515804
4   CoreFoundation                	       0x1843ec73c 0x184370000 + 509756
5   CoreFoundation                	       0x1843ebbc4 0x184370000 + 506820
6   HIToolbox                     	       0x18f85bf64 0x18f750000 + 1097572
7   HIToolbox                     	       0x18f861d54 0x18f750000 + 1121620
8   HIToolbox                     	       0x18f861eb8 0x18f750000 + 1121976
9   AppKit                        	       0x187f17a08 0x187edd000 + 240136
10  AppKit                        	       0x188857e0c 0x187edd000 + 9940492
11  AppKit                        	       0x187f0aae0 0x187edd000 + 187104
12  libwx_osx_cocoau_core-3.2.0.3.0.dylib	       0x1061067e4 0x106060000 + 681956
13  libwx_baseu-3.2.0.3.0.dylib   	       0x105ca1fa0 0x105be4000 + 778144
14  libwx_baseu-3.2.0.3.0.dylib   	       0x105c184f4 0x105be4000 + 214260
15  libwx_baseu-3.2.0.3.0.dylib   	       0x105bed4dc 0x105be4000 + 38108
16  libwx_osx_cocoau_core-3.2.0.3.0.dylib	       0x1060b47b0 0x106060000 + 346032
17  libwx_baseu-3.2.0.3.0.dylib   	       0x105c421f4 0x105be4000 + 385524
18  far2l_gui.so                  	       0x1058f78c0 WinPortMainBackend + 916 (wxMain.cpp:178)
19  far2l                         	       0x104ddb224 WinPortMain + 2776 (WinPortMain.cpp:518)
20  far2l                         	       0x104f392b8 main + 960 (main.cpp:797)
21  dyld                          	       0x183f84274 0x183f7e000 + 25204

Thread 1:
0   libsystem_kernel.dylib        	       0x1842d0e9c 0x1842c5000 + 48796
1   far2l                         	       0x104dd9c60 SudoAskpassServer::Thread() + 92 (sudo_askpass_ipc.cpp:92)
2   far2l                         	       0x104dd9a24 SudoAskpassServer::sThread(void*) + 24 (sudo_askpass_ipc.h:38)
3   libsystem_pthread.dylib       	       0x1843072e4 0x184300000 + 29412
4   libsystem_pthread.dylib       	       0x1843020fc 0x184300000 + 8444

Thread 2:
0   libsystem_pthread.dylib       	       0x1843020e8 0x184300000 + 8424

Thread 3:
0   libsystem_pthread.dylib       	       0x1843020e8 0x184300000 + 8424

Thread 4:
0   libsystem_pthread.dylib       	       0x1843020e8 0x184300000 + 8424

Thread 5:
0   far2l                         	       0x104db2348 void ww898::utf::utf32::write<ww898::utf::detail::conv_strategy<ww898::utf::utf8, ww898::utf::utf32, unsigned char const*, ArrayPushBack<wchar_t>, (ww898::utf::detail::conv_impl)1>::operator()(unsigned char const*&, unsigned char const*, ArrayPushBack<wchar_t>&) const::'lambda'(unsigned int) const&>(unsigned int, ww898::utf::detail::conv_strategy<ww898::utf::utf8, ww898::utf::utf32, unsigned char const*, ArrayPushBack<wchar_t>, (ww898::utf::detail::conv_impl)1>::operator()(unsigned char const*&, unsigned char const*, ArrayPushBack<wchar_t>&) const::'lambda'(unsigned int) const&) + 140 (cp_utf32.hpp:58)
1   far2l                         	       0x104db1d50 ww898::utf::detail::conv_strategy<ww898::utf::utf8, ww898::utf::utf32, unsigned char const*, ArrayPushBack<wchar_t>, (ww898::utf::detail::conv_impl)1>::operator()(unsigned char const*&, unsigned char const*, ArrayPushBack<wchar_t>&) const + 412 (utf_converters.hpp:117)
2   far2l                         	       0x104db1ba4 bool ww898::utf::conv<ww898::utf::utf8, ww898::utf::utf32, unsigned char const*, unsigned char const*&, ArrayPushBack<wchar_t>>(unsigned char const*&, unsigned char const*&, ArrayPushBack<wchar_t>&) + 48 (utf_converters.hpp:156)
3   far2l                         	       0x104db0b0c unsigned int UtfConvert<unsigned char, ArrayPushBack<wchar_t>>(unsigned char const*, unsigned long&, ArrayPushBack<wchar_t>&, bool) + 120 (UtfConvert.hpp:102)
4   far2l                         	       0x104db06d0 int TranscodeUTF<unsigned char, wchar_t>(int, unsigned char const*, unsigned long, wchar_t*, unsigned long) + 412 (APIStringCodepages.cpp:43)
5   far2l                         	       0x104da9080 int Bytes2Wide<unsigned char, false>(int, void const*, int, wchar_t*, int) + 144 (APIStringCodepages.cpp:133)
6   far2l                         	       0x104da8714 WINPORT_MultiByteToWideChar + 652 (APIStringCodepages.cpp:529)
7   far2l                         	       0x10506b430 AnsiToUnicodeBin(char const*, wchar_t*, int, unsigned int) + 144 (wrap.cpp:98)
8   far2l                         	       0x105066c14 AnsiToUnicodeBin(char const*, int, unsigned int) + 60 (wrap.cpp:105)
9   far2l                         	       0x10506725c AnsiToUnicode(char const*, int, unsigned int) + 140 (wrap.cpp:116)
10  far2l                         	       0x105067d64 ConvertPanelItemA(oldfar::PluginPanelItem const*, PluginPanelItem**, int) + 572 (wrap.cpp:395)
11  far2l                         	       0x105079e98 PluginA::GetFindData(void*, PluginPanelItem**, int*, int) + 204 (PluginA.cpp:927)
12  far2l                         	       0x1050582d8 PluginManager::GetFindData(void*, PluginPanelItem**, int*, int) + 100 (plugins.cpp:799)
13  far2l                         	       0x104ef6260 GetPluginFile(unsigned long, FAR_FIND_DATA_EX const&, wchar_t const*, FARString&) + 316 (findfile.cpp:984)
14  far2l                         	       0x104ef3250 FindDlgProc(void*, int, int, long long) + 4276 (findfile.cpp:1529)
15  far2l                         	       0x104e5f09c Dialog::DlgProc(void*, int, int, long long) + 220 (dialog.cpp:4692)
16  far2l                         	       0x104e66628 Dialog::ProcessKey(unsigned int) + 804 (dialog.cpp:2689)
17  far2l                         	       0x104f3d928 Manager::ProcessKey(unsigned int) + 2284 (manager.cpp:1012)
18  far2l                         	       0x104f3b940 Manager::ProcessMainLoop() + 396 (manager.cpp:742)
19  far2l                         	       0x104f3ba64 Manager::ExecuteModal(Frame*) + 272 (manager.cpp:318)
20  far2l                         	       0x104e6edd0 Dialog::Process() + 180 (dialog.cpp:4529)
21  far2l                         	       0x104eeec80 FindFilesProcess(Vars&) + 2772 (findfile.cpp:2508)
22  far2l                         	       0x104eecb24 FindFiles::FindFiles() + 5712 (findfile.cpp:2889)
23  far2l                         	       0x104eefea8 FindFiles::FindFiles() + 28 (findfile.cpp:2691)
24  far2l                         	       0x104eeff94 FindFiles::Present() + 24 (findfile.cpp:2906)
25  far2l                         	       0x104eda334 FilePanels::ProcessKey(unsigned int) + 3916 (filepanels.cpp:689)
26  far2l                         	       0x104f3d928 Manager::ProcessKey(unsigned int) + 2284 (manager.cpp:1012)
27  far2l                         	       0x104f3b940 Manager::ProcessMainLoop() + 396 (manager.cpp:742)
28  far2l                         	       0x104f3cfdc Manager::EnterMainLoop() + 116 (manager.cpp:706)
29  far2l                         	       0x104f38da8 MainProcess(FARString, FARString, FARString, int, int) + 2756 (main.cpp:327)
30  far2l                         	       0x104f37c38 FarAppMain(int, char**) + 4988 (main.cpp:654)
31  far2l_gui.so                  	       0x1058f74f4 WinPortAppThread::Entry() + 52 (wxMain.cpp:81)
32  libwx_baseu-3.2.0.3.0.dylib   	       0x105caff24 0x105be4000 + 835364
33  libsystem_pthread.dylib       	       0x1843072e4 0x184300000 + 29412
34  libsystem_pthread.dylib       	       0x1843020fc 0x184300000 + 8444

Thread 6:
0   libsystem_pthread.dylib       	       0x1843020e8 0x184300000 + 8424

Thread 7:: com.apple.NSEventThread
0   libsystem_kernel.dylib        	       0x1842c5e34 0x1842c5000 + 3636
1   libsystem_kernel.dylib        	       0x1842ce9d8 0x1842c5000 + 39384
2   libsystem_kernel.dylib        	       0x1842c617c 0x1842c5000 + 4476
3   CoreFoundation                	       0x1843ededc 0x184370000 + 515804
4   CoreFoundation                	       0x1843ec73c 0x184370000 + 509756
5   CoreFoundation                	       0x1843ebbc4 0x184370000 + 506820
6   AppKit                        	       0x18803cb8c 0x187edd000 + 1440652
7   libsystem_pthread.dylib       	       0x1843072e4 0x184300000 + 29412
8   libsystem_pthread.dylib       	       0x1843020fc 0x184300000 + 8444

Thread 8:
0   libsystem_pthread.dylib       	       0x1843020e8 0x184300000 + 8424

Thread 9:
0   libsystem_kernel.dylib        	       0x1842cbefc 0x1842c5000 + 28412
1   far2l                         	       0x1051405dc FSNotify::sWatcherProc(void*) + 24 (FSNotify.cpp:113)
2   libsystem_pthread.dylib       	       0x1843072e4 0x184300000 + 29412
3   libsystem_pthread.dylib       	       0x1843020fc 0x184300000 + 8444

Thread 10 Crashed:
0   libsystem_kernel.dylib        	       0x1842ce600 0x1842c5000 + 38400
1   libsystem_c.dylib             	       0x184213908 0x18419a000 + 497928
2   libsystem_malloc.dylib        	       0x18411d524 0x18410f000 + 58660
3   libsystem_malloc.dylib        	       0x1841454a8 0x18410f000 + 222376
4   libsystem_malloc.dylib        	       0x18414433c 0x18410f000 + 217916
5   far2l                         	       0x105076070 PluginA::FreeOpenPluginInfo() + 56 (PluginA.cpp:998)
6   far2l                         	       0x10507a138 PluginA::ConvertOpenPluginInfo(oldfar::OpenPluginInfo&, OpenPluginInfo*) + 36 (PluginA.cpp:1034)
7   far2l                         	       0x10507a4a8 PluginA::GetOpenPluginInfo(void*, OpenPluginInfo*) + 140 (PluginA.cpp:1090)
8   far2l                         	       0x105058fc0 PluginManager::GetOpenPluginInfo(void*, OpenPluginInfo*) + 104 (plugins.cpp:953)
9   far2l                         	       0x10505bfc0 PluginManager::UseFarCommand(void*, int) + 40 (plugins.cpp:1467)
10  far2l                         	       0x104efb560 AnalyzeFileItem(void*, PluginPanelItem*, wchar_t const*, FAR_FIND_DATA_EX const&) + 684 (findfile.cpp:1176)
11  far2l                         	       0x104efadd0 AnalyzeFileItem(void*, PluginPanelItem*, wchar_t const*, FAR_FIND_DATA const&) + 108 (findfile.cpp:1216)
12  far2l                         	       0x104efa778 ScanPluginTree(void*, void*, unsigned int, int&) + 816 (findfile.cpp:2231)
13  far2l                         	       0x104efaadc ScanPluginTree(void*, void*, unsigned int, int&) + 1684 (findfile.cpp:2258)
14  far2l                         	       0x104efaadc ScanPluginTree(void*, void*, unsigned int, int&) + 1684 (findfile.cpp:2258)
15  far2l                         	       0x104ef81bc DoPreparePluginList(void*) + 552 (findfile.cpp:2346)
16  far2l                         	       0x104efb0a4 ArchiveSearch(void*, wchar_t const*) + 668 (findfile.cpp:2088)
17  far2l                         	       0x104efef40 DoScanTree(void*, FARString&) + 1268 (findfile.cpp:2185)
18  far2l                         	       0x104ef855c DoPrepareFileList(void*) + 624 (findfile.cpp:2318)
19  far2l                         	       0x104ef7b74 FindFileThread::ThreadProc() + 200 (findfile.cpp:2388)
20  far2l                         	       0x1051181e8 Threaded::sThreadProc(void*) + 40 (Threaded.cpp:22)
21  libsystem_pthread.dylib       	       0x1843072e4 0x184300000 + 29412
22  libsystem_pthread.dylib       	       0x1843020fc 0x184300000 + 8444

Thread 11:
0   libsystem_kernel.dylib        	       0x1842c95cc 0x1842c5000 + 17868
1   libc++.1.dylib                	       0x18423d578 0x18421c000 + 136568
2   far2l                         	       0x1051195bc ThreadedWorkQueue::WorkerThreadProc() + 640 (ThreadedWorkQueue.cpp:102)
3   far2l                         	       0x10511d738 ThreadedWorker::ThreadProc() + 28 (ThreadedWorkQueue.cpp:13)
4   far2l                         	       0x1051181e8 Threaded::sThreadProc(void*) + 40 (Threaded.cpp:22)
5   libsystem_pthread.dylib       	       0x1843072e4 0x184300000 + 29412
6   libsystem_pthread.dylib       	       0x1843020fc 0x184300000 + 8444

Thread 12:
0   libsystem_kernel.dylib        	       0x1842cbefc 0x1842c5000 + 28412
1   far2l                         	       0x1051405dc FSNotify::sWatcherProc(void*) + 24 (FSNotify.cpp:113)
2   libsystem_pthread.dylib       	       0x1843072e4 0x184300000 + 29412
3   libsystem_pthread.dylib       	       0x1843020fc 0x184300000 + 8444


Thread 10 crashed with ARM Thread State (64-bit):
    x0: 0x0000000000000000   x1: 0x0000000000000000   x2: 0x0000000000000000   x3: 0x0000000000000000
    x4: 0x0000000000000073   x5: 0x000000000000002e   x6: 0x0000000000000001   x7: 0x00000000000008e0
    x8: 0x6687d2ecd7162714   x9: 0x6687d2edbc715714  x10: 0x000000000000000a  x11: 0x0000000000000000
   x12: 0x0000000000000033  x13: 0x0000000000000400  x14: 0x0000000000000000  x15: 0x0000000112853f6e
   x16: 0x0000000000000148  x17: 0x00000001f1679850  x18: 0x0000000000000000  x19: 0x0000000000000006
   x20: 0x0000000000005a23  x21: 0x000000016b6770e0  x22: 0x0000000000000003  x23: 0x000000016b6761c0
   x24: 0x0000000000000000  x25: 0x0000000000000000  x26: 0x00000001e91843d6  x27: 0x000000016b677000
   x28: 0x0000000000000000   fp: 0x000000016b675b10   lr: 0x0000000184306f70
    sp: 0x000000016b675af0   pc: 0x00000001842ce600 cpsr: 0x40001000
   far: 0x0000000000000000  esr: 0x56000080  Address size fault

@elfmz
Copy link
Owner

elfmz commented Dec 3, 2024

а, UseFarCommand, может изза него. Тогда по идее достаточно только один лок передвинуть, вот так:

diff --git a/far2l/src/findfile.cpp b/far2l/src/findfile.cpp
index b87e6500..a46622f9 100644
--- a/far2l/src/findfile.cpp
+++ b/far2l/src/findfile.cpp
@@ -1173,6 +1173,7 @@ static void AnalyzeFileItem(HANDLE hDlg, PluginPanelItem *FileItem, const wchar_
 
 	FARString FileToScan;
 	if (hPlugin != INVALID_HANDLE_VALUE) {
+		PluginLocker Lock;
 		if (!CtrlObject->Plugins.UseFarCommand(hPlugin, PLUGIN_FARGETFILES)) {
 			FARString strTempDir;
 			FarMkTempEx(strTempDir);
@@ -1180,7 +1181,6 @@ static void AnalyzeFileItem(HANDLE hDlg, PluginPanelItem *FileItem, const wchar_
 
 			bool GetFileResult = false;
 			{
-				PluginLocker Lock;
 				GetFileResult = CtrlObject->Plugins.GetFile(hPlugin, FileItem, strTempDir, FileToScan,
 										OPM_SILENT | OPM_FIND)
 						!= FALSE;

..если только такое изменение сделать, перестанет падать?

@spnethw
Copy link
Contributor Author

spnethw commented Dec 3, 2024

..если только такое изменение сделать, перестанет падать?

да, с таким патчем на моих примерах вроде бы перестало падать!

@exkrexpexfex
Copy link
Contributor

и у меня не падает, переделал PR

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants