NatronGitHub / Natron

Open-source video compositing software. Node-graph based. Similar in functionalities to Adobe After Effects and Nuke by The Foundry.
http://NatronGitHub.github.io
GNU General Public License v2.0
4.54k stars 332 forks source link

(Bug): Natron 2.4.4/2.5.0 binary segfault macOS #860

Closed rodlie closed 1 year ago

rodlie commented 1 year ago

Make sure to follow our issue report guidelines

Natron version

Natron 2.5.0

Operating system

macOS 11 Big Sur

System specs

MBA 2014

Did you install Natron using the official installer?

Custom installation path

Desktop/Natron25.app

What were you trying to do?

Read an image.

What did you expect to happen? What happened instead?

Natron 2.5 will crash on MacOS 11 after reading an image (jpeg tested).

Step-by-step reproduction instructions

  1. Start Natron
  2. Read an image
  3. Wait for crash

Additional details

Process:               Natron [7200]
Path:                  /Users/USER/Desktop/Natron25.app/Contents/MacOS/Natron
Identifier:            fr.inria.Natron
Version:               2.5.0 (2.5.0)
Code Type:             X86-64 (Native)
Parent Process:        ??? [1]
Responsible:           Natron [7200]
User ID:               501

Date/Time:             2023-01-26 10:26:56.138 +0100
OS Version:            macOS 11.7.2 (20G1020)
Report Version:        12
Anonymous UUID:        F7DDC8AE-07A0-3528-62E1-3826FCA4794E

Sleep/Wake UUID:       0017E359-7339-455D-BF12-42082021CFBC

Time Awake Since Boot: 47000 seconds
Time Since Wake:       6100 seconds

System Integrity Protection: enabled

Crashed Thread:        11  Global Thread (Pooled) (0x6000002497e8)

Exception Type:        EXC_BAD_ACCESS (SIGSEGV)
Exception Codes:       KERN_INVALID_ADDRESS at 0x0000000000000028
Exception Note:        EXC_CORPSE_NOTIFY

Termination Signal:    Segmentation fault: 11
Termination Reason:    Namespace SIGNAL, Code 0xb
Terminating Process:   exc handler [7200]

VM Regions Near 0x28:
--> 
    __TEXT                      10631e000-106ff2000    [ 12.8M] r-x/r-x SM=COW  /Users/*/Desktop/Natron25.app/Contents/MacOS/Natron

Thread 0:: Dispatch queue: com.apple.main-thread
0   libsystem_kernel.dylib          0x00007fff204a024a _kernelrpc_mach_port_insert_member_trap + 10
1   libsystem_kernel.dylib          0x00007fff204a1d3e mach_port_insert_member + 23
2   com.apple.CoreFoundation        0x00007fff205cc4ff __CFRunLoopRun + 1088
3   com.apple.CoreFoundation        0x00007fff205cb9fc CFRunLoopRunSpecific + 563
4   com.apple.HIToolbox             0x00007fff288151f3 RunCurrentEventLoopInMode + 292
5   com.apple.HIToolbox             0x00007fff28814e26 ReceiveNextEventCommon + 284
6   com.apple.HIToolbox             0x00007fff28814cf3 _BlockUntilNextEventMatchingListInModeWithFilter + 70
7   com.apple.AppKit                0x00007fff22dd4b12 _DPSNextEvent + 864
8   com.apple.AppKit                0x00007fff22dd32e5 -[NSApplication(NSEvent) _nextEventMatchingEventMask:untilDate:inMode:dequeue:] + 1364
9   com.apple.AppKit                0x00007fff22dc5609 -[NSApplication run] + 586
10  QtGui                           0x0000000107f98078 QEventDispatcherMac::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) + 2040
11  QtCore                          0x0000000108b26518 QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) + 584
12  QtCore                          0x0000000108b29b8c QCoreApplication::exec() + 188
13  fr.inria.Natron                 0x00000001063ff30b Natron::GuiApplicationManager::initGui(Natron::CLArgs const&) + 3051
14  fr.inria.Natron                 0x00000001066292a0 Natron::AppManager::loadInternal(Natron::CLArgs const&) + 1024
15  fr.inria.Natron                 0x0000000106627379 Natron::AppManager::loadFromArgs(Natron::CLArgs const&) + 1545
16  fr.inria.Natron                 0x0000000106325970 main + 224
17  libdyld.dylib                   0x00007fff204f0f3d start + 1

Thread 1:
0   libsystem_pthread.dylib         0x00007fff204d1420 start_wqthread + 0

Thread 2:: Global Thread (Pooled) (0x600000e3f3a8)
0   libsystem_kernel.dylib          0x00007fff204a2cce __psynch_cvwait + 10
1   libsystem_pthread.dylib         0x00007fff204d5e49 _pthread_cond_wait + 1298
2   QtCore                          0x0000000108a1982b QWaitConditionPrivate::wait(unsigned long) + 235
3   QtCore                          0x0000000108a19707 QWaitCondition::wait(QMutex*, unsigned long) + 87
4   QtCore                          0x0000000108a0a704 QThreadPoolThread::run() + 660
5   QtCore                          0x0000000108a181a8 QThreadPrivate::start(void*) + 376
6   libsystem_pthread.dylib         0x00007fff204d58fc _pthread_start + 224
7   libsystem_pthread.dylib         0x00007fff204d1443 thread_start + 15

Thread 3:: com.apple.CFSocket.private
0   libsystem_kernel.dylib          0x00007fff204a8646 __select + 10
1   com.apple.CoreFoundation        0x00007fff205f4443 __CFSocketManager + 630
2   libsystem_pthread.dylib         0x00007fff204d58fc _pthread_start + 224
3   libsystem_pthread.dylib         0x00007fff204d1443 thread_start + 15

Thread 4:: com.apple.NSEventThread
0   libsystem_kernel.dylib          0x00007fff204a02aa mach_msg_trap + 10
1   libsystem_kernel.dylib          0x00007fff204a061c mach_msg + 60
2   com.apple.CoreFoundation        0x00007fff205cdf0f __CFRunLoopServiceMachPort + 316
3   com.apple.CoreFoundation        0x00007fff205cc5ef __CFRunLoopRun + 1328
4   com.apple.CoreFoundation        0x00007fff205cb9fc CFRunLoopRunSpecific + 563
5   com.apple.AppKit                0x00007fff22f5abba _NSEventThread + 124
6   libsystem_pthread.dylib         0x00007fff204d58fc _pthread_start + 224
7   libsystem_pthread.dylib         0x00007fff204d1443 thread_start + 15

Thread 5:
0   libsystem_pthread.dylib         0x00007fff204d1420 start_wqthread + 0

Thread 6:
0   libsystem_pthread.dylib         0x00007fff204d1420 start_wqthread + 0

Thread 7:
0   libsystem_kernel.dylib          0x00007fff204a2cce __psynch_cvwait + 10
1   libsystem_pthread.dylib         0x00007fff204d5e49 _pthread_cond_wait + 1298
2   libc++.1.dylib                  0x00007fff2043ed72 std::__1::condition_variable::wait(std::__1::unique_lock<std::__1::mutex>&) + 18
3   libOpenImageIO_Util.2.3.dylib   0x000000011a7a58bc OpenImageIO_v2_3::thread_pool::Impl::set_thread(int)::'lambda'()::operator()() const + 256
4   libOpenImageIO_Util.2.3.dylib   0x000000011a7a5729 void* std::__1::__thread_proxy<std::__1::tuple<std::__1::unique_ptr<std::__1::__thread_struct, std::__1::default_delete<std::__1::__thread_struct> >, OpenImageIO_v2_3::thread_pool::Impl::set_thread(int)::'lambda'()> >(void*) + 48
5   libsystem_pthread.dylib         0x00007fff204d58fc _pthread_start + 224
6   libsystem_pthread.dylib         0x00007fff204d1443 thread_start + 15

Thread 8:
0   libsystem_kernel.dylib          0x00007fff204a2cce __psynch_cvwait + 10
1   libsystem_pthread.dylib         0x00007fff204d5e49 _pthread_cond_wait + 1298
2   libc++.1.dylib                  0x00007fff2043ed72 std::__1::condition_variable::wait(std::__1::unique_lock<std::__1::mutex>&) + 18
3   libOpenImageIO_Util.2.3.dylib   0x000000011a7a58bc OpenImageIO_v2_3::thread_pool::Impl::set_thread(int)::'lambda'()::operator()() const + 256
4   libOpenImageIO_Util.2.3.dylib   0x000000011a7a5729 void* std::__1::__thread_proxy<std::__1::tuple<std::__1::unique_ptr<std::__1::__thread_struct, std::__1::default_delete<std::__1::__thread_struct> >, OpenImageIO_v2_3::thread_pool::Impl::set_thread(int)::'lambda'()> >(void*) + 48
5   libsystem_pthread.dylib         0x00007fff204d58fc _pthread_start + 224
6   libsystem_pthread.dylib         0x00007fff204d1443 thread_start + 15

Thread 9:
0   libsystem_kernel.dylib          0x00007fff204a2cce __psynch_cvwait + 10
1   libsystem_pthread.dylib         0x00007fff204d5e49 _pthread_cond_wait + 1298
2   libc++.1.dylib                  0x00007fff2043ed72 std::__1::condition_variable::wait(std::__1::unique_lock<std::__1::mutex>&) + 18
3   libOpenImageIO_Util.2.3.dylib   0x000000011a7a58bc OpenImageIO_v2_3::thread_pool::Impl::set_thread(int)::'lambda'()::operator()() const + 256
4   libOpenImageIO_Util.2.3.dylib   0x000000011a7a5729 void* std::__1::__thread_proxy<std::__1::tuple<std::__1::unique_ptr<std::__1::__thread_struct, std::__1::default_delete<std::__1::__thread_struct> >, OpenImageIO_v2_3::thread_pool::Impl::set_thread(int)::'lambda'()> >(void*) + 48
5   libsystem_pthread.dylib         0x00007fff204d58fc _pthread_start + 224
6   libsystem_pthread.dylib         0x00007fff204d1443 thread_start + 15

Thread 10:: PreviewThread (0x7fa5500045c0)
0   libsystem_kernel.dylib          0x00007fff204a2cce __psynch_cvwait + 10
1   libsystem_pthread.dylib         0x00007fff204d5e49 _pthread_cond_wait + 1298
2   QtCore                          0x0000000108a1982b QWaitConditionPrivate::wait(unsigned long) + 235
3   QtCore                          0x0000000108a19707 QWaitCondition::wait(QMutex*, unsigned long) + 87
4   fr.inria.Natron                 0x00000001066ded4e Natron::GenericSchedulerThread::run() + 1534
5   QtCore                          0x0000000108a181a8 QThreadPrivate::start(void*) + 376
6   libsystem_pthread.dylib         0x00007fff204d58fc _pthread_start + 224
7   libsystem_pthread.dylib         0x00007fff204d1443 thread_start + 15

Thread 11 Crashed:: Global Thread (Pooled) (0x6000002497e8)
0   libc++.1.dylib                  0x0000000108e67a52 std::__1::istreambuf_iterator<char, std::__1::char_traits<char> > std::__1::num_get<char, std::__1::istreambuf_iterator<char, std::__1::char_traits<char> > >::__do_get_signed<long>(std::__1::istreambuf_iterator<char, std::__1::char_traits<char> >, std::__1::istreambuf_iterator<char, std::__1::char_traits<char> >, std::__1::ios_base&, unsigned int&, long&) const + 50
1   libc++.1.dylib                  0x00007fff20446e62 std::__1::basic_ostream<char, std::__1::char_traits<char> >::operator<<(int) + 272
2   libboost_serialization-mt.dylib 0x0000000107634b12 boost::archive::basic_xml_oarchive<boost::archive::xml_oarchive>::write_attribute(char const*, int, char const*) + 194
3   libboost_serialization-mt.dylib 0x000000010763487b boost::archive::basic_xml_oarchive<boost::archive::xml_oarchive>::init() + 1579
4   fr.inria.Natron                 0x0000000106966e03 Natron::Project::saveProjectInternal(QString const&, QString const&, bool, bool) + 2291
5   fr.inria.Natron                 0x0000000106966268 Natron::Project::saveProject_imp(QString const&, QString const&, bool, bool, QString*) + 424
6   fr.inria.Natron                 0x000000010696ec23 Natron::Project::autoSave() + 227
7   fr.inria.Natron                 0x0000000106402d60 QtConcurrent::RunFunctionTask<void>::run() + 48
8   QtCore                          0x0000000108a0a542 QThreadPoolThread::run() + 210
9   QtCore                          0x0000000108a181a8 QThreadPrivate::start(void*) + 376
10  libsystem_pthread.dylib         0x00007fff204d58fc _pthread_start + 224
11  libsystem_pthread.dylib         0x00007fff204d1443 thread_start + 15

Thread 12:: Global Thread (Pooled) (0x600000249768)
0   libsystem_kernel.dylib          0x00007fff204a2cce __psynch_cvwait + 10
1   libsystem_pthread.dylib         0x00007fff204d5e49 _pthread_cond_wait + 1298
2   QtCore                          0x0000000108a1982b QWaitConditionPrivate::wait(unsigned long) + 235
3   QtCore                          0x0000000108a19707 QWaitCondition::wait(QMutex*, unsigned long) + 87
4   QtCore                          0x0000000108a0a704 QThreadPoolThread::run() + 660
5   QtCore                          0x0000000108a181a8 QThreadPrivate::start(void*) + 376
6   libsystem_pthread.dylib         0x00007fff204d58fc _pthread_start + 224
7   libsystem_pthread.dylib         0x00007fff204d1443 thread_start + 15

Thread 13:: Global Thread (Pooled) (0x6000002499a8)
0   libsystem_kernel.dylib          0x00007fff204a2cce __psynch_cvwait + 10
1   libsystem_pthread.dylib         0x00007fff204d5e49 _pthread_cond_wait + 1298
2   QtCore                          0x0000000108a1982b QWaitConditionPrivate::wait(unsigned long) + 235
3   QtCore                          0x0000000108a19707 QWaitCondition::wait(QMutex*, unsigned long) + 87
4   QtCore                          0x0000000108a0a704 QThreadPoolThread::run() + 660
5   QtCore                          0x0000000108a181a8 QThreadPrivate::start(void*) + 376
6   libsystem_pthread.dylib         0x00007fff204d58fc _pthread_start + 224
7   libsystem_pthread.dylib         0x00007fff204d1443 thread_start + 15
rodlie commented 1 year ago

Same issue with my MBP running 10.15.

rodlie commented 1 year ago

And my iMac running 10.13.

rodlie commented 1 year ago

And the same happens with 2.4.4.

2.4.3 (that I was originally using) works fine on all my Macs. I can only assume broken build/macports(?) from 2.4.4+.

devernay commented 1 year ago

The crash happens while doing the autosave:

Thread 11 Crashed:: Global Thread (Pooled) (0x6000002497e8)
0   libc++.1.dylib                  0x0000000108e67a52 std::__1::istreambuf_iterator<char, std::__1::char_traits<char> > std::__1::num_get<char, std::__1::istreambuf_iterator<char, std::__1::char_traits<char> > >::__do_get_signed<long>(std::__1::istreambuf_iterator<char, std::__1::char_traits<char> >, std::__1::istreambuf_iterator<char, std::__1::char_traits<char> >, std::__1::ios_base&, unsigned int&, long&) const + 50
1   libc++.1.dylib                  0x00007fff20446e62 std::__1::basic_ostream<char, std::__1::char_traits<char> >::operator<<(int) + 272
2   libboost_serialization-mt.dylib 0x0000000107634b12 boost::archive::basic_xml_oarchive<boost::archive::xml_oarchive>::write_attribute(char const*, int, char const*) + 194
devernay commented 1 year ago

can you try moving /Applications/Natron.app/Contents/Frameworks/libc++.1.dylib to some other place?

rodlie commented 1 year ago

can you try moving /Applications/Natron.app/Contents/Frameworks/libc++.1.dylib to some other place?

That worked 👍 (only tested on my MBA running macOS11).

devernay commented 1 year ago

ok I will have to check why this was included in the distrib. pinned the issue so I know it has to be fixed

devernay commented 1 year ago

fixed by:

I'm rebuilding the binaries for 2.4.4, 2.5.0 and 2.6-alpha on 10.9, 10.15, 12

devernay commented 1 year ago

all binaries updated. Please reopen if it still crashes