PDA

View Full Version : What's wrong??



dreamer
25th June 2008, 00:23
I have a Segmentation-fault problem in my program but i don't understand the why(perhaps is a Qt bug!!)

This is my debug:


Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread -1226594624 (LWP 7388)]
QGraphicsItem::setPos (this=0xffece9d8, pos=@0xbf9c2f60)
at graphicsview/qgraphicsitem.cpp:2053
2053 graphicsview/qgraphicsitem.cpp: No such file or directory.
in graphicsview/qgraphicsitem.cpp
(gdb) bt
#0 QGraphicsItem::setPos (this=0xffece9d8, pos=@0xbf9c2f60)
at graphicsview/qgraphicsitem.cpp:2053
#1 0x08096f11 in MarginDialog::on_spinBox_3_valueChanged ()
#2 0x080a3dfb in MarginDialog::qt_metacall ()
#3 0xb7312131 in QMetaObject::activate (sender=0x8294fb8,
from_signal_index=<value optimized out>, to_signal_index=34,
argv=<value optimized out>) at kernel/qobject.cpp:3001
#4 0xb73127c2 in QMetaObject::activate (sender=0x8294fb8, m=0xb7f2d04c,
local_signal_index=0, argv=0xbf9c305c) at kernel/qobject.cpp:3071
#5 0xb7d2c623 in QSpinBox::valueChanged (this=0x8294fb8, _t1=10)
at .moc/release-shared/moc_qspinbox.cpp:132
#6 0xb7b36519 in QSpinBoxPrivate::emitSignals (this=0x8295088,
ep=EmitIfChanged, old=@0xbf9c30e8) at widgets/qspinbox.cpp:951
#7 0xb7a8aa0c in QAbstractSpinBoxPrivate::setValue (this=0x8295088,
val=@0xbf9c3140, ep=EmitIfChanged, doUpdate=true)
at widgets/qabstractspinbox.cpp:1645
#8 0xb7b34b4e in QSpinBox::setValue (this=0x8294fb8, value=10)
at widgets/qspinbox.cpp:255
#9 0x08096e9e in MarginDialog::resetSpinBox ()
#10 0x08076f7a in XmlGenerator::parseFile ()
#11 0x0805ecf7 in MainWindow::on_actionOpen_triggered ()
#12 0x080a2f5d in MainWindow::qt_metacall ()
#13 0xb7312131 in QMetaObject::activate (sender=0x813c3b0,


I don't see any 0x0 value.............................

jacek
25th June 2008, 00:31
What happens in on_spinBox_3_valueChanged()? Do you access some graphics item through a pointer? If yes, are you sure that this pointer is initialized?

dreamer
25th June 2008, 09:07
What happens in on_spinBox_3_valueChanged()? Do you access some graphics item through a pointer? If yes, are you sure that this pointer is initialized?

yes, i find the problem(in on_spinBox_3_valueChanged() i used an unnitializer pointer.....)