Results 1 to 5 of 5

Thread: Designer plugin segfaults designer :(

  1. #1
    Join Date
    Sep 2007
    Posts
    3
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Unhappy Designer plugin segfaults designer :(

    Hi,
    I'm trying to extend Designer with a custom widget, but my widget keeps killing it with a segfault whenever I try to save the dialog the widget is on or I just try to preview it.

    My custom widget is a rather simple QScrollArea derivative. Here's a (partial) backtrace of the crash:

    #0 0xb7c0730f in DomWidget::write (this=0x0, doc=@0xbfc66fd0, tagName=@0xbfc66c38) at uilib/ui4.cpp:2859
    #1 0xb7c07e04 in DomWidget::write (this=0x858f290, doc=@0xbfc66fd0,
    tagName=@0xbfc66dd8) at uilib/ui4.cpp:2916
    #2 0xb7c07e04 in DomWidget::write (this=0x858e808, doc=@0xbfc66fd0,
    tagName=@0xbfc66ef4) at uilib/ui4.cpp:2916
    #3 0xb7c09271 in DomUI::write (this=0x858f388, doc=@0xbfc66fd0,
    tagName=@0xbfc66fe0) at uilib/ui4.cpp:271
    #4 0xb7bd43d3 in QAbstractFormBuilder::save (this=0xbfc6707c,
    dev=0xbfc670c0, widget=0x84fc768) at
    uilib/abstractformbuilder.cpp:1037
    #5 0xb7ebf2ca in qdesigner_internal::QDesignerResource::save
    (this=0xbfc6707c, dev=0xbfc670c0, widget=0x84fc768) at
    ../formeditor/qdesigner_resource.cpp:158
    #6 0xb7ecbdf2 in qdesigner_internal::FormWindow::contents
    (this=0x84f0900) at ../formeditor/formwindow.cpp:1375
    #7 0xb7c6927e in
    qdesigner_internal::QDesignerFormBuilder::createPr eview (fw=0x84f0900,
    styleName=@0xbfc67430, appStyleSheet=@0xbfc67434,
    scriptErrors=0xbfc67208, errorMessage=0xbfc67458)
    at shared/qdesigner_formbuilder.cpp:323
    #8 0xb7c6a100 in
    qdesigner_internal::QDesignerFormBuilder::createPr eview (fw=0x84f0900,
    styleName=@0xbfc67430, appStyleSheet=@0xbfc67434,
    errorMessage=0xbfc67458) at shared/qdesigner_formbuilder.cpp:373
    #9 0xb7cffb5d in qdesigner_internal::PreviewManager::createPreview
    (this=0x83eebe0, fw=0x84f0900, pc=@0xbfc67430,
    errorMessage=0xbfc67458) at shared/previewmanager.cpp:270
    #10 0xb7d00a9e in qdesigner_internal::PreviewManager::showPreview
    (this=0x83eebe0, fw=0x84f0900, pc=@0xbfc67430,
    errorMessage=0xbfc67458) at shared/previewmanager.cpp:309
    #11 0x0808fd7d in QList<QString>::append ()
    #12 0x080a8f82 in QList<QString>::append ()
    #13 0xb6c4d859 in QMetaCallEvent:laceMetaCall (this=0x8404818,
    object=0x83e7230) at kernel/qobject.cpp:491
    #14 0xb6c5096b in QObject::event (this=0x83e7230, e=0x4901) at
    kernel/qobject.cpp:1104
    #15 0xb70cf39f in QApplicationPrivate::notify_helper (this=0x81434e8,
    receiver=0x83e7230, e=0x8404818) at kernel/qapplication.cpp:3712
    #16 0xb70d23e9 in QApplication::notify (this=0xbfc67b84,
    receiver=0x83e7230, e=0x8404818) at kernel/qapplication.cpp:3271
    #17 0xb6c3fe9a in QCoreApplication::notifyInternal (this=0xbfc67b84,
    receiver=0x83e7230, event=0x8404818) at
    kernel/qcoreapplication.cpp:546
    #18 0xb6c412ed in QCoreApplicationPrivate::sendPostedEvents
    (receiver=0x0, event_type=0, data=0x8143310) at
    ../../include/QtCore/../../src/corelib/kernel/qcoreapplication.h:205
    #19 0xb6c4158d in QCoreApplication::sendPostedEvents (receiver=0x0,
    event_type=0) at kernel/qcoreapplication.cpp:1016
    #20 0xb6c688d4 in postEventSourceDispatch (s=0x814a700) at
    ../../include/QtCore/../../src/corelib/kernel/qcoreapplication.h:210
    [snip]

    I tried everything I could think of without success.
    I'd be glad if someone would be able to help me out. I'm using the Qt 4.4 snapshot on Debian.
    Thanks!

  2. #2
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,359
    Thanks
    3
    Thanked 5,015 Times in 4,792 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: Designer plugin segfaults designer :(

    Does your widget work properly without using the plugin?

  3. #3
    Join Date
    Sep 2007
    Posts
    3
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Designer plugin segfaults designer :(

    Quote Originally Posted by wysota View Post
    Does your widget work properly without using the plugin?
    Sure, it already works in an application, and the need arose to have it available in Designer, hence this new problem.

  4. #4
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,359
    Thanks
    3
    Thanked 5,015 Times in 4,792 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: Designer plugin segfaults designer :(

    Could we see the plugin implementation?

  5. #5
    Join Date
    Sep 2007
    Posts
    3
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Designer plugin segfaults designer :(

    It seems like I found what the problem was.

    In the constructor of the said widget I created a QLabel and assigned it to the ScrollArea with setWidget ().

    After commenting out the setWidget line (and using setWidget later, when the QLabel actually got it's content set up) I can preview an save the dialog without a segfault.

    I am puzzled why this helped, so if someone has an explanation it would be nice to know.

Similar Threads

  1. Replies: 4
    Last Post: 9th August 2007, 08:20
  2. QPluginLoader not recognizing a plugin
    By KShots in forum Qt Programming
    Replies: 3
    Last Post: 29th June 2007, 14:13
  3. Qt Designer plugin on windows
    By big4mil in forum Newbie
    Replies: 4
    Last Post: 30th May 2007, 17:33
  4. Replies: 1
    Last Post: 22nd January 2007, 12:13
  5. Replies: 13
    Last Post: 15th December 2006, 11:52

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.