Results 1 to 4 of 4

Thread: Application crashing in QWidgetPrivate::hideChildren(bool)

  1. #1
    Join Date
    Oct 2009
    Posts
    66
    Thanked 2 Times in 2 Posts
    Qt products
    Qt4 Qt/Embedded
    Platforms
    Unix/X11

    Default Application crashing in QWidgetPrivate::hideChildren(bool)

    Hi All,
    I am developing an application where i create a sub-window from the main-window layout and close the sub-window at run time. Sometimes on sub-window close i get an application crash as shown in the back trace:
    #0 0x42554550 in QWidgetPrivate::hideChildren(bool) () from /usr/lib/libQtGui.so.4
    #1 0x425546b2 in QWidgetPrivate::hide_helper() () from /usr/lib/libQtGui.so.4
    #2 0x42556970 in QWidget::setVisible(bool) () from /usr/lib/libQtGui.so.4
    #3 0x4254cc00 in QWidgetPrivate::close_helper(QWidgetPrivate::Close Mode) ()
    from /usr/lib/libQtGui.so.4
    #4 0x42583f13 in QApplication::x11ClientMessage(QWidget*, _XEvent*, bool) ()
    from /usr/lib/libQtGui.so.4
    #5 0x42581b55 in QApplication::x11ProcessEvent(_XEvent*) () from /usr/lib/libQtGui.so.4
    #6 0x425ad455 in ?? () from /usr/lib/libQtGui.so.4
    #7 0x4157faff in g_main_context_dispatch () from /lib/libglib-2.0.so.0
    #8 0x41580240 in ?? () from /lib/libglib-2.0.so.0
    #9 0x415804ef in g_main_context_iteration () from /lib/libglib-2.0.so.0
    #10 0x4226d418 in QEventDispatcherGlib:rocessEvents(QFlags<QEventLoop::ProcessEventsFlag> ) ()
    from /usr/lib/libQtCore.so.4
    #11 0x425ad0eb in ?? () from /usr/lib/libQtGui.so.4
    #12 0x42238fde in QEventLoop:rocessEvents(QFlags<QEventLoop::ProcessEventsFlag> ) ()
    from /usr/lib/libQtCore.so.4
    #13 0x42239289 in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsF lag>) ()
    from /usr/lib/libQtCore.so.4
    #14 0x4223e72b in QCoreApplication::exec() () from /usr/lib/libQtCore.so.4
    #15 0x424f6245 in QApplication::exec() () from /usr/lib/libQtGui.so.4
    #16 0x0805a749 in main (argc=3, argv=0xbffff2f4) at main.cpp:156
    Is there a away to come out of this problem and avoid the application crash on sub-window close??

  2. #2
    Join Date
    Oct 2009
    Posts
    66
    Thanked 2 Times in 2 Posts
    Qt products
    Qt4 Qt/Embedded
    Platforms
    Unix/X11

    Default Re: Application crashing in QWidgetPrivate::hideChildren(bool)

    I am still stuck with this issue and still facing the crash. Any updates on this??

  3. #3
    Join Date
    Sep 2009
    Location
    Wroclaw, Poland
    Posts
    1,394
    Thanked 342 Times in 324 Posts
    Qt products
    Qt4 Qt5
    Platforms
    MacOS X Unix/X11 Windows Android

    Default Re: Application crashing in QWidgetPrivate::hideChildren(bool)

    Can you provide a minimal compilable example that reproduces the problem ?

  4. #4
    Join Date
    Jan 2008
    Location
    Alameda, CA, USA
    Posts
    5,230
    Thanks
    302
    Thanked 864 Times in 851 Posts
    Qt products
    Qt5
    Platforms
    Windows

    Default Re: Application crashing in QWidgetPrivate::hideChildren(bool)

    I am still stuck with this issue and still facing the crash. Any updates on this??
    Are you deleting this subwindow when you close it? I can't tell what the back trace is saying (I work on Windows using MSVC), but if the method where the crash occurs is referencing an instance that has already been deleted, that would cause a crash.

    If so, instead of deleting the subwindow instance, call deleteLater() through its pointer. In this case, the instance will ultimately be deleted only when control returns to the event loop.

    If that doesn't fix it, then you probably have a coding error which has corrupted memory, and this crash is just a red herring - the result of something else messing up the object instance being used in the hideChildren() call. Crashes like this that occur way down inside of Qt code are almost never a Qt bug; something your code has done has messed things up.

Similar Threads

  1. Main Application is crashing
    By vijayQt in forum Newbie
    Replies: 5
    Last Post: 23rd May 2011, 11:41
  2. QML Application crashing on exit
    By fgungor in forum Qt Quick
    Replies: 0
    Last Post: 12th March 2011, 10:19
  3. Qt application crashing - Heap errors?
    By System123 in forum Qt Programming
    Replies: 3
    Last Post: 23rd August 2010, 21:14
  4. Application crashing
    By addu in forum Qt Programming
    Replies: 9
    Last Post: 22nd May 2009, 10:37
  5. Application is Crashing
    By shyam prasad in forum Qt Programming
    Replies: 1
    Last Post: 9th January 2007, 17:04

Tags for this Thread

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.