Maya Crash During Extract Import Reference

Hello everyone,

I encountered a crash in Maya during the publishing process, shortly after updating dependencies via the tools. The issue began when I received an error about a missing dependency: OpenTimelineIO.

After some testing, I found that if I disable the Extract Import Reference plugin, the publishing process runs smoothly without any issues.

Has anyone experienced something similar, or is there a recommended fix for this?

Thanks in advance!

Here’s the log from maya

Summary
//=====================================================
Maya Crash Report
//=====================================================

Exception code: C0000005: ACCESS_VIOLATION - illegal write at address 0xBA7FD200
Fault address:  BA7FD200 in C:\Program Files\Autodesk\Maya2025\bin\Foundation.dll
0002:00047200 Logical offset (see .map file for location)

Call stack:
	Module:  C:\Program Files\Autodesk\Maya2025\bin\Foundation.dll (-exported-)
	Location: Foundation.dllTbaseDesktopLicensingUIHelper::`vftable' + 211A8 bytes
	Decl: const TbaseDesktopLicensingUIHelper::`vftable'
	Module:  C:\Program Files\Autodesk\Maya2025\bin\Shared.dll (-exported-)
	Location: Shared.dllTscene::collectSelectedNodes + 39 bytes
	Decl: public: void __cdecl Tscene::collectSelectedNodes(class TdependNode * __ptr64,class TDNarray & __ptr64) __ptr64
	Module:  C:\Program Files\Autodesk\Maya2025\bin\Shared.dll (-exported-)
	Location: Shared.dllTscene::copySelectedTo + 1C0 bytes
	Decl: public: bool __cdecl Tscene::copySelectedTo(class TsceneFile * __ptr64,bool,bool,bool,bool,enum TglobalTranslatorBase::TrefIOMode,enum TglobalTranslator::TunloadedRefIOMode) __ptr64
	Module:  C:\Program Files\Autodesk\Maya2025\bin\Shared.dll (-exported-)
	Location: Shared.dllTsceneOperator::saveScene + 3B4F bytes
	Decl: public: static bool __cdecl TsceneOperator::saveScene(class Tstring & __ptr64,class TsceneFile * __ptr64,bool,bool)
	Module:  C:\Program Files\Autodesk\Maya2025\bin\Shared.dll (-exported-)
	Location: Shared.dllTfileCmd::handleFileExportSelectedFlag + 218 bytes
	Decl: private: bool __cdecl TfileCmd::handleFileExportSelectedFlag(class TargDatabase & __ptr64,class TsceneFile * __ptr64,bool) __ptr64
	Module:  C:\Program Files\Autodesk\Maya2025\bin\Shared.dll (-exported-)
	Location: Shared.dllTfileCmd::handleFlags + 687 bytes
	Decl: protected: bool __cdecl TfileCmd::handleFlags(class TargDatabase & __ptr64,class TsceneFile * __ptr64,class TnamespaceSwapper * __ptr64,class TgraphDiff * __ptr64) __ptr64
	Module:  C:\Program Files\Autodesk\Maya2025\bin\Shared.dll (-exported-)
	Location: Shared.dllTfileCmd::handleFlags + D39 bytes
	Decl: protected: bool __cdecl TfileCmd::handleFlags(class TargDatabase & __ptr64,class Tstring const & __ptr64) __ptr64
	Module:  C:\Program Files\Autodesk\Maya2025\bin\Shared.dll (-exported-)
	Location: Shared.dllTfileCmd::doCommand + 370 bytes
	Decl: public: virtual bool __cdecl TfileCmd::doCommand(class TargList & __ptr64) __ptr64
	Module:  C:\Program Files\Autodesk\Maya2025\bin\CommandEngine.dll (-exported-)
	Location: CommandEngine.dllTpythonInterpreter::dispatchMayaCommand + 355 bytes
	Decl: public: static struct _object * __ptr64 __cdecl TpythonInterpreter::dispatchMayaCommand(class TmetaCommand & __ptr64,struct _object * __ptr64,struct _object * __ptr64)
	Module:  C:\Program Files\Autodesk\Maya2025\bin\CommandEngine.dll (-exported-)
	Location: CommandEngine.dllpythonDispatchMayaCommand + 78 bytes
	Decl: struct _object * __ptr64 __cdecl pythonDispatchMayaCommand(class TmetaCommand & __ptr64,struct _object * __ptr64,struct _object * __ptr64)
	Module:  C:\Program Files\Autodesk\Maya2025\bin\Shared.dll (-exported-)
	Location: Shared.dllTfileCmd::clearRefHierarchies + BA bytes
	Decl: public: static void __cdecl TfileCmd::clearRefHierarchies(void)
	Module:  C:\Program Files\Autodesk\Maya2025\bin\python311.dll (-exported-)
	Location: python311.dll_PyObject_MakeTpCall + 26C bytes
	Module:  C:\Program Files\Autodesk\Maya2025\bin\python311.dll (-exported-)
	Location: python311.dllPyObject_Vectorcall + 1E8 bytes
	Module:  C:\Program Files\Autodesk\Maya2025\bin\python311.dll (-exported-)
	Location: python311.dll_PyEval_EvalFrameDefault + 784 bytes
	Module:  C:\Program Files\Autodesk\Maya2025\bin\python311.dll (-exported-)
	Location: python311.dllPyIter_Send + 1CEE bytes
	Module:  C:\Program Files\Autodesk\Maya2025\bin\python311.dll (-exported-)
	Location: python311.dllPyList_AsTuple + 4FC bytes
	Module:  C:\Program Files\Autodesk\Maya2025\bin\python311.dll (-exported-)
	Location: python311.dll_PyEval_EvalFrameDefault + 5076 bytes
	Module:  C:\Program Files\Autodesk\Maya2025\bin\python311.dll (-exported-)
	Location: python311.dllPyIter_Send + 1CEE bytes
	Module:  C:\Program Files\Autodesk\Maya2025\bin\python311.dll (-exported-)
	Location: python311.dllPyUnicode_CopyCharacters + 989 bytes
	Module:  C:\Program Files\Autodesk\Maya2025\bin\python311.dll (-exported-)
	Location: python311.dllPyUnicode_CopyCharacters + 8A3 bytes
	Module:  C:\Program Files\Autodesk\Maya2025\bin\python311.dll (-exported-)
	Location: python311.dllPyList_AsTuple + 4FC bytes
	Module:  C:\Program Files\Autodesk\Maya2025\bin\python311.dll (-exported-)
	Location: python311.dll_PyEval_EvalFrameDefault + 5076 bytes
	Module:  C:\Program Files\Autodesk\Maya2025\bin\python311.dll (-exported-)
	Location: python311.dll_PyFunction_Vectorcall + 1A4 bytes
	Module:  C:\Program Files\Autodesk\Maya2025\bin\python311.dll (-exported-)
	Location: python311.dllPyIter_Send + 20FE bytes
	Module:  C:\Program Files\Autodesk\Maya2025\bin\python311.dll (-exported-)
	Location: python311.dll_PyObject_Call + 5B bytes
	Module:  C:\Program Files\Autodesk\Maya2025\Python\Lib\site-packages\PySide6\pyside6.abi3.dll (-exported-)
	Location: pyside6.abi3.dllPySide::SignalManager::callPythonMetaMethod + 113 bytes
	Decl: public: static int __cdecl PySide::SignalManager::callPythonMetaMethod(class QMetaMethod const & __ptr64,void * __ptr64 * __ptr64,struct _object * __ptr64,bool)
	Module:  C:\Program Files\Autodesk\Maya2025\Python\Lib\site-packages\PySide6\pyside6.abi3.dll (-exported-)
	Location: pyside6.abi3.dllPySide::SignalManager::notifyGlobalReceiver + 4FC bytes
	Decl: public: void __cdecl PySide::SignalManager::notifyGlobalReceiver(class QObject * __ptr64) __ptr64
	Module:  C:\Program Files\Autodesk\Maya2025\Python\Lib\site-packages\PySide6\pyside6.abi3.dll (-exported-)
	Location: pyside6.abi3.dllPySide::SignalManager::qt_metacall + 6F bytes
	Decl: public: static int __cdecl PySide::SignalManager::qt_metacall(class QObject * __ptr64,enum QMetaObject::Call,int,void * __ptr64 * __ptr64)
	Module:  C:\Program Files\Autodesk\Maya2025\Python\Lib\site-packages\PySide6\QtCore.pyd (-exported-)
	Location: QtCore.pyd<7FFC9BC93BCA>
	Decl:  ?? 
	Module:  C:\Program Files\Autodesk\Maya2025\bin\Qt6Core.dll (-exported-)
	Location: Qt6Core.dllQMetaObject::metacall + 41 bytes
	Decl: public: static int __cdecl QMetaObject::metacall(class QObject * __ptr64,enum QMetaObject::Call,int,void * __ptr64 * __ptr64)
	Module:  C:\Program Files\Autodesk\Maya2025\bin\Qt6Core.dll (-exported-)
	Location: Qt6Core.dllQObject::qt_static_metacall + 183E bytes
	Decl: private: static void __cdecl QObject::qt_static_metacall(class QObject * __ptr64,enum QMetaObject::Call,int,void * __ptr64 * __ptr64)
	Module:  C:\Program Files\Autodesk\Maya2025\bin\Qt6Core.dll (-exported-)
	Location: Qt6Core.dllQMetaObject::activate + 84 bytes
	Decl: public: static void __cdecl QMetaObject::activate(class QObject * __ptr64,struct QMetaObject const * __ptr64,int,void * __ptr64 * __ptr64)
	Module:  C:\Program Files\Autodesk\Maya2025\bin\Qt6Core.dll (-exported-)
	Location: Qt6Core.dllQTimer::timerEvent + 7C bytes
	Decl: protected: virtual void __cdecl QTimer::timerEvent(class QTimerEvent * __ptr64) __ptr64
	Module:  C:\Program Files\Autodesk\Maya2025\Python\Lib\site-packages\PySide6\QtCore.pyd (-exported-)
	Location: QtCore.pyd<7FFC9BD5330C>
	Decl:  ?? 
	Module:  C:\Program Files\Autodesk\Maya2025\bin\Qt6Core.dll (-exported-)
	Location: Qt6Core.dllQObject::event + 60 bytes
	Decl: public: virtual bool __cdecl QObject::event(class QEvent * __ptr64) __ptr64
	Module:  C:\Program Files\Autodesk\Maya2025\Python\Lib\site-packages\PySide6\QtCore.pyd (-exported-)
	Location: QtCore.pyd<7FFC9BD52C0C>
	Decl:  ?? 
	Module:  C:\Program Files\Autodesk\Maya2025\bin\Qt6Widgets.dll (-exported-)
	Location: Qt6Widgets.dllQApplicationPrivate::notify_helper + 10E bytes
	Decl: public: bool __cdecl QApplicationPrivate::notify_helper(class QObject * __ptr64,class QEvent * __ptr64) __ptr64
	Module:  C:\Program Files\Autodesk\Maya2025\bin\Qt6Widgets.dll (-exported-)
	Location: Qt6Widgets.dllQApplication::notify + 172A bytes
	Decl: public: virtual bool __cdecl QApplication::notify(class QObject * __ptr64,class QEvent * __ptr64) __ptr64
	Module:  C:\Program Files\Autodesk\Maya2025\bin\ExtensionLayer.dll (-exported-)
	Location: ExtensionLayer.dllQmayaApplication::initializeGLDebugLogger + 530 bytes
	Decl: public: void __cdecl QmayaApplication::initializeGLDebugLogger(void) __ptr64
	Module:  C:\Program Files\Autodesk\Maya2025\bin\Qt6Core.dll (-exported-)
	Location: Qt6Core.dllQCoreApplication::notifyInternal2 + C5 bytes
	Decl: private: static bool __cdecl QCoreApplication::notifyInternal2(class QObject * __ptr64,class QEvent * __ptr64)
	Module:  C:\Program Files\Autodesk\Maya2025\bin\Qt6Core.dll (-exported-)
	Location: Qt6Core.dllQEventDispatcherWin32::event + 7E bytes
	Decl: public: virtual bool __cdecl QEventDispatcherWin32::event(class QEvent * __ptr64) __ptr64
	Module:  C:\Program Files\Autodesk\Maya2025\bin\Qt6Widgets.dll (-exported-)
	Location: Qt6Widgets.dllQApplicationPrivate::notify_helper + 10E bytes
	Decl: public: bool __cdecl QApplicationPrivate::notify_helper(class QObject * __ptr64,class QEvent * __ptr64) __ptr64
	Module:  C:\Program Files\Autodesk\Maya2025\bin\Qt6Widgets.dll (-exported-)
	Location: Qt6Widgets.dllQApplication::notify + 172A bytes
	Decl: public: virtual bool __cdecl QApplication::notify(class QObject * __ptr64,class QEvent * __ptr64) __ptr64
	Module:  C:\Program Files\Autodesk\Maya2025\bin\ExtensionLayer.dll (-exported-)
	Location: ExtensionLayer.dllQmayaApplication::initializeGLDebugLogger + 530 bytes
	Decl: public: void __cdecl QmayaApplication::initializeGLDebugLogger(void) __ptr64
	Module:  C:\Program Files\Autodesk\Maya2025\bin\Qt6Core.dll (-exported-)
	Location: Qt6Core.dllQCoreApplication::notifyInternal2 + C5 bytes
	Decl: private: static bool __cdecl QCoreApplication::notifyInternal2(class QObject * __ptr64,class QEvent * __ptr64)
	Module:  C:\Program Files\Autodesk\Maya2025\bin\Qt6Core.dll (-exported-)
	Location: Qt6Core.dllQCoreApplicationPrivate::sendPostedEvents + 1F5 bytes
	Decl: public: static void __cdecl QCoreApplicationPrivate::sendPostedEvents(class QObject * __ptr64,int,class QThreadData * __ptr64)
	Module:  C:\Program Files\Autodesk\Maya2025\bin\Qt6Gui.dll (-exported-)
	Location: Qt6Gui.dllQWindowsGuiEventDispatcher::sendPostedEvents + F bytes
	Decl: public: virtual void __cdecl QWindowsGuiEventDispatcher::sendPostedEvents(void) __ptr64
	Module:  C:\Program Files\Autodesk\Maya2025\bin\Qt6Core.dll (-exported-)
	Location: Qt6Core.dllQEventDispatcherWin32::processEvents + 8A bytes
	Decl: public: virtual bool __cdecl QEventDispatcherWin32::processEvents(class QFlags<enum QEventLoop::ProcessEventsFlag>) __ptr64
	Module:  C:\Program Files\Autodesk\Maya2025\bin\Qt6Gui.dll (-exported-)
	Location: Qt6Gui.dllQWindowsGuiEventDispatcher::processEvents + 19 bytes
	Decl: public: virtual bool __cdecl QWindowsGuiEventDispatcher::processEvents(class QFlags<enum QEventLoop::ProcessEventsFlag>) __ptr64
	Module:  C:\Program Files\Autodesk\Maya2025\bin\Qt6Core.dll (-exported-)
	Location: Qt6Core.dllQEventLoop::exec + 1C4 bytes
	Decl: public: int __cdecl QEventLoop::exec(class QFlags<enum QEventLoop::ProcessEventsFlag>) __ptr64
	Module:  C:\Program Files\Autodesk\Maya2025\bin\Qt6Core.dll (-exported-)
	Location: Qt6Core.dllQCoreApplication::exec + 15D bytes
	Decl: public: static int __cdecl QCoreApplication::exec(void)
	Module:  C:\Program Files\Autodesk\Maya2025\bin\ExtensionLayer.dll (-exported-)
	Location: ExtensionLayer.dllTapplication::start + 16E bytes
	Decl: public: void __cdecl Tapplication::start(void) __ptr64
	Module:  C:\Program Files\Autodesk\Maya2025\bin\maya.exe (-exported-)
	Location: maya.exeTiteratorWrapperFwd<TscenePartitions::ConstIteratorDescriptor,TiteratorWrapper<TscenePartitions::ConstIteratorDescriptor> >::operator++ + 15C7 bytes
	Decl: public: class TiteratorWrapper<struct TscenePartitions::ConstIteratorDescriptor> & __ptr64 __cdecl TiteratorWrapperFwd<struct TscenePartitions::ConstIteratorDescriptor,class TiteratorWrapper<struct TscenePartitions::ConstIteratorDescriptor> >::operator++
	Module:  C:\Program Files\Autodesk\Maya2025\bin\maya.exe (-exported-)
	Location: maya.exeTiteratorWrapperFwd<TscenePartitions::ConstIteratorDescriptor,TiteratorWrapper<TscenePartitions::ConstIteratorDescriptor> >::operator++ + 198FD bytes
	Decl: public: class TiteratorWrapper<struct TscenePartitions::ConstIteratorDescriptor> & __ptr64 __cdecl TiteratorWrapperFwd<struct TscenePartitions::ConstIteratorDescriptor,class TiteratorWrapper<struct TscenePartitions::ConstIteratorDescriptor> >::operator++
	Module:  C:\Program Files\Autodesk\Maya2025\bin\maya.exe (-exported-)
	Location: maya.exeTiteratorWrapperFwd<TscenePartitions::ConstIteratorDescriptor,TiteratorWrapper<TscenePartitions::ConstIteratorDescriptor> >::operator++ + 187DE bytes
	Decl: public: class TiteratorWrapper<struct TscenePartitions::ConstIteratorDescriptor> & __ptr64 __cdecl TiteratorWrapperFwd<struct TscenePartitions::ConstIteratorDescriptor,class TiteratorWrapper<struct TscenePartitions::ConstIteratorDescriptor> >::operator++
	Module:  C:\WINDOWS\System32\KERNEL32.DLL (-exported-)
	Location: KERNEL32.DLLBaseThreadInitThunk + 17 bytes
	Module:  C:\WINDOWS\SYSTEM32\ntdll.dll (-exported-)
	Location: ntdll.dllRtlUserThreadStart + 2C bytes
End of stack

//crash log file name = C:/Users/User/AppData/Local/Temp/MayaCrashLog250424.2007.log
//version     = 25.1.0.4263
//cut            =  04/24/2024, 202404240506
//current scene = unDisclosed
//command history (most recent last):
//====================================================
//last tool: renderWindowSelectContextItem
//====================================================
//panel with focus: modelPanel4
//visible panels:
// modelPanel4 outlinerPanel1 
//====================================================
//Memory usage:
// 98632.090 Mb	Free Memory
// 100176.953 Mb	Free Swap
// 2393.504 Mb	Current

//====================================================
//Python stack:
  File: "C:\Users\User\AppData\Local\Ynput\AYON\addons\core_1.1.8\ayon_core\tools\publisher\control_qt.py", line 52, in _execute(self=<ayon_core.tools.publisher.control_qt.MainThreadProcess(0x222d13f80b0) at 0x00000222867C6EC0>)
        item.process()
  File: "C:\Users\User\AppData\Local\Ynput\AYON\addons\core_1.1.8\ayon_core\tools\publisher\control_qt.py", line 20, in process(self=<ayon_core.tools.publisher.control_qt.MainThreadItem object at 0x000002236C746D50>)
        self.callback(*self.args, **self.kwargs)
  File: "C:\Users\User\AppData\Local\Ynput\AYON\addons\core_1.1.8\ayon_core\tools\publisher\models\publish.py", line 1330, in _process_and_continue(self=<ayon_core.tools.publisher.models.publish.PublishModel object at 0x00000222867C7510>, plugin=<class 'extract_import_reference.ExtractImportReference'>, instance=pyblish.plugin.Instance("workfileModeling"))
            result = pyblish.plugin.process(
  File: "C:\Users\User\AppData\Local\Ynput\AYON\dependency_packages\ayon_2504241637_windows.zip\dependencies\pyblish\plugin.py", line 476, in process(plugin=<class 'extract_import_reference.ExtractImportReference'>, context=[pyblish.plugin.Instance("modelSmall"), pyblish.plugin.Instance("reviewSmall"), pyblish.plugin.Instance("workfileModeling")], instance=pyblish.plugin.Instance("workfileModeling"), action=None)
        result = __explicit_process(plugin, context, instance, action)
  File: "C:\Users\User\AppData\Local\Ynput\AYON\dependency_packages\ayon_2504241637_windows.zip\dependencies\pyblish\plugin.py", line 528, in __explicit_process(plugin=<class 'extract_import_reference.ExtractImportReference'>, context=[pyblish.plugin.Instance("modelSmall"), pyblish.plugin.Instance("reviewSmall"), pyblish.plugin.Instance("workfileModeling")], instance=pyblish.plugin.Instance("workfileModeling"), action=None)
            runner(*args)
  File: "C:\Users\User\AppData\Local\Ynput\AYON\addons\maya_0.4.6\ayon_maya\plugins\publish\extract_import_reference.py", line 134, in process(self=pyblish.plugin.ExtractImportReference('Extract Import Reference'), instance=pyblish.plugin.Instance("workfileModeling"))
            cmds.file(reference_path,

//====================================================

so, it’s

  • Maya2025 Py3.11
  • AYON core 1.1.8
  • AYON Maya 0.4.6

I’ve something similar in Houdini 20.5.370 py 3.11 related to OpenTimelineIO

Crashed plugins:

E:\Ynput\ayon-core\client\ayon_core\plugins\publish\collect_otio_frame_ranges.py
Filepath:
E:\Ynput\ayon-core\client\ayon_core\plugins\publish\collect_otio_frame_ranges.py

Traceback:
Traceback (most recent call last):
File "E:\Ynput\ayon-core\client\ayon_core\pipeline\publish\lib.py", line 258, in publish_plugins_discover
module = import_filepath(
^^^^^^^^^^^^^^^^
File "E:\Ynput\ayon-core\client\ayon_core\lib\python_module_tools.py", line 45, in import_filepath
module_loader.exec_module(module)
File "", line 940, in exec_module
File "", line 241, in _call_with_frames_removed
File "E:\Ynput\ayon-core\client\ayon_core\plugins\publish\collect_otio_frame_ranges.py", line 11, in 
import opentimelineio as otio
File "C:\Program Files\Side Effects Software\Houdini 20.5.370\python311\lib\site-packages-forced\shiboken2\files.dir\shibokensupport\feature.py", line 139, in _import
return original_import(name, *args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
ModuleNotFoundError: No module named 'opentimelineio'

Do you need it enabled? :slight_smile: If not, you can disable ayon+settings://deadline/publish/MayaSubmitDeadline/import_reference

Otherwise, from the maya session try running a mayapy session.

import subprocess
subprocess.Popen("mayapy")

In the mayapy, run this to initialize:

import maya.standalone
maya.standalone.initialize()

If already crashing - then it’s the Maya initializing that is crashing for you for mayapy. Which usually hints to errors with plug-ins on your end.

Other than that the logic is runs after initialization is equal to:

# PLEASE SET THE CORRECT FILEPATHS HERE
current_name = r"/path/to/maya/scene.ma"
ref_scene_name = r"/path/to/write/new/scene.ma"

print(">>> Opening {{}} ...".format(current_name))
cmds.file(current_name, open=True, force=True)
print(">>> Processing references")
all_reference = cmds.file(q=True, reference=True) or []
for ref in all_reference:
    if cmds.referenceQuery(ref, il=True):
        cmds.file(ref, importReference=True)

        nested_ref = cmds.file(q=True, reference=True)
        if nested_ref:
            for new_ref in nested_ref:
                if new_ref not in all_reference:
                    all_reference.append(new_ref)

print(">>> Finish importing references")
print(">>> Saving scene as {{}}".format(ref_scene_name))

cmds.file(rename=ref_scene_name)
cmds.file(save=True, force=True)
print("*** Done")

So you could essentially test run that too and see where it crashes.

(I’m assuming your issue is the subprocess maya crashing… otherwise it’d be very weird)


also commented on discord

1 Like

Actually, it seems to crash here.

Which would mean that this would already crash:

from maya import cmds

reference_path = r"path/to/output.ma"
_scene_type = "mayaAscii"  # or "mayaBinary"

cmds.select(all=True, noExpand=True)
cmds.file(reference_path,
          force=True,
          typ=_scene_type,
          exportSelected=True,
          channels=True,
          constraints=True,
          shader=True,
          expressions=True,
          constructionHistory=True)

Does that crash in your maya session? If so, sounds like a Maya bug.

yes its crashing my maya after running that line

I assume you meant the export selection I mentioned here. If so, for whatever reason an “export selected” of all objects in your scene fails. Admittedly I’m not too familiar about why that logic is there but that does sound very much like a Maya bug.

Could it be that you’re doing the export selection while you’re actively in a renderlayer? (Maya has the tendency to dislike exports when inside a renderlayer). If so, can you try running the command from the master layer?


Anyway, I have no idea why we’re doing that export to begin with.

thanks, i think that was the cause. going back to the masterlayer does fix the crash.
but still error with the otio.

That Maya crash might be caused by some timeout issues - from the traceback it is difficult to figure exact reason but it might be because of the scene is heavy and the selection doesn’t happen fast enough. Maybe that’s why it works if you run the logic independently but it doesn’t work when it is part of publishing process.

Anyway the OTIO related error - I guess we should not import opentimelineio in the plugin like that and rather move it to process() so it won’t crash if opentimelineio isn’t available in the host.