Tom94 / tev

High dynamic range (HDR) image viewer for graphics people
BSD 3-Clause "New" or "Revised" License
1.03k stars 87 forks source link

[osx] seeing crashes in glDeleteTextures() #126

Closed mmp closed 3 years ago

mmp commented 3 years ago

I've started seeing fairly frequent (~a few a day) crashes from tev. The only change from my earlier usage has been that I have viewing more PNGs (in addition to lots of EXRs (and rendered images over IPC as before.) I don't have a reliable way of reproducing the crashes; it just happens every few hours, often when tev is not the active application.

FWIW here is a stack trace from a debug build. Let me know what else I can send along that might be useful.

(lldb) bt
* thread #29, stop reason = EXC_BAD_ACCESS (code=1, address=0x0)
  * frame #0: 0x00007fff37b9069d libGL.dylib`glDeleteTextures + 18
    frame #1: 0x00000001000de32b tev`tev::GlTexture::~GlTexture(this=0x000000011fc03948) at GlTexture.h:33:13
    frame #2: 0x00000001000d3735 tev`tev::GlTexture::~GlTexture(this=0x000000011fc03948) at GlTexture.h:31:27
    frame #3: 0x00000001000de3ac tev`tev::ImageTexture::~ImageTexture(this=0x000000011fc03948) at Image.h:32:8
    frame #4: 0x00000001000d3755 tev`tev::ImageTexture::~ImageTexture(this=0x000000011fc03948) at Image.h:32:8
    frame #5: 0x00000001000de213 tev`std::__1::pair<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const, tev::ImageTexture>::~pair(this=0x000000011fc03930) at utility:314:29
    frame #6: 0x00000001000de1e5 tev`std::__1::pair<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const, tev::ImageTexture>::~pair(this=0x000000011fc03930) at utility:314:29
    frame #7: 0x00000001000de1c9 tev`void std::__1::allocator_traits<std::__1::allocator<std::__1::__tree_node<std::__1::__value_type<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, tev::ImageTexture>, void*> > >::__destroy<std::__1::pair<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const, tev::ImageTexture> >((null)=std::__1::false_type @ 0x000070000d930808, (null)=0x0000000102565ef8, __p=0x000000011fc03930) at memory:1747:23
    frame #8: 0x00000001000de0fd tev`void std::__1::allocator_traits<std::__1::allocator<std::__1::__tree_node<std::__1::__value_type<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, tev::ImageTexture>, void*> > >::destroy<std::__1::pair<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const, tev::ImageTexture> >(__a=0x0000000102565ef8, __p=0x000000011fc03930) at memory:1595:14
    frame #9: 0x00000001000de06f tev`std::__1::__tree<std::__1::__value_type<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, tev::ImageTexture>, std::__1::__map_value_compare<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::__value_type<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, tev::ImageTexture>, std::__1::less<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > >, true>, std::__1::allocator<std::__1::__value_type<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, tev::ImageTexture> > >::destroy(this=0x0000000102565ef0, __nd=0x000000011fc03910) at __tree:1843:9
    frame #10: 0x00000001000ddfe5 tev`std::__1::__tree<std::__1::__value_type<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, tev::ImageTexture>, std::__1::__map_value_compare<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::__value_type<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, tev::ImageTexture>, std::__1::less<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > >, true>, std::__1::allocator<std::__1::__value_type<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, tev::ImageTexture> > >::~__tree(this=0x0000000102565ef0) at __tree:1831:3
    frame #11: 0x00000001000ddfb5 tev`std::__1::__tree<std::__1::__value_type<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, tev::ImageTexture>, std::__1::__map_value_compare<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::__value_type<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, tev::ImageTexture>, std::__1::less<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > >, true>, std::__1::allocator<std::__1::__value_type<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, tev::ImageTexture> > >::~__tree(this=0x0000000102565ef0) at __tree:1828:1
    frame #12: 0x00000001000ddf95 tev`std::__1::map<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, tev::ImageTexture, std::__1::less<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > >, std::__1::allocator<std::__1::pair<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const, tev::ImageTexture> > >::~map(this=0x0000000102565ef0 size=1) at map:873:28
    frame #13: 0x00000001000d28e5 tev`std::__1::map<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, tev::ImageTexture, std::__1::less<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > >, std::__1::allocator<std::__1::pair<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const, tev::ImageTexture> > >::~map(this=0x0000000102565ef0 size=1) at map:873:28
    frame #14: 0x00000001000f95d5 tev`tev::Image::~Image(this=0x0000000102565e98) at Image.h:37:7
    frame #15: 0x00000001000f9585 tev`tev::Image::~Image(this=0x0000000102565e98) at Image.h:37:7
    frame #16: 0x00000001000f8ee1 tev`std::__1::__shared_ptr_emplace<tev::Image, std::__1::allocator<tev::Image> >::__on_zero_shared(this=0x0000000102565e80) at memory:3706:23
    frame #17: 0x00000001000178da tev`std::__1::__shared_count::__release_shared(this=0x0000000102565e80) at memory:3540:9
    frame #18: 0x000000010001787f tev`std::__1::__shared_weak_count::__release_shared(this=0x0000000102565e80) at memory:3582:27
    frame #19: 0x000000010001784c tev`std::__1::shared_ptr<std::__1::packaged_task<void ()> >::~shared_ptr(this=0x0000000158b128e8) at memory:4518:19
    frame #20: 0x000000010000e1d5 tev`std::__1::shared_ptr<std::__1::packaged_task<void ()> >::~shared_ptr(this=0x0000000158b128e8) at memory:4516:1
    frame #21: 0x000000010011ecec tev`tev::ImageCanvas::canvasStatistics(this=0x0000000158b128e8)::$_4::~$_4() at ImageCanvas.cpp:454:87
    frame #22: 0x00000001001149e5 tev`tev::ImageCanvas::canvasStatistics(this=0x0000000158b128e8)::$_4::~$_4() at ImageCanvas.cpp:454:87
    frame #23: 0x0000000100159ec5 tev`std::__1::__compressed_pair_elem<tev::ImageCanvas::canvasStatistics()::$_4, 0, false>::~__compressed_pair_elem(this=0x0000000158b128e8) at memory:2133:8
    frame #24: 0x0000000100159fc5 tev`std::__1::__compressed_pair<tev::ImageCanvas::canvasStatistics()::$_4, std::__1::allocator<tev::ImageCanvas::canvasStatistics()::$_4> >::~__compressed_pair(this=0x0000000158b128e8) at memory:2207:7
    frame #25: 0x0000000100159fa5 tev`std::__1::__compressed_pair<tev::ImageCanvas::canvasStatistics()::$_4, std::__1::allocator<tev::ImageCanvas::canvasStatistics()::$_4> >::~__compressed_pair(this=0x0000000158b128e8) at memory:2207:7
    frame #26: 0x0000000100159a7f tev`std::__1::__function::__func<tev::ImageCanvas::canvasStatistics()::$_4, std::__1::allocator<tev::ImageCanvas::canvasStatistics()::$_4>, std::__1::shared_ptr<tev::CanvasStatistics> ()>::destroy_deallocate(this=0x0000000158b128e0) at functional:1553:11
    frame #27: 0x000000010015e122 tev`std::__1::function<std::__1::shared_ptr<tev::CanvasStatistics> ()>::operator=(this=0x0000000158b13470, (null)=0x0000000000000000) at functional:1846:14
    frame #28: 0x000000010015df87 tev`std::__1::function<std::__1::shared_ptr<tev::CanvasStatistics> ()>::operator=(this=0x0000000158b13470, __f=0x000070000d930b90)>&&) at functional:1821:11
    frame #29: 0x000000010015de6a tev`tev::Lazy<std::__1::shared_ptr<tev::CanvasStatistics> >::compute(this=0x0000000158b13460) at Lazy.h:96:18
    frame #30: 0x000000010015ddce tev`tev::Lazy<std::__1::shared_ptr<tev::CanvasStatistics> >::computeAsync(this=0x0000000158b134f8)::'lambda'()::operator()() const at Lazy.h:80:28
    frame #31: 0x000000010015dd7f tev`decltype(__f=0x0000000158b134f8)::'lambda'()&>(fp)()) std::__1::__invoke<tev::Lazy<std::__1::shared_ptr<tev::CanvasStatistics> >::computeAsync()::'lambda'()&>(tev::Lazy<std::__1::shared_ptr<tev::CanvasStatistics> >::computeAsync()::'lambda'()&) at type_traits:4339:1
    frame #32: 0x000000010015d983 tev`std::__1::__packaged_task_func<tev::Lazy<std::__1::shared_ptr<tev::CanvasStatistics> >::computeAsync()::'lambda'(), std::__1::allocator<tev::Lazy<std::__1::shared_ptr<tev::CanvasStatistics> >::computeAsync()::'lambda'()>, std::__1::shared_ptr<tev::CanvasStatistics> ()>::operator(this=0x0000000158b134f0)() at future:1821:12
    frame #33: 0x0000000100160961 tev`std::__1::__packaged_task_function<std::__1::shared_ptr<tev::CanvasStatistics> ()>::operator(this=0x0000000158b134f0)() const at future:1998:12
    frame #34: 0x0000000100160809 tev`std::__1::packaged_task<std::__1::shared_ptr<tev::CanvasStatistics> ()>::operator(this=0x0000000158b134f0)() at future:2089:24
    frame #35: 0x000000010016076d tev`std::__1::future<std::__1::result_of<tev::Lazy<std::__1::shared_ptr<tev::CanvasStatistics> >::computeAsync()::'lambda'() ()>::type> tev::ThreadPool::enqueueTask<tev::Lazy<std::__1::shared_ptr<tev::CanvasStatistics> >::computeAsync(this=0x000070000d930e48)::'lambda'()>(tev::Lazy<std::__1::shared_ptr<tev::CanvasStatistics> >::computeAsync()::'lambda'()&&, bool)::'lambda'()::operator()() const at ThreadPool.h:37:53
    frame #36: 0x000000010016072d tev`decltype(__f=0x000070000d930e48)::'lambda'()>(fp)()) std::__1::__invoke<std::__1::future<std::__1::result_of<tev::Lazy<std::__1::shared_ptr<tev::CanvasStatistics> >::computeAsync()::'lambda'() ()>::type> tev::ThreadPool::enqueueTask<tev::Lazy<std::__1::shared_ptr<tev::CanvasStatistics> >::computeAsync()::'lambda'()>(tev::Lazy<std::__1::shared_ptr<tev::CanvasStatistics> >::computeAsync()::'lambda'()&&, bool)::'lambda'()&>(tev::Lazy<std::__1::shared_ptr<tev::CanvasStatistics> >::computeAsync()::'lambda'()&&) at type_traits:4339:1
    frame #37: 0x00000001001606dd tev`void std::__1::__invoke_void_return_wrapper<void>::__call<std::__1::future<std::__1::result_of<tev::Lazy<std::__1::shared_ptr<tev::CanvasStatistics> >::computeAsync(__args=0x000070000d930e48)::'lambda'() ()>::type> tev::ThreadPool::enqueueTask<tev::Lazy<std::__1::shared_ptr<tev::CanvasStatistics> >::computeAsync()::'lambda'()>(tev::Lazy<std::__1::shared_ptr<tev::CanvasStatistics> >::computeAsync()::'lambda'()&&, bool)::'lambda'()&>(std::__1::future<std::__1::result_of<tev::Lazy<std::__1::shared_ptr<tev::CanvasStatistics> >::computeAsync()::'lambda'() ()>::type> tev::ThreadPool::enqueueTask<tev::Lazy<std::__1::shared_ptr<tev::CanvasStatistics> >::computeAsync()::'lambda'()>(tev::Lazy<std::__1::shared_ptr<tev::CanvasStatistics> >::computeAsync()::'lambda'()&&, bool)::'lambda'()&) at __functional_base:349:9
    frame #38: 0x000000010015f401 tev`std::__1::__function::__func<std::__1::future<std::__1::result_of<tev::Lazy<std::__1::shared_ptr<tev::CanvasStatistics> >::computeAsync()::'lambda'() ()>::type> tev::ThreadPool::enqueueTask<tev::Lazy<std::__1::shared_ptr<tev::CanvasStatistics> >::computeAsync()::'lambda'()>(tev::Lazy<std::__1::shared_ptr<tev::CanvasStatistics> >::computeAsync()::'lambda'()&&, bool)::'lambda'(), std::__1::allocator<std::__1::future<std::__1::result_of<tev::Lazy<std::__1::shared_ptr<tev::CanvasStatistics> >::computeAsync()::'lambda'() ()>::type> tev::ThreadPool::enqueueTask<tev::Lazy<std::__1::shared_ptr<tev::CanvasStatistics> >::computeAsync()::'lambda'()>(tev::Lazy<std::__1::shared_ptr<tev::CanvasStatistics> >::computeAsync()::'lambda'()&&, bool)::'lambda'()>, void ()>::operator(this=0x000070000d930e40)() at functional:1562:12
    frame #39: 0x0000000100066fb5 tev`std::__1::function<void ()>::operator(this=0x000070000d930e40)() const at functional:1913:12
    frame #40: 0x0000000100213217 tev`tev::ThreadPool::startThreads(this=0x000000010222f4a8)::$_0::operator()() const at ThreadPool.cpp:51:17
    frame #41: 0x000000010021308d tev`decltype(__f=0x000000010222f4a8)::$_0>(fp)()) std::__1::__invoke<tev::ThreadPool::startThreads(unsigned long)::$_0>(tev::ThreadPool::startThreads(unsigned long)::$_0&&) at type_traits:4339:1
    frame #42: 0x0000000100212ff5 tev`void std::__1::__thread_execute<std::__1::unique_ptr<std::__1::__thread_struct, std::__1::default_delete<std::__1::__thread_struct> >, tev::ThreadPool::startThreads(unsigned long)::$_0>(__t=size=2, (null)=__tuple_indices<> @ 0x000070000d930eb8)::$_0>&, std::__1::__tuple_indices<>) at thread:342:5
    frame #43: 0x00000001002128c6 tev`void* std::__1::__thread_proxy<std::__1::tuple<std::__1::unique_ptr<std::__1::__thread_struct, std::__1::default_delete<std::__1::__thread_struct> >, tev::ThreadPool::startThreads(unsigned long)::$_0> >(__vp=0x000000010222f4a0) at thread:352:5
    frame #44: 0x00007fff5ac842eb libsystem_pthread.dylib`_pthread_body + 126
    frame #45: 0x00007fff5ac87249 libsystem_pthread.dylib`_pthread_start + 66
    frame #46: 0x00007fff5ac8340d libsystem_pthread.dylib`thread_start + 13

and here are all of the running threads

(lldb) thread list
Process 97350 stopped
  thread #1: tid = 0x13d3f41, 0x0000000100059734 tev`std::__1::vector<float, std::__1::allocator<float> >::__construct_at_end(this=0x00007ffeefbfbf50 size=5003059, __n=13746941) at vector:1023:40, queue = 'com.apple.main-thread'
  thread #3: tid = 0x13d3f53, 0x00007fff5abc886a libsystem_kernel.dylib`__psynch_cvwait + 10
  thread #4: tid = 0x13d3f54, 0x00007fff5abc886a libsystem_kernel.dylib`__psynch_cvwait + 10
  thread #5: tid = 0x13d3f55, 0x00007fff5abc886a libsystem_kernel.dylib`__psynch_cvwait + 10
  thread #6: tid = 0x13d3f56, 0x00007fff5abc886a libsystem_kernel.dylib`__psynch_cvwait + 10
  thread #7: tid = 0x13d3f57, 0x00007fff5abc886a libsystem_kernel.dylib`__psynch_cvwait + 10
  thread #8: tid = 0x13d3f58, 0x00007fff5abc886a libsystem_kernel.dylib`__psynch_cvwait + 10
  thread #9: tid = 0x13d3f59, 0x00007fff5abc886a libsystem_kernel.dylib`__psynch_cvwait + 10
  thread #10: tid = 0x13d3f5a, 0x00007fff5abc886a libsystem_kernel.dylib`__psynch_cvwait + 10
  thread #11: tid = 0x13d3f5b, 0x00007fff5abc886a libsystem_kernel.dylib`__psynch_cvwait + 10
  thread #12: tid = 0x13d3f5c, 0x00007fff5abc886a libsystem_kernel.dylib`__psynch_cvwait + 10
  thread #13: tid = 0x13d3f5d, 0x00007fff5abc886a libsystem_kernel.dylib`__psynch_cvwait + 10
  thread #14: tid = 0x13d3f5e, 0x00007fff5abc886a libsystem_kernel.dylib`__psynch_cvwait + 10
  thread #15: tid = 0x13d3f5f, 0x00007fff5abc886a libsystem_kernel.dylib`__psynch_cvwait + 10
  thread #16: tid = 0x13d3f60, 0x00007fff5abc886a libsystem_kernel.dylib`__psynch_cvwait + 10
  thread #17: tid = 0x13d3f61, 0x00007fff5abc886a libsystem_kernel.dylib`__psynch_cvwait + 10
  thread #18: tid = 0x13d3f62, 0x00007fff5abc886a libsystem_kernel.dylib`__psynch_cvwait + 10
  thread #19: tid = 0x13d3f63, 0x00007fff5ac78992 libsystem_platform.dylib`_platform_bzero$VARIANT$Haswell + 114
  thread #20: tid = 0x13d3f64, 0x00007fff5abc61be libsystem_kernel.dylib`__read_nocancel + 10
  thread #21: tid = 0x13d3f65, 0x00007fff5abc8f32 libsystem_kernel.dylib`__semwait_signal + 10
  thread #25: tid = 0x13d3f79, 0x00007fff5abc522a libsystem_kernel.dylib`mach_msg_trap + 10, name = 'com.apple.NSEventThread'
  thread #26: tid = 0x13d3f7c, 0x00007fff5abc886a libsystem_kernel.dylib`__psynch_cvwait + 10
  thread #27: tid = 0x13d3f7d, 0x00007fff5abc886a libsystem_kernel.dylib`__psynch_cvwait + 10
  thread #28: tid = 0x13d3f7e, 0x00007fff5abc886a libsystem_kernel.dylib`__psynch_cvwait + 10
* thread #29: tid = 0x13d3f7f, 0x00007fff37b9069d libGL.dylib`glDeleteTextures + 18, stop reason = EXC_BAD_ACCESS (code=1, address=0x0)
  thread #30: tid = 0x13d3f80, 0x00007fff5abc886a libsystem_kernel.dylib`__psynch_cvwait + 10
  thread #31: tid = 0x13d3f81, 0x00007fff5abc886a libsystem_kernel.dylib`__psynch_cvwait + 10
  thread #32: tid = 0x13d3f82, 0x00007fff5abc886a libsystem_kernel.dylib`__psynch_cvwait + 10
  thread #33: tid = 0x13d3f83, 0x00007fff5abc886a libsystem_kernel.dylib`__psynch_cvwait + 10
  thread #34: tid = 0x13d3f84, 0x00007fff5abc886a libsystem_kernel.dylib`__psynch_cvwait + 10
  thread #35: tid = 0x13d3f85, 0x00007fff5abc886a libsystem_kernel.dylib`__psynch_cvwait + 10
  thread #36: tid = 0x13d3f86, 0x00007fff5abc886a libsystem_kernel.dylib`__psynch_cvwait + 10
  thread #37: tid = 0x13d3f87, 0x00007fff5abc886a libsystem_kernel.dylib`__psynch_cvwait + 10
  thread #38: tid = 0x13d3f88, 0x00007fff5abc886a libsystem_kernel.dylib`__psynch_cvwait + 10
  thread #39: tid = 0x13d3f89, 0x00007fff5abc886a libsystem_kernel.dylib`__psynch_cvwait + 10
  thread #40: tid = 0x13d3f8a, 0x00007fff5abc886a libsystem_kernel.dylib`__psynch_cvwait + 10
  thread #41: tid = 0x13d3f8b, 0x00007fff5abc886a libsystem_kernel.dylib`__psynch_cvwait + 10
  thread #42: tid = 0x13d3f8c, 0x00007fff5abc8f32 libsystem_kernel.dylib`__semwait_signal + 10
  thread #43: tid = 0x13d3f93, 0x00007fff5abc8f32 libsystem_kernel.dylib`__semwait_signal + 10
  thread #46: tid = 0x143686e, 0x00007fff5abc6bfe libsystem_kernel.dylib`__workq_kernreturn + 10
  thread #47: tid = 0x1437cfa, 0x00007fff5abc6bfe libsystem_kernel.dylib`__workq_kernreturn + 10
  thread #48: tid = 0x1437d7e, 0x0000000000000000
  thread #129: tid = 0x143828c, 0x00007fff5abc886a libsystem_kernel.dylib`__psynch_cvwait + 10
  thread #130: tid = 0x143828d, 0x00007fff5abc886a libsystem_kernel.dylib`__psynch_cvwait + 10
  thread #131: tid = 0x143828e, 0x00007fff5abc886a libsystem_kernel.dylib`__psynch_cvwait + 10
  thread #132: tid = 0x143828f, 0x00007fff5abc886a libsystem_kernel.dylib`__psynch_cvwait + 10
  thread #133: tid = 0x1438290, 0x00007fff5abc886a libsystem_kernel.dylib`__psynch_cvwait + 10
  thread #134: tid = 0x1438291, 0x00007fff5abc886a libsystem_kernel.dylib`__psynch_cvwait + 10
  thread #135: tid = 0x1438292, 0x0000000100172838 tev`Eigen::DenseStorage<float, -1, -1, -1, 0>::rows(this=0x00000001dca00a68) const at DenseStorage.h:410
  thread #136: tid = 0x1438293, 0x00007fff5abc886a libsystem_kernel.dylib`__psynch_cvwait + 10
  thread #137: tid = 0x1438294, 0x00007fff5abc886a libsystem_kernel.dylib`__psynch_cvwait + 10
  thread #138: tid = 0x1438295, 0x00007fff5abc886a libsystem_kernel.dylib`__psynch_cvwait + 10
  thread #139: tid = 0x1438296, 0x00007fff5abc886a libsystem_kernel.dylib`__psynch_cvwait + 10
  thread #140: tid = 0x1438297, 0x0000000100008b88 tev`Eigen::internal::evaluator<Eigen::Matrix<int, 2, 1, 0, 2, 1> >::~evaluator(this=0x000070000fe8bb68) at CoreEvaluators.h:273
  thread #141: tid = 0x1438298, 0x00007fff5abc886a libsystem_kernel.dylib`__psynch_cvwait + 10
  thread #142: tid = 0x1438299, 0x00007fff5abc886a libsystem_kernel.dylib`__psynch_cvwait + 10
  thread #143: tid = 0x143829a, 0x000000010011603f tev`std::__1::shared_ptr<tev::CanvasStatistics>::operator->(this=0x000070000d9b3c08) const at memory:3930:49
  thread #144: tid = 0x143829b, 0x00007fff5abc886a libsystem_kernel.dylib`__psynch_cvwait + 10
  thread #145: tid = 0x143829d, 0x0000000100090524 tev`Eigen::DenseCoeffsBase<Eigen::Matrix<float, -1, -1, 1, -1, -1>, 0>::coeff(this=0x0000000102415bb8, index=2092909) const at DenseCoeffsBase.h:145:14
  thread #146: tid = 0x143829e, 0x00007fff5abc886a libsystem_kernel.dylib`__psynch_cvwait + 10
  thread #147: tid = 0x143829f, 0x0000000100010370 tev`Eigen::DenseStorage<float, -1, -1, -1, 1>::cols(this=0x0000000102415c18) const at DenseStorage.h:411:47
  thread #148: tid = 0x14382a0, 0x00007fff5abc886a libsystem_kernel.dylib`__psynch_cvwait + 10
  thread #149: tid = 0x14382a1, 0x00007fff5abc886a libsystem_kernel.dylib`__psynch_cvwait + 10
  thread #150: tid = 0x14382a2, 0x00007fff5abc886a libsystem_kernel.dylib`__psynch_cvwait + 10
  thread #151: tid = 0x14382a3, 0x00007fff5abc886a libsystem_kernel.dylib`__psynch_cvwait + 10
  thread #152: tid = 0x14382a4, 0x00007fff5abc886a libsystem_kernel.dylib`__psynch_cvwait + 10
  thread #153: tid = 0x14382a5, 0x00007fff5abc886a libsystem_kernel.dylib`__psynch_cvwait + 10
  thread #154: tid = 0x14382a6, 0x00007fff5abc886a libsystem_kernel.dylib`__psynch_cvwait + 10
  thread #155: tid = 0x14382a7, 0x00007fff5abc886a libsystem_kernel.dylib`__psynch_cvwait + 10
  thread #156: tid = 0x14382a8, 0x00007fff5abc886a libsystem_kernel.dylib`__psynch_cvwait + 10
  thread #157: tid = 0x14382a9, 0x00007fff5abc886a libsystem_kernel.dylib`__psynch_cvwait + 10
  thread #158: tid = 0x14382aa, 0x00007fff5abc886a libsystem_kernel.dylib`__psynch_cvwait + 10
  thread #159: tid = 0x14382ab, 0x00007fff5abc886a libsystem_kernel.dylib`__psynch_cvwait + 10
  thread #160: tid = 0x14382ac, 0x00000001000102dc tev`Eigen::DenseStorage<float, -1, -1, -1, 1>::data(this=0x0000000102286648) const at DenseStorage.h:432:54
  thread #161: tid = 0x14382e6, 0x000000010017967f tev`tev::ImageCanvas::computeCanvasStatistics(this=0x0000000119f01a18, i=1)::$_12::operator()(int) const at ImageCanvas.cpp:630:46
  thread #162: tid = 0x14382e7, 0x00007fff5abc886a libsystem_kernel.dylib`__psynch_cvwait + 10
  thread #163: tid = 0x14382e8, 0x00007fff5abc886a libsystem_kernel.dylib`__psynch_cvwait + 10
  thread #164: tid = 0x14382e9, 0x0000000100174add tev`Eigen::internal::evaluator<Eigen::Matrix<int, -1, -1, 0, -1, -1> >::evaluator(this=0x0000700010ad3b68, m=0x000070000da36790) at CoreEvaluators.h:284:5
  thread #165: tid = 0x14382ea, 0x00007fff5abc886a libsystem_kernel.dylib`__psynch_cvwait + 10
  thread #166: tid = 0x14382eb, 0x00007fff5abc886a libsystem_kernel.dylib`__psynch_cvwait + 10
  thread #167: tid = 0x14382ec, 0x00007fff5abc886a libsystem_kernel.dylib`__psynch_cvwait + 10
  thread #168: tid = 0x14382ed, 0x00007fff5abc886a libsystem_kernel.dylib`__psynch_cvwait + 10
  thread #169: tid = 0x14382ee, 0x00007fff5abc886a libsystem_kernel.dylib`__psynch_cvwait + 10
  thread #170: tid = 0x14382ef, 0x00007fff5abc886a libsystem_kernel.dylib`__psynch_cvwait + 10
  thread #171: tid = 0x14382f0, 0x00000001000102b0 tev`Eigen::internal::plainobjectbase_evaluator_data<float, -1>::plainobjectbase_evaluator_data(this=0x0000700010e68b68, ptr=0x000000022f693000, outerStride=4296494157) at CoreEvaluators.h:154
  thread #172: tid = 0x14382f1, 0x00007fff5abc886a libsystem_kernel.dylib`__psynch_cvwait + 10
  thread #173: tid = 0x14382f2, 0x00007fff5abc886a libsystem_kernel.dylib`__psynch_cvwait + 10
  thread #174: tid = 0x14382f3, 0x00007fff5abc886a libsystem_kernel.dylib`__psynch_cvwait + 10
  thread #175: tid = 0x14382f4, 0x00007fff5abc886a libsystem_kernel.dylib`__psynch_cvwait + 10
  thread #176: tid = 0x14382f5, 0x00007fff5abc886a libsystem_kernel.dylib`__psynch_cvwait + 10
  thread #177: tid = 0x1438306, 0x00007fff5abc886a libsystem_kernel.dylib`__psynch_cvwait + 10
  thread #178: tid = 0x1438307, 0x00007fff5abc886a libsystem_kernel.dylib`__psynch_cvwait + 10
  thread #179: tid = 0x1438308, 0x00007fff5abc886a libsystem_kernel.dylib`__psynch_cvwait + 10
  thread #180: tid = 0x1438309, 0x00007fff5abc886a libsystem_kernel.dylib`__psynch_cvwait + 10
  thread #181: tid = 0x143830a, 0x00007fff5abc886a libsystem_kernel.dylib`__psynch_cvwait + 10
  thread #182: tid = 0x143830b, 0x00007fff5abc886a libsystem_kernel.dylib`__psynch_cvwait + 10
  thread #183: tid = 0x143830c, 0x00007fff5abc886a libsystem_kernel.dylib`__psynch_cvwait + 10
  thread #184: tid = 0x143830d, 0x00007fff5abc886a libsystem_kernel.dylib`__psynch_cvwait + 10
  thread #185: tid = 0x143830e, 0x00007fff5abc886a libsystem_kernel.dylib`__psynch_cvwait + 10
  thread #186: tid = 0x143830f, 0x00007fff5abc886a libsystem_kernel.dylib`__psynch_cvwait + 10
  thread #187: tid = 0x1438310, 0x00007fff5abc886a libsystem_kernel.dylib`__psynch_cvwait + 10
  thread #188: tid = 0x1438311, 0x00007fff5abc886a libsystem_kernel.dylib`__psynch_cvwait + 10
  thread #189: tid = 0x1438312, 0x00007fff5abc886a libsystem_kernel.dylib`__psynch_cvwait + 10
  thread #190: tid = 0x1438313, 0x00007fff5abc886a libsystem_kernel.dylib`__psynch_cvwait + 10
  thread #191: tid = 0x1438314, 0x00007fff5abc886a libsystem_kernel.dylib`__psynch_cvwait + 10
  thread #192: tid = 0x1438315, 0x00007fff5abc886a libsystem_kernel.dylib`__psynch_cvwait + 10
  thread #193: tid = 0x1438316, 0x00007fff5abc886a libsystem_kernel.dylib`__psynch_cvwait + 10
  thread #194: tid = 0x1438317, 0x00000001000100fc tev`Eigen::DenseStorage<float, -1, -1, -1, 1>::rows(this=0x0000000119f046f8) const at DenseStorage.h:410:54
  thread #195: tid = 0x1438318, 0x00000001000904b8 tev`Eigen::DenseCoeffsBase<Eigen::Matrix<float, -1, -1, 1, -1, -1>, 0>::operator(this=0x0000000119f04728, index=339996)(long) const at DenseCoeffsBase.h:181:7
  thread #196: tid = 0x1438319, 0x00007fff5abc886a libsystem_kernel.dylib`__psynch_cvwait + 10
  thread #197: tid = 0x143831a, 0x00007fff5abc886a libsystem_kernel.dylib`__psynch_cvwait + 10
  thread #198: tid = 0x143831b, 0x00007fff5abc886a libsystem_kernel.dylib`__psynch_cvwait + 10
  thread #199: tid = 0x143831c, 0x00007fff5abc886a libsystem_kernel.dylib`__psynch_cvwait + 10
  thread #200: tid = 0x143831d, 0x00007fff5abc886a libsystem_kernel.dylib`__psynch_cvwait + 10
  thread #201: tid = 0x143831e, 0x00007fff5abc886a libsystem_kernel.dylib`__psynch_cvwait + 10
  thread #202: tid = 0x143831f, 0x00007fff5abc886a libsystem_kernel.dylib`__psynch_cvwait + 10
  thread #203: tid = 0x1438320, 0x00007fff5abc886a libsystem_kernel.dylib`__psynch_cvwait + 10
  thread #204: tid = 0x1438321, 0x00007fff5abc886a libsystem_kernel.dylib`__psynch_cvwait + 10
  thread #205: tid = 0x1438322, 0x00007fff5abc886a libsystem_kernel.dylib`__psynch_cvwait + 10
  thread #206: tid = 0x1438323, 0x00007fff5abc886a libsystem_kernel.dylib`__psynch_cvwait + 10
  thread #207: tid = 0x1438324, 0x00007fff5abc886a libsystem_kernel.dylib`__psynch_cvwait + 10
  thread #208: tid = 0x1438325, 0x0000000100010370 tev`Eigen::DenseStorage<float, -1, -1, -1, 1>::cols(this=0x0000000119f046c8) const at DenseStorage.h:411:47
Tom94 commented 3 years ago

These traces are a great hint! I believe I know what the problem is (glDeleteTextures not called from the main thread) and I'm going to try a fix accordingly.

But it's hard for me to reproduce. So I would appreciate if you fetched the above linked commit and tried it out for a while. Fingers crossed that it works.

mmp commented 3 years ago

Great--I grabbed that yesterday and have been running it with no crashes so far (though I've made only moderate use of tev today). I should be making more heavy use of it tomorrow so will post an update then.

mmp commented 3 years ago

A few more days of intensive tev use and no more crashes, so I think it's safe to say that this patch fixes it. Thanks for chasing it down so quickly!

Tom94 commented 3 years ago

Glad to hear. :)