Meshroom icon indicating copy to clipboard operation
Meshroom copied to clipboard

[bug] qtAliceVision cause Meshroom hang.

Open bartoszek opened this issue 2 years ago • 4 comments

Describe the bug When building Meshroom with qtAliceVision it hangs on the qml ui init.

To Reproduce Steps to reproduce the behavior:

  1. Build Meshroom without the qtAliceVision plugin
  2. It works.
  3. Build and install the qtAliceVision plugin
  4. It hangs on init

Expected behavior It works.

Screenshots Nothing to show here, no main window.

Log

$Meshroom
WARNING:root:== The following "aliceVision" plugins could not be loaded ==
  * SketchfabUpload: No module named 'requests'

WARNING:root:== The following "submitters" plugins could not be loaded ==
  * simpleFarmSubmitter: No module named 'simpleFarm'

Desktop (please complete the following and other pertinent information):

  • OS: {os:Linux,dist:Arch,gcc:11.1.0,cmake:3.21.1,python-cx-freeze:6.7}
  • Python version 3.9.6
  • Qt/PySide version 5.15.2
  • Meshroom version: own build ( I'm the current maintainer of AUR meshroom{,-git} and alice-vision{,-git}
    • Commit reference tested with both v2021.1.0 tag and current master at f1331c6a.

Additional context

Here's my build script for Meshroom: https://aur.archlinux.org/cgit/aur.git/tree/PKGBUILD?h=meshroom And my build script for alice-vision: https://aur.archlinux.org/cgit/aur.git/tree/PKGBUILD?h=alice-vision

Besides patching source for openexr:3 they're super basic.

They are working until qtAliceVision plugin is enabled, then calling Meshroom results in futex_lock

$strace Meshrom
statx(AT_FDCWD, "/usr/lib/Meshroom-2021.1.0/lib/meshroom/ui/qml/Viewer/+fusion", AT_STATX_SYNC_AS_STAT, STATX_ALL, 0x7fffa69dc6f0) = -1 ENOENT (Nie ma takiego pliku ani katalogu)
statx(AT_FDCWD, "/usr/lib/Meshroom-2021.1.0/lib/meshroom/ui/qml/Viewer/+pl_PL", AT_STATX_SYNC_AS_STAT, STATX_ALL, 0x7fffa69dc6f0) = -1 ENOENT (Nie ma takiego pliku ani katalogu)
statx(AT_FDCWD, "/usr/lib/Meshroom-2021.1.0/lib/meshroom/ui/qml/Viewer/+unix", AT_STATX_SYNC_AS_STAT, STATX_ALL, 0x7fffa69dc6f0) = -1 ENOENT (Nie ma takiego pliku ani katalogu)
statx(AT_FDCWD, "/usr/lib/Meshroom-2021.1.0/lib/meshroom/ui/qml/Viewer/+linux", AT_STATX_SYNC_AS_STAT, STATX_ALL, 0x7fffa69dc6f0) = -1 ENOENT (Nie ma takiego pliku ani katalogu)
statx(AT_FDCWD, "/usr/lib/Meshroom-2021.1.0/lib/meshroom/ui/qml/Viewer/+arch", AT_STATX_SYNC_AS_STAT, STATX_ALL, 0x7fffa69dc6f0) = -1 ENOENT (Nie ma takiego pliku ani katalogu)
access("/usr/lib/Meshroom-2021.1.0/lib/meshroom/ui/qml/Viewer/FloatImage.qml", F_OK) = 0
write(16, "\1\0\0\0\0\0\0\0", 8)        = 8
futex(0x5641a4d51d94, FUTEX_WAIT_BITSET_PRIVATE|FUTEX_CLOCK_REALTIME, 0, NULL, FUTEX_BITSET_MATCH_ANY) = ? ERESTARTSYS (To be restarted if SA_RESTART is set)

full strace.log

bartoszek avatar Aug 10 '21 07:08 bartoszek

Meshroom backtrace while hangs.

#0  0x00007ffff7f228ca in __futex_abstimed_wait_common64 () at /usr/lib/libpthread.so.0
#1  0x00007ffff7f1c270 in pthread_cond_wait@@GLIBC_2.3.2 () at /usr/lib/libpthread.so.0
#2  0x00007ffff647f07c in QWaitCondition::wait(QMutex*, QDeadlineTimer) ()
    at /usr/lib/Meshroom-2021.1.0/lib/PySide2/../../../libQt5Core.so.5
#3  0x00007ffff6251c90 in  () at /usr/lib/Meshroom-2021.1.0/lib/PySide2/../../../libQt5Qml.so.5
#4  0x00007ffff61d7975 in QQmlTypeLoader::load(QQmlDataBlob*, QQmlTypeLoader::Mode) ()
    at /usr/lib/Meshroom-2021.1.0/lib/PySide2/../../../libQt5Qml.so.5
#5  0x00007ffff61d82d9 in QQmlTypeLoader::getType(QUrl const&, QQmlTypeLoader::Mode) ()
    at /usr/lib/Meshroom-2021.1.0/lib/PySide2/../../../libQt5Qml.so.5
#6  0x00007ffff61b02f9 in QQmlComponentPrivate::loadUrl(QUrl const&, QQmlComponent::CompilationMode) ()
    at /usr/lib/Meshroom-2021.1.0/lib/PySide2/../../../libQt5Qml.so.5
#7  0x00007ffff625c196 in  () at /usr/lib/Meshroom-2021.1.0/lib/PySide2/../../../libQt5Qml.so.5
#8  0x00007ffff60e90c0 in  () at /usr/lib/Meshroom-2021.1.0/lib/PySide2/../../../libQt5Qml.so.5
#9  0x00007ffff60ebdbf in  () at /usr/lib/Meshroom-2021.1.0/lib/PySide2/../../../libQt5Qml.so.5
#10 0x00007ffff607e0df in QV4::Function::call(QV4::Value const*, QV4::Value const*, int, QV4::ExecutionContext const*) ()
    at /usr/lib/Meshroom-2021.1.0/lib/PySide2/../../../libQt5Qml.so.5
#11 0x00007ffff6209f36 in QQmlJavaScriptExpression::evaluate(QV4::CallData*, bool*) ()
    at /usr/lib/Meshroom-2021.1.0/lib/PySide2/../../../libQt5Qml.so.5
#12 0x00007ffff62101c5 in QQmlBinding::evaluate(bool*) () at /usr/lib/Meshroom-2021.1.0/lib/PySide2/../../../libQt5Qml.so.5
#13 0x00007ffff6214458 in  () at /usr/lib/Meshroom-2021.1.0/lib/PySide2/../../../libQt5Qml.so.5
#14 0x00007ffff6212164 in QQmlBinding::update(QFlags<QQmlPropertyData::WriteFlag>) ()
    at /usr/lib/Meshroom-2021.1.0/lib/PySide2/../../../libQt5Qml.so.5
#15 0x00007ffff621f943 in QQmlObjectCreator::finalize(QQmlInstantiationInterrupt&) ()
    at /usr/lib/Meshroom-2021.1.0/lib/PySide2/../../../libQt5Qml.so.5
#16 0x00007ffff61ae1dd in QQmlComponentPrivate::complete(QQmlEnginePrivate*, QQmlComponentPrivate::ConstructionState*) ()
    at /usr/lib/Meshroom-2021.1.0/lib/PySide2/../../../libQt5Qml.so.5
#17 0x00007ffff61b0883 in QQmlComponentPrivate::completeCreate() ()
    at /usr/lib/Meshroom-2021.1.0/lib/PySide2/../../../libQt5Qml.so.5
#18 0x00007ffff61b0a21 in QQmlComponent::create(QQmlContext*) ()
    at /usr/lib/Meshroom-2021.1.0/lib/PySide2/../../../libQt5Qml.so.5
#19 0x00007ffff62159c7 in QQmlApplicationEnginePrivate::finishLoad(QQmlComponent*) ()
    at /usr/lib/Meshroom-2021.1.0/lib/PySide2/../../../libQt5Qml.so.5
#20 0x00007ffff621628e in QQmlApplicationEngine::load(QString const&) ()
    at /usr/lib/Meshroom-2021.1.0/lib/PySide2/../../../libQt5Qml.so.5
#21 0x00007ffff09af754 in  () at /usr/lib/Meshroom-2021.1.0/lib/PySide2/QtQml.cpython-39-x86_64-linux-gnu.so
#22 0x00005555556fd6b7 in cfunction_vectorcall_O ()
#23 0x00005555556b4dc7 in _PyEval_EvalFrameDefault ()
#24 0x00005555556af6b1 in _PyEval_EvalCode ()
#25 0x0000555555664dcc in _PyFunction_Vectorcall ()
#26 0x00005555556f032d in method_vectorcall ()
#27 0x00005555556b4dc7 in _PyEval_EvalFrameDefault ()
#28 0x00005555556af6b1 in _PyEval_EvalCode ()
#29 0x0000555555665798 in _PyObject_Call_Prepend ()
#30 0x000055555568fca2 in slot_tp_init ()
#31 0x000055555568cc93 in type_call ()
#32 0x0000555555664468 in _PyObject_MakeTpCall ()
#33 0x00005555556b4eef in _PyEval_EvalFrameDefault ()
#34 0x00005555556af6b1 in _PyEval_EvalCode ()
#35 0x00005555556af3c1 in _PyEval_EvalCodeWithName ()
#36 0x0000555555732b63 in PyEval_EvalCode ()
#37 0x0000555555795f22 in builtin_exec ()
#38 0x00005555556fd7e8 in cfunction_vectorcall_FASTCALL ()
#39 0x00005555556b0589 in _PyEval_EvalFrameDefault ()
#40 0x00005555556af6b1 in _PyEval_EvalCode ()
#41 0x0000555555664dcc in _PyFunction_Vectorcall ()
#42 0x00005555556b4dc7 in _PyEval_EvalFrameDefault ()
#43 0x0000555555664d34 in _PyFunction_Vectorcall ()
#44 0x0000555555664bf6 in _PyObject_VectorcallTstate ()
#45 0x0000555555715d42 in ExecuteScript () at source/bases/Common.c:180
        module = 0x7ffff7573270
        function_init = 0x7ffff75fdb80
        result_init = 0x5555558a3ec0 <_Py_NoneStruct>
        function_run = 0x7ffff7482d30
        result_run = 0x5555558fd4f0
#46 0x0000555555715f94 in main (argc=1, argv=0x7fffffffd438) at source/bases/Console.c:112
        status = 0
        wargv = 0x5555558fd4f0
        wargv2 = 0x5555558fd510
        i = 1
        oldloc = 0x5555558fc2a0 "C"

bartoszek avatar Aug 10 '21 11:08 bartoszek

Running with QML_IMPORT_TRACE=1 doesn't show anything besides the import path.

$QML_IMPORT_TRACE=1 Meshroom
WARNING:root:== The following "aliceVision" plugins could not be loaded ==
  * SketchfabUpload: No module named 'requests'

WARNING:root:== The following "submitters" plugins could not be loaded ==
  * simpleFarmSubmitter: No module named 'simpleFarm'

QQmlImportDatabase::addImportPath: "/usr/lib/qt/qml"
QQmlImportDatabase::addImportPath: "/usr/lib/Meshroom-2021.1.0/qtPlugins/qml"
QQmlImportDatabase::addImportPath: "qrc:/qt-project.org/imports"
QQmlImportDatabase::addImportPath: "/usr/lib/Meshroom-2021.1.0"

bartoszek avatar Aug 10 '21 12:08 bartoszek

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

stale[bot] avatar Jun 12 '22 18:06 stale[bot]

I'm having the same problem, did you fix it?

nguyen1998pr avatar Aug 01 '22 10:08 nguyen1998pr