Giter VIP home page Giter VIP logo

Comments (4)

leamas avatar leamas commented on May 26, 2024

Same on Fedora 36, building from source at 9967dec

EDIT: The crash only occurs on Wayland, on Xorg everything is fine.

Stacktrace:

#0  __pthread_kill_implementation
    (threadid=<optimized out>, signo=signo@entry=6, no_tid=no_tid@entry=0)
    at pthread_kill.c:44
#1  0x00007ffff608ec73 in __pthread_kill_internal
    (signo=6, threadid=<optimized out>) at pthread_kill.c:78
#2  0x00007ffff603e986 in __GI_raise (sig=sig@entry=6)
    at ../sysdeps/posix/raise.c:26
#3  0x00007ffff60287f4 in __GI_abort () at abort.c:79
#4  0x00007ffff64a2b77 in __gnu_cxx::__verbose_terminate_handler() ()
    at ../../../../libstdc++-v3/libsupc++/vterminate.cc:95
#5  0x00007ffff64ae3bc in __cxxabiv1::__terminate(void (*)())
    (handler=<optimized out>)
    at ../../../../libstdc++-v3/libsupc++/eh_terminate.cc:48
#6  0x00007ffff64ae427 in std::terminate() ()
    at ../../../../libstdc++-v3/libsupc++/eh_terminate.cc:58
#7  0x00007ffff64ae6db in __cxxabiv1::__cxa_rethrow() ()
    at ../../../../libstdc++-v3/libsupc++/eh_throw.cc:136
#8  0x00007ffff6e857cc in QCoreApplication::notifyInternal(QObject*, QEvent*)
    (this=0x7fffffffdac0, receiver=receiver@entry=0x7fffffffd9d0, event=event@entry=0x7fffffffd8f0) at kernel/qcoreapplication.cpp:958
#9  0x00007ffff74cdac5 in QCoreApplication::sendEvent(QObject*, QEvent*)
    (event=0x7fffffffd8f0, receiver=0x7fffffffd9d0)
    at ../../include/QtCore/../../src/corelib/kernel/qcoreapplication.h:231
#10 QWidgetPrivate::show_helper() (this=0x848600) at kernel/qwidget.cpp:7569
#11 0x00007ffff74cf6ec in QWidget::setVisible(bool)
    (this=0x7fffffffd9d0, visible=<optimized out>) at kernel/qwidget.cpp:7791
#12 0x00000000004f2652 in QWidget::show() (this=0x7fffffffd9d0)
    at /usr/include/QtGui/qwidget.h:497
#13 0x00000000004f22c2 in main(int, char**) (argc=1, argv=0x7fffffffdc78)
    at /home/mk/src/android-file-transfer-linux/qt/main.cpp:85

from android-file-transfer-linux.

leamas avatar leamas commented on May 26, 2024

Furthermore, the crash on wayland can be avoided by export GDK_BACKEND=x11 before invoking android-file-transfer

from android-file-transfer-linux.

leamas avatar leamas commented on May 26, 2024

Below a simple patch which works around the issue (too lazy to make a PR, sorry, perhaps someone else is motivated)

iff --git a/qt/main.cpp b/qt/main.cpp
index 4a70feb..e5efbaf 100644
--- a/qt/main.cpp
+++ b/qt/main.cpp
@@ -25,6 +25,7 @@
 #include <QMessageBox>
 #include <QTranslator>
 #include <mtp/log.h>
+#include <stdlib.h>
 #if QT_VERSION >= 0x050000
 #      include <QGuiApplication>
 #endif
@@ -52,6 +53,10 @@ namespace
 
 int main(int argc, char *argv[])
 {
+       if (getenv("WAYLAND_DISPLAY")) {
+               // See #322
+               setenv("GDK_BACKEND", "x11", true);
+       }
        QApplication app(argc, argv);
        Q_INIT_RESOURCE(android_file_transfer);
 

from android-file-transfer-linux.

llyyr avatar llyyr commented on May 26, 2024

Setting GDK_BACKEND=x11 just forces aft to run under xwayland, you should instead set QT_QPA_PLATFORM=wayland to run under wayland

from android-file-transfer-linux.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.