AcademySoftwareFoundation / xstudio

xSTUDIO is a modern, high performance and feature rich playback and review application designed for organisations and individuals in the post production, VFX and Animation industries.
Apache License 2.0
640 stars 83 forks source link

OpenTimelineIO Module Not Found and Qt5 Assertion Error #24

Closed dkanada closed 1 year ago

dkanada commented 1 year ago

After some effort I've been able to squash most of my build problems, but I have two remaining issues with no leads and thought it was time for an issue report. The first one is that I have a system python3.6 and another python3.7 scoped to /usr/local to avoid dependency conflicts on my CentOS installation. OpenTimelineIO seems to load fine when the latter is used but the shared object file _opentime refuses to import unless I install the dependency to my python3.6 environment. It's essentially refusing to import (only) the shared objects but I have no clue why at the moment.

[info] xStudio logging started.
[...]
[info] API enabled on 127.0.0.1:45500, session name default0
[...]
[info] xStudio UI launched.
ASSERT: "last >= first" in file itemmodels/qabstactitemmodel.cpp, line 2760
Aborted

This second error is even more cryptic and seems to be scoped to the Qt5 codebase. I originally thought it was related to the python warning (that one was printing a lot of logs) but after installing OpenTimelineIO into the python3.6 environment it still persists. Any pointers on this one?

dkanada commented 1 year ago

Just for reference, the Qt5 build is based off the v5.15.8-lts-lgpl branch from the upstream repository. Seems to build and function fine otherwise, but xStudio will open a window and immediately crash with the above assertion error.

tedwaine commented 1 year ago

Hi, thanks for the feedback. Re the qt issue - I have just built with 5.15.8 and don't see the issue here, however there are various build options with the qt libs so it could be quite hard to replicate on my end. We are on CentOS 7.6, what OS are you building on? I'm relying on DNEGs build system which applies certain switches on the Qt build which I am not fully aware of. I am using gcc 9.3.1. What we have tested with on 'vanilla' distros (without DNEG's build system) is the pre-built distribution that Qt provides via the SDK downloader tool, and we select 5.15 LTS (not sure which patch version that resolves to at this time) Are you able to give a quick description of how you built qt5? Are you using the same compiler for qt as for the xSTUDIO build? thanks.

Re the python issue - which version of python is cmake locating when you build xSTUDIO, the. system (3.6) or is it finding your 3.7 python in /usr/local ? You should see a ' -- Found Python: ... ' message when you run cmake.

dkanada commented 1 year ago

Building everything on CentOS 7.9.2009 with GCC 9.3.1 from the devtoolset-9 package. I am noticing some weird inconsistencies in the configure step regarding python so perhaps you can shed some light there. Tried the PYTHON_EXECUTABLE flag on cmake to force 3.6 but it doesn't seem to work everywhere.

-- Found Python: /usr/local/bin/python3.7 (found version "3.7.11")
-- Found PythonInterp: /bin/python3.6 (found suitable version "3.6.8")
-- Found PythonLibs: /usr/lib64/libpython3.6m.so
-- Found pybind11: /usr/local/include (found version "2.6.2")
-- Found Python: /usr/local/bin/python3.7 (found version "3.7.11")

Regarding the Qt5 build I'll include the steps below. I did have to install a number of dependencies to get the xcb plugin working but other than that it seems fine.

git clone https://code.qt.io/qt/qt5

cd qt5
git checkout v5.15.8-lts-lgpl
perl init-repository

./configure -opensource -developer-build -confirm-license -prefix /opt/xstudio -nomake examples -nomake tests

make --jobs
make install

I also noticed some new warnings during the launch that could potentially be causing issues. Not sure if those would cause a full crash though.

Failed to read preference override Invalid override path /root/.config/DNEG/xstudio/preferences/new_session.json
Failed to read preference override Invalid override path /root/.config/DNEG/xstudio/preferences/qml_ui.json
Failed to read preference override Invalid override path /root/.config/DNEG/xstudio/preferences/application.json
dkanada commented 1 year ago

I was able to resolve all outstanding Python quirks by removing the 3.7 installation, but the Qt5 crash has been consistent through everything. No warnings in the logs other than the three mentioned above so I don't have any new leads.

dkanada commented 1 year ago

Managed to resolve the Qt5 errors so everything is good now. The first requirement was including the list of dependencies below to make sure Qt5 had X11 support. The assert error was caused by the -developer-build flag, which seems to disable -release during the configure step despite it being the default. Hopefully this is enough context to include Qt5 in the documentation, which is the only manual step in the process right now. At some point I'd love to figure out how I can reduce the Qt5 compile time by excluding unused modules.