mikekazakov / nimble-commander

Nimble Commander - dual-pane file manager for Mac
https://magnumbytes.com/
GNU General Public License v3.0
343 stars 34 forks source link

[Bug]: Assertion failure in FSEventsDirUpdateImpl #372

Closed mikekazakov closed 2 months ago

mikekazakov commented 2 months ago

Confirmation

Version of Nimble Commander

v1.7, macOS 14

Distribution Type

Downloaded from GitHub (nightly and test workflows)

Expected Result

Assertions don't trigger during normal usage.

Actual Result

Assertion failure:

Thread 0 Crashed::  Dispatch queue: com.apple.main-thread
0   libsystem_kernel.dylib                 0x19cf555f0 __pthread_kill + 8
1   libsystem_pthread.dylib                0x19cf8dc20 pthread_kill + 288
2   libsystem_c.dylib                      0x19ce9aa30 abort + 180
3   libsystem_c.dylib                      0x19ce99d20 __assert_rtn + 284
4   Nimble Commander                       0x102194d78 nc::utility::FSEventsDirUpdateImpl::ShouldFire(std::__1::basic_string_view<char, std::__1::char_traits<char>>, unsigned long, char const**, unsigned int const*) + 132 (FSEventsDirUpdateImpl.cpp:47)
5   Nimble Commander                       0x102195028 nc::utility::FSEventsDirUpdateImpl::FSEventsDirUpdateCallback(__FSEventStream const*, void*, unsigned long, void*, unsigned int const*, unsigned long long const*) + 260 (FSEventsDirUpdateImpl.cpp:92)
6   FSEvents                               0x1a58fdda8 implementation_callback_rpc + 3344
7   FSEvents                               0x1a58fd010 _Xcallback_rpc + 220
8   FSEvents                               0x1a58fcf08 FSEventsD2F_server + 68
9   FSEvents                               0x1a590013c FSEventsClientProcessMessageCallback + 72
10  CoreFoundation                         0x19d09cf94 __CFMachPortPerform + 248
11  CoreFoundation                         0x19d06da6c __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE1_PERFORM_FUNCTION__ + 60
12  CoreFoundation                         0x19d06d98c __CFRunLoopDoSource1 + 524
13  CoreFoundation                         0x19d06c350 __CFRunLoopRun + 2244
14  CoreFoundation                         0x19d06b434 CFRunLoopRunSpecific + 608
15  HIToolbox                              0x1a781519c RunCurrentEventLoopInMode + 292
16  HIToolbox                              0x1a7814fd8 ReceiveNextEventCommon + 648
17  HIToolbox                              0x1a7814d30 _BlockUntilNextEventMatchingListInModeWithFilter + 76
18  AppKit                                 0x1a08cacc8 _DPSNextEvent + 660
19  AppKit                                 0x1a10c14d0 -[NSApplication(NSEventRouting) _nextEventMatchingEventMask:untilDate:inMode:dequeue:] + 700
20  Nimble Commander                       0x102779688 -[Application nextEventMatchingMask:untilDate:inMode:dequeue:] + 140 (Application.mm:33)
21  AppKit                                 0x1a08bdffc -[NSApplication run] + 476
22  AppKit                                 0x1a0895240 NSApplicationMain + 880
23  Nimble Commander                       0x10209e450 main + 52 (main.cpp:11)
24  dyld                                   0x19cc03154 start + 2476

Steps to reproduce

  1. Navigate multiple SMB volumes
  2. Use NC for some time, navigate to the root directory.
  3. When some fs event happens, this assertion fails: assert(!_watched_path.empty() && _watched_path.back() == '/');

Additional Information

No response