dascandy / evoke

Magic build tool
Apache License 2.0
167 stars 17 forks source link

Occasional crash in daemon mode only #80

Open dascandy opened 4 years ago

dascandy commented 4 years ago

Describe the bug When editing files while Evoke runs in daemon mode, it will occasionally crash with the following stack trace (under screenshots). Looks to be caused by an invalid assumption within inotify-cpp.

To Reproduce Steps to reproduce the behavior:

  1. Run 'evoke -d' in a project
  2. Save some source file participating in the build
  3. Wait for the build to refresh
  4. Crash happens

Expected behavior No crash; clean rebuilds.

Screenshots

4 0x00007ffff7443af1 in std::terminate() () from /usr/lib/x86_64-linux-gnu/libstdc++.so.6

5 0x00007ffff7443d24 in __cxa_throw () from /usr/lib/x86_64-linux-gnu/libstdc++.so.6

6 0x00007ffff7bb9435 in void boost::throw_exception(std::out_of_range const&) ()

from /usr/lib/libinotify-cpp.so

7 0x00007ffff7bb7222 in boost::filesystem::path const& boost::bimaps::detail::non_mutable_data_unique_map_view_access<boost::bimaps::views::map_view<boost::bimaps::relation::member_at::left, boost::bimaps::detail::bimapcore<int, boost::filesystem::path, mpl::na, mpl::na, mpl::na> >, boost::bimaps::relation::member_at::left, boost::bimaps::detail::bimapcore<int, boost::filesystem::path, mpl::na, mpl::na, mpl::na> >::at(int const&) const () from /usr/lib/libinotify-cpp.so

8 0x00007ffff7bb33d3 in inotify::Inotify::wdToPath(int) () from /usr/lib/libinotify-cpp.so

9 0x00007ffff7bb3c17 in inotify::Inotify::readEventsFromBuffer(unsigned char*, int, std::vector<inotify::FileSystemEvent, std::allocator >&) () from /usr/lib/libinotify-cpp.so

10 0x00007ffff7bb3575 in inotify::Inotify::getNextEvent() () from /usr/lib/libinotify-cpp.so

11 0x00007ffff7badca1 in inotify::NotifierBuilder::runOnce() () from /usr/lib/libinotify-cpp.so

12 0x00007ffff7badf3c in inotify::NotifierBuilder::run() () from /usr/lib/libinotify-cpp.so

13 0x00005555555af4a2 in std::thread::_State_impl<std::thread::_Invoker<std::tuple<FsWatch(boost::filesystem::path, std::function<void (boost::filesystem::path, Change)>)::{lambda()#1}> > >::_M_run() ()

14 0x00007ffff746e66f in ?? () from /usr/lib/x86_64-linux-gnu/libstdc++.so.6

15 0x00007ffff6f816db in start_thread (arg=0x7ffff67ea700) at pthread_create.c:463

16 0x00007ffff6caa88f in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95

System (please complete the following information):

Additional context Only happens in daemon mode, not a mainline bug.