Page 2 of 2 FirstFirst 12
Results 21 to 36 of 36

Thread: Gnome makes application crash

  1. #21
    Join Date
    Jan 2006
    Posts
    45
    Thanks
    2
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Gnome makes application crash

    the debugger stops at the line

    QColor changed = QColorDialog::getColor(Qt::white);

    I can not step in to the code anymore

    In the status I see no code at ......

    when I press continue program the dialog pops up
    when I press OK the program exits

    regix

  2. #22
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    5,372
    Thanks
    28
    Thanked 976 Times in 912 Posts
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Gnome makes application crash

    Quote Originally Posted by regix
    I can not step in to the code anymore
    Did you try to set a breakpoint after that line?

  3. #23
    Join Date
    Jan 2006
    Posts
    45
    Thanks
    2
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Gnome makes application crash

    Yes I put a breakpoint at
    QPixmap colpixmap(30,30);
    the application continued through the changeTitleColor function
    then I arrived at shared.h
    deref...
    and it went to
    bool DlgEditCssBase::qt_invoke( int _id, QUObject* _o )
    where it returned true
    then I could not step further inside
    I jumped out of the function
    and arrived at
    return qApp.exec();

    regix

  4. #24
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    5,372
    Thanks
    28
    Thanked 976 Times in 912 Posts
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Gnome makes application crash

    Quote Originally Posted by regix
    the application continued through the changeTitleColor function
    This is a bit weird. I've checked Qt 3.3.5 sources and it seems that QColorDialog doesn't use anything specific to GNOME.

    What signal triggers EditCSSDlg::changeTitleColor()? Is it connected to any other slot?

    Also check the attachment. I have modified the test program, so that the color dialog is invoked from a modal dialog.
    Attached Files Attached Files

  5. #25
    Join Date
    Jan 2006
    Posts
    45
    Thanks
    2
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Gnome makes application crash

    dlgeditcssbase.cpp :
    connect( pushButtonColor, SIGNAL( clicked() ), this, SLOT( changeTitleColor() ) );

    void DlgEditCssBase::changeTitleColor()
    {
    qWarning( "DlgEditCssBase::changeTitleColor(): Not implemented yet" );
    }
    dlgeditcssbase.h:
    virtual void changeTitleColor();

    dlgeditcss.h
    virtual void changeTitleColor();

    there are no other slots connected to this signal

    regix

  6. #26
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    5,372
    Thanks
    28
    Thanked 976 Times in 912 Posts
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Gnome makes application crash

    Quote Originally Posted by regix
    there are no other slots connected to this signal
    Then maybe you should try to isolate the problem by stripping down your application?

    Also check if it works with Qt 3.3.6 (although I didn't find anything related to your problem in the changelog).

  7. #27
    Join Date
    Jan 2006
    Posts
    45
    Thanks
    2
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Gnome makes application crash

    this is what I dit to trace the problem:

    I commented everthing out inside changeTitleColor()
    result : the application behaves normally

    I comment out the line with QColorDialog
    result : the application behaves normally

    I comment everything out except for the line with QColorDialog
    result : the application stops

    The application that jacek posted worked fine.
    I started it with gdb and it exited normally.

    regix

  8. #28
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    5,372
    Thanks
    28
    Thanked 976 Times in 912 Posts
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Gnome makes application crash

    Quote Originally Posted by regix
    The application that jacek posted worked fine.
    Does it still work if you replace:
    Qt Code:
    1. QColorDialog::getColor();
    To copy to clipboard, switch view to plain text mode 
    with
    Qt Code:
    1. QColor changed = QColorDialog::getColor(Qt::white);
    To copy to clipboard, switch view to plain text mode 
    ?

    As long as my application works, it might mean that the problem lies in your code, not in Qt.

    I should ask it earlier, but do you use threads in your application?

  9. #29
    Join Date
    Jan 2006
    Posts
    45
    Thanks
    2
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Gnome makes application crash

    g++ -c -pipe -O2 -fmessage-length=0 -Wall -D_FORTIFY_SOURCE=2 -g -DUSE_LIB64_PATHES -fno-strict-aliasing -Wall -W -g -O0 -DQT_SHARED -DQT_TABLET_SUPPORT -DQT_NO_DEBUG -DQT_THREAD_SUPPORT -I/usr/lib/qt3/mkspecs/default -I. -I/usr/include/Magick++ -I/usr/include/magick -I/usr/include -I/usr/lib/qt3/include -o editcssdlg.o editcssdlg.cpp
    test -d ../bin/ || mkdir -p ../bin/

    I had changed the changeTitleColor() function and compiled.
    This is how the compiler compiles
    The result remained the same : on GNOME the application stops
    First I used a thread in my program, but later I decided not to use threads.

    this is part of the .pro file :

    LIBS += -lMagick \
    -lMagick++
    INCLUDEPATH += /usr/include/Magick++ \
    /usr/include/magick
    QMAKE_CXXFLAGS_DEBUG += -O0
    TARGET = websitecreator
    DESTDIR = ../bin
    CONFIG += debug \
    warn_on \
    qt
    TEMPLATE = app

  10. #30
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    5,372
    Thanks
    28
    Thanked 976 Times in 912 Posts
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Gnome makes application crash

    Quote Originally Posted by regix
    The application that jacek posted worked fine.
    I started it with gdb and it exited normally.
    Maybe it works only in gdb?

  11. #31
    Join Date
    Jan 2006
    Posts
    45
    Thanks
    2
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Gnome makes application crash

    If you want I can send the source code and the kdevelop project file I am working with

    I didn't test it with qt 3.3.6 as I have already installed two versions of qt and I wouldn't like this to clash with other applications.

    regix

  12. #32
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    5,372
    Thanks
    28
    Thanked 976 Times in 912 Posts
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Gnome makes application crash

    Quote Originally Posted by regix
    If you want I can send the source code and the kdevelop project file I am working with
    The problem is that I don't have GNOME installed.

  13. #33
    Join Date
    Jan 2006
    Posts
    45
    Thanks
    2
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Gnome makes application crash

    I will try to put QColorDialogs in different parts of my application and see what that gives.

    regix

  14. #34
    Join Date
    Jan 2006
    Posts
    45
    Thanks
    2
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Gnome makes application crash

    I found out that in certain dialogs I can put a QColorDialog::getColor call while in others this would end the application.
    This was not limited to QColorDialog. Also some of the dialogs I created myself showed a similar behaviour.
    Typicaly this occurs when I put the dialog in a dialog that is instatiated in another dialog, which on its turn is instatiated in another dialog. I occurs to me that it has to do with the depth of dialogresult call or something like that.
    As I said this behaviour is not seen in KDE.

    regix

  15. #35
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    5,372
    Thanks
    28
    Thanked 976 Times in 912 Posts
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Gnome makes application crash

    Quote Originally Posted by regix
    Typicaly this occurs when I put the dialog in a dialog that is instatiated in another dialog, which on its turn is instatiated in another dialog.
    That would be a quite weird bug. Check the attachment and see if it reproduces it.
    Attached Files Attached Files

  16. #36
    Join Date
    Jan 2006
    Posts
    45
    Thanks
    2
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows

    Red face Re: Gnome makes application crash

    I tested your application and it behaves correctly.
    The only thing I can think of is that I have a weird bug in my application.

    regix

Similar Threads

  1. Replies: 3
    Last Post: 8th December 2006, 18:51
  2. Replies: 5
    Last Post: 24th April 2006, 15:42

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.