[Qt-interest] Crashing without debug mode- No crashing with gdb debugger

Malyushytsky, Alex alex at wai.com
Tue Feb 8 21:35:38 CET 2011


90% of the problems with code which does behave ok during debugging and does not in release
are related to initialization.
In your code actual_page_width ,coordx,coordy look as possible candidates which may bring the problem up.

In any case  you can count to get help with such problems only if you provide minimal example which can be built and executed.
If you don't there are endless variation of possible bugs and nobody without of power of god can predict where is yours.


Alex

From: qt-interest-bounces+alex=wai.com at qt.nokia.com [mailto:qt-interest-bounces+alex=wai.com at qt.nokia.com] On Behalf Of Sujan Dasmahapatra
Sent: Monday, February 07, 2011 1:25 PM
To: qt-interest at trolltech.com
Subject: [Qt-interest] 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(gotoprinter()));
}

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


Kind Regards,


Sujan Dasmahapatra
Project Leader, Aero Group
Aero Group
Tel    +91 80 66470248
Mob
sdh at lmwindpower.com<mailto:%25EMAIL%25>

LM Wind Power Blades
lmwindpower.com

Together we capture the wind to power a cleaner world
________________________________

This e-mail and any attachments are confidential. If you are not the named or intended recipient, please notify the sender immediately and do not disclose the contents to any other person, use it for any purpose, or store or copy the information in any medium. Any unauthorized disclosure, use or storage is prohibited and might be unlawful.


---------------------------------------------------------------------------------------------------
Weidlinger Associates, Inc. made the following annotations.

"This message and any attachments are solely for the intended recipient and may contain confidential or privileged information. If you are not the intended recipient, any disclosure, copying, use, or distribution of the information included in this message and any attachments is prohibited. If you have received this communication in error, please notify us by reply e-mail and immediately and permanently delete this message and any attachments. Thank you."

"Please consider our environment before printing this email."
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.qt-project.org/pipermail/qt-interest-old/attachments/20110208/907714b6/attachment.html 


More information about the Qt-interest-old mailing list