Results 1 to 2 of 2

Thread: Crashing without debug mode- No crashing with gdb debugger

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Feb 2009
    Posts
    189
    Thanks
    2

    Default Crashing without debug mode- No crashing with gdb debugger

    Dear All
    I am facing some problem in implementing a QScrollArea. I subclassed it and created a buttin on this as below.

    CScrollArea::CScrollArea() {
    printbutton = new QPushButton("Save As Image",this);
    printbutton->setGeometry(actual_page_width + coordx-100,coordy,100,25);
    connect(printbutton,SIGNAL(clicked()),this,SLOT(go toprinter()));
    }

    the problem is that when I am trying show this scrollarea through menu click its crashing. and crashing at the first line
    printbutton = new QPushButton("Save As Image",this);

    but when I am debugging this through gdb debugger then its running fine and at the end i can see the scroll are with button.

    Why is happening like this. Any idea from anyone would be highly appreciate.
    Also when I try to set a window title like
    setWindowTitle("My Page");
    its again crashing.
    Thanks in advance for any help. sujan

  2. #2
    Join Date
    Jul 2009
    Location
    Enschede, Netherlands
    Posts
    462
    Thanked 69 Times in 67 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Crashing without debug mode- No crashing with gdb debugger

    Give us a compiling example reproducing the problem. It may clarify things.

    Also, did you try a full rebuild?


    Added after 4 minutes:


    You may also have to check if this actually exists. When attaching a debugger values are initialized differently.
    Last edited by franz; 7th February 2011 at 12:27.
    Horse sense is the thing that keeps horses from betting on people. --W.C. Fields

    Ask Smart Questions

Similar Threads

  1. Crashing TreeView
    By momesana in forum General Programming
    Replies: 1
    Last Post: 2nd May 2010, 10:09
  2. Application crashing
    By addu in forum Qt Programming
    Replies: 9
    Last Post: 22nd May 2009, 11:37
  3. Qt 4.4 Linguish Crashing on XP?
    By DerSchoeneBahnhof in forum Qt Tools
    Replies: 0
    Last Post: 19th June 2008, 23:42
  4. Application is Crashing
    By shyam prasad in forum Qt Programming
    Replies: 1
    Last Post: 9th January 2007, 18:04
  5. QTableWidget crashing
    By therealjag in forum Qt Programming
    Replies: 5
    Last Post: 19th April 2006, 17:30

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.