GithubHelp home page GithubHelp logo

Qt demo issue about calypso HOT 7 CLOSED

syniurge avatar syniurge commented on July 30, 2024
Qt demo issue

from calypso.

Comments (7)

Syniurge avatar Syniurge commented on July 30, 2024

Hi Kelly,

Did you copy the hierarchy of .modulemap_d files from utils/ into the Qt include folder? (that's the likely cause of the import errors) Also did you tell LDC to compile the moc/ files too?

It's working fine for me against Qt 5.5.1 downloaded from qt.io.

from calypso.

wilsonk avatar wilsonk commented on July 30, 2024

Hi Elie,

Yeah, I did forget to copy the modulemap files over and I was missing one of the moc files. Works fine now.

This is what happens when I step away from a project for a time...I tend to forget the small idiosyncracies and don't read the documentation closely enough :(

from calypso.

wilsonk avatar wilsonk commented on July 30, 2024

Things compile and work pretty much with this example now, but I did run into a segfault when starting to save a file and then just closing the save dialog immediately. This is the error I get:

Program received signal SIGSEGV, Segmentation fault.
0x00007ffff76eb39d in QWidgetPrivate::paintSiblingsRecursive(QPaintDevice*, QList<QObject*> const&, int, QRegion const&, QPoint const&, int, QPainter*, QWidgetBackingStore*) () from /home/wilsonk/Qt5.5.1/5.5/gcc_64/lib/libQt5Widgets.so.5
(gdb) bt
#0  0x00007ffff76eb39d in QWidgetPrivate::paintSiblingsRecursive(QPaintDevice*, QList<QObject*> const&, int, QRegion const&, QPoint const&, int, QPainter*, QWidgetBackingStore*) () from /home/wilsonk/Qt5.5.1/5.5/gcc_64/lib/libQt5Widgets.so.5
#1  0x00007ffff76ea652 in QWidgetPrivate::drawWidget(QPaintDevice*, QRegion const&, QPoint const&, int, QPainter*, QWidgetBackingStore*) () from /home/wilsonk/Qt5.5.1/5.5/gcc_64/lib/libQt5Widgets.so.5
#2  0x00007ffff76bd3d6 in ?? () from /home/wilsonk/Qt5.5.1/5.5/gcc_64/lib/libQt5Widgets.so.5
#3  0x00007ffff76bd761 in ?? () from /home/wilsonk/Qt5.5.1/5.5/gcc_64/lib/libQt5Widgets.so.5
#4  0x00007ffff76dcb6f in QWidgetPrivate::syncBackingStore() () from /home/wilsonk/Qt5.5.1/5.5/gcc_64/lib/libQt5Widgets.so.5
#5  0x00007ffff76f12a0 in QWidget::event(QEvent*) () from /home/wilsonk/Qt5.5.1/5.5/gcc_64/lib/libQt5Widgets.so.5
#6  0x00007ffff780207b in QMainWindow::event(QEvent*) () from /home/wilsonk/Qt5.5.1/5.5/gcc_64/lib/libQt5Widgets.so.5
#7  0x00007ffff76b04cc in QApplicationPrivate::notify_helper(QObject*, QEvent*) ()
   from /home/wilsonk/Qt5.5.1/5.5/gcc_64/lib/libQt5Widgets.so.5
#8  0x00007ffff76b5630 in QApplication::notify(QObject*, QEvent*) () from /home/wilsonk/Qt5.5.1/5.5/gcc_64/lib/libQt5Widgets.so.5
#9  0x00007ffff6895663 in QCoreApplication::notifyInternal(QObject*, QEvent*) ()
   from /home/wilsonk/Qt5.5.1/5.5/gcc_64/lib/libQt5Core.so.5
#10 0x00007ffff68978d3 in QCoreApplicationPrivate::sendPostedEvents(QObject*, int, QThreadData*) ()
   from /home/wilsonk/Qt5.5.1/5.5/gcc_64/lib/libQt5Core.so.5
#11 0x00007ffff68ea693 in ?? () from /home/wilsonk/Qt5.5.1/5.5/gcc_64/lib/libQt5Core.so.5
#12 0x00007ffff4ee5e04 in g_main_context_dispatch () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#13 0x00007ffff4ee6048 in ?? () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#14 0x00007ffff4ee60ec in g_main_context_iteration () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#15 0x00007ffff68eaa87 in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) ()
   from /home/wilsonk/Qt5.5.1/5.5/gcc_64/lib/libQt5Core.so.5
#16 0x00007ffff6893212 in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) ()
   from /home/wilsonk/Qt5.5.1/5.5/gcc_64/lib/libQt5Core.so.5
#17 0x00007ffff689ad3d in QCoreApplication::exec() () from /home/wilsonk/Qt5.5.1/5.5/gcc_64/lib/libQt5Core.so.5
#18 0x0000000000416ebe in D main ()
#19 0x0000000000472f3e in _d_run_main ()
#20 0x000000000041c875 in main ()

from calypso.

wilsonk avatar wilsonk commented on July 30, 2024

I guess the error is actually with the "Save As" functionality because just opening a file, modifying and saving works but the "Save As" dialog seems to be the problem. So whether you just start typing into the blank editor widget and then click "Save", or if you open a file and then click "Save As" you still get the segfault. Just to be clear for future reference :)

from calypso.

Syniurge avatar Syniurge commented on July 30, 2024

Good catch, the dialog destructor isn't being called, I'm looking into it.

from calypso.

wilsonk avatar wilsonk commented on July 30, 2024

The "Save As" error is fixed now but we are getting a double free error if you just open an existing file and then try to modify it in the textedit box. This error doesn't happen if I revert todays commits.

Received 'open' test signal
*** Error in `/home/wilsonk/Downloads/Calypso/tests/calypso/qt5/qt5demo': double free or corruption (!prev): 0x0000000000b84710 ***

Program received signal SIGABRT, Aborted.
0x00007ffff562ecc9 in __GI_raise (sig=sig@entry=6) at ../nptl/sysdeps/unix/sysv/linux/raise.c:56
56  ../nptl/sysdeps/unix/sysv/linux/raise.c: No such file or directory.
(gdb) bt
#0  0x00007ffff562ecc9 in __GI_raise (sig=sig@entry=6) at ../nptl/sysdeps/unix/sysv/linux/raise.c:56
#1  0x00007ffff56320d8 in __GI_abort () at abort.c:89
#2  0x00007ffff566b394 in __libc_message (do_abort=do_abort@entry=1, 
    fmt=fmt@entry=0x7ffff5779b28 "*** Error in `%s': %s: 0x%s ***\n") at ../sysdeps/posix/libc_fatal.c:175
#3  0x00007ffff567766e in malloc_printerr (ptr=<optimized out>, str=0x7ffff5779c10 "double free or corruption (!prev)", action=1)
    at malloc.c:4996
#4  _int_free (av=<optimized out>, p=<optimized out>, have_lock=0) at malloc.c:3840
#5  0x00007ffff67b94ad in QFileInfo::QFileInfo(QString const&) () from /home/wilsonk/Qt5.5.1/5.5/gcc_64/lib/libQt5Core.so.5
#6  0x00007ffff76db067 in QWidget::windowTitle() const () from /home/wilsonk/Qt5.5.1/5.5/gcc_64/lib/libQt5Widgets.so.5
#7  0x00007ffff76ded4e in QWidgetPrivate::setWindowModified_helper() () from /home/wilsonk/Qt5.5.1/5.5/gcc_64/lib/libQt5Widgets.so.5
#8  0x00007ffff76e7796 in QWidget::setWindowModified(bool) () from /home/wilsonk/Qt5.5.1/5.5/gcc_64/lib/libQt5Widgets.so.5
#9  0x0000000000410b99 in MainWindow::documentWasModified() ()
#10 0x0000000000451c2b in void QtPrivate::FunctionPointer<void (QMainWindow::*)()>::call<void, void>(void (QMainWindow::*)(), QMainWindow*, void**) ()
#11 0x000000000045b656 in QtPrivate::QSlotObject<void (QMainWindow::*)(), void, void>::impl(int, QtPrivate::QSlotObjectBase*, QObject*, void**, bool*) ()
#12 0x00007ffff68c2cfa in QMetaObject::activate(QObject*, int, int, void**) ()
   from /home/wilsonk/Qt5.5.1/5.5/gcc_64/lib/libQt5Core.so.5
#13 0x00007ffff6f7d85d in ?? () from /home/wilsonk/Qt5.5.1/5.5/gcc_64/lib/libQt5Gui.so.5
#14 0x00007ffff6f811d3 in ?? () from /home/wilsonk/Qt5.5.1/5.5/gcc_64/lib/libQt5Gui.so.5
#15 0x00007ffff6fa645b in QTextCursor::insertText(QString const&, QTextCharFormat const&) ()
   from /home/wilsonk/Qt5.5.1/5.5/gcc_64/lib/libQt5Gui.so.5
#16 0x00007ffff6fa6b74 in QTextCursor::insertText(QString const&) () from /home/wilsonk/Qt5.5.1/5.5/gcc_64/lib/libQt5Gui.so.5
#17 0x00007ffff7879744 in ?? () from /home/wilsonk/Qt5.5.1/5.5/gcc_64/lib/libQt5Widgets.so.5
#18 0x00007ffff787e6cb in QWidgetTextControl::processEvent(QEvent*, QMatrix const&, QWidget*) ()
   from /home/wilsonk/Qt5.5.1/5.5/gcc_64/lib/libQt5Widgets.so.5
#19 0x00007ffff787599b in QWidgetTextControl::processEvent(QEvent*, QPointF const&, QWidget*) ()
   from /home/wilsonk/Qt5.5.1/5.5/gcc_64/lib/libQt5Widgets.so.5
#20 0x00007ffff7896da4 in QPlainTextEdit::keyPressEvent(QKeyEvent*) () from /home/wilsonk/Qt5.5.1/5.5/gcc_64/lib/libQt5Widgets.so.5
#21 0x00007ffff76f1414 in QWidget::event(QEvent*) () from /home/wilsonk/Qt5.5.1/5.5/gcc_64/lib/libQt5Widgets.so.5
#22 0x00007ffff77ec19e in QFrame::event(QEvent*) () from /home/wilsonk/Qt5.5.1/5.5/gcc_64/lib/libQt5Widgets.so.5
#23 0x00007ffff786ee33 in QAbstractScrollArea::event(QEvent*) () from /home/wilsonk/Qt5.5.1/5.5/gcc_64/lib/libQt5Widgets.so.5
#24 0x00007ffff78965c5 in QPlainTextEdit::event(QEvent*) () from /home/wilsonk/Qt5.5.1/5.5/gcc_64/lib/libQt5Widgets.so.5
#25 0x00007ffff76b04cc in QApplicationPrivate::notify_helper(QObject*, QEvent*) ()
   from /home/wilsonk/Qt5.5.1/5.5/gcc_64/lib/libQt5Widgets.so.5
#26 0x00007ffff76b545d in QApplication::notify(QObject*, QEvent*) () from /home/wilsonk/Qt5.5.1/5.5/gcc_64/lib/libQt5Widgets.so.5
#27 0x00007ffff6895663 in QCoreApplication::notifyInternal(QObject*, QEvent*) ()
   from /home/wilsonk/Qt5.5.1/5.5/gcc_64/lib/libQt5Core.so.5
#28 0x00007ffff770dee3 in ?? () from /home/wilsonk/Qt5.5.1/5.5/gcc_64/lib/libQt5Widgets.so.5
#29 0x00007ffff76b04cc in QApplicationPrivate::notify_helper(QObject*, QEvent*) ()
   from /home/wilsonk/Qt5.5.1/5.5/gcc_64/lib/libQt5Widgets.so.5
#30 0x00007ffff76b5630 in QApplication::notify(QObject*, QEvent*) () from /home/wilsonk/Qt5.5.1/5.5/gcc_64/lib/libQt5Widgets.so.5
#31 0x00007ffff6895663 in QCoreApplication::notifyInternal(QObject*, QEvent*) ()
   from /home/wilsonk/Qt5.5.1/5.5/gcc_64/lib/libQt5Core.so.5
#32 0x00007ffff6e35346 in QGuiApplicationPrivate::processKeyEvent(QWindowSystemInterfacePrivate::KeyEvent*) ()
   from /home/wilsonk/Qt5.5.1/5.5/gcc_64/lib/libQt5Gui.so.5
#33 0x00007ffff6e39e05 in QGuiApplicationPrivate::processWindowSystemEvent(QWindowSystemInterfacePrivate::WindowSystemEvent*) ()
   from /home/wilsonk/Qt5.5.1/5.5/gcc_64/lib/libQt5Gui.so.5
#34 0x00007ffff6e1efbf in QWindowSystemInterface::sendWindowSystemEvents(QFlags<QEventLoop::ProcessEventsFlag>) ()
   from /home/wilsonk/Qt5.5.1/5.5/gcc_64/lib/libQt5Gui.so.5
#35 0x00007fffee1c5de0 in ?? () from /home/wilsonk/Qt5.5.1/5.5/gcc_64/plugins/platforms/../../lib/libQt5XcbQpa.so.5
---Type <return> to continue, or q <return> to quit---
#36 0x00007ffff4ee5e04 in g_main_context_dispatch () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#37 0x00007ffff4ee6048 in ?? () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#38 0x00007ffff4ee60ec in g_main_context_iteration () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#39 0x00007ffff68eaa87 in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) ()
   from /home/wilsonk/Qt5.5.1/5.5/gcc_64/lib/libQt5Core.so.5
#40 0x00007ffff6893212 in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) ()
   from /home/wilsonk/Qt5.5.1/5.5/gcc_64/lib/libQt5Core.so.5
#41 0x00007ffff689ad3d in QCoreApplication::exec() () from /home/wilsonk/Qt5.5.1/5.5/gcc_64/lib/libQt5Core.so.5
#42 0x000000000041720e in D main ()
#43 0x000000000047328e in _d_run_main ()
#44 0x000000000041cbc5 in main ()

from calypso.

Syniurge avatar Syniurge commented on July 30, 2024

Solved 2 weeks ago.

from calypso.

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.