SIGSEV error on setDatabaseName
-
I have the following in the Debug log:
<95python theDumper.stackListFrames({"limit":20,"options":"",})
&"python theDumper.stackListFrames({"limit":20,"options":"",})\n"
&"Traceback (most recent call last):\n"
&" File "<string>", line 1, in <module>\n"
&"AttributeError: Dumper instance has no attribute 'stackListFrames'\n"
&"Error while executing Python code.\n"
95^error,msg="Error while executing Python code." -
I use ->Debug -> Start Debugging -> Start Debugging (F5). How else can I run to see something in stack?
No, you're doing it correctly.
&"AttributeError: Dumper instance has no attribute 'stackListFrames'\n"
&"Error while executing Python code.\n"This however leads me to believe there's something wrong with the debugger, or rather the debugger wrapper. What OS, Qt Creator version and debugger are you using?
-
@kshegunov
Yes, I'm building in debug mode.Is this what you needed?
configure -static -platform win32-g++ -prefix "C:\Qt\Qt5.4.0_Static" -release -opensource -confirm-license -nomake examples -nomake tests -nomake tools -opengl desktop -no-angle -qt-sql-sqlite -make libs -qt-zlib -qt-pcre -qt-libpng -qt-libjpeg -qt-freetype
-
I finally managed to get the stack.
Great!
Here is the link to it
Yes, that is superb. See the top of the stack (the reason I requested it in the first place):
1 QBasicAtomicOps<4>::ref<int> qatomic_x86.h 181 0x6b9cebc8 2 QBasicAtomicInteger<int>::ref qbasicatomic.h 129 0x6b9e1070 3 QtPrivate::RefCount::ref qrefcount.h 55 0x6ba534a7 4 QString::operator= qstring.cpp 1739 0x6b7f67d3 5 QFile::QFile qfile.cpp 255 0x6b85cdb4 6 Additem::FunctAddtoDb additem.cpp 57 0x40453b
This is what functions were entered at the point where the crash occurred. Notice there's no mention of
QSqlDatabase
at all. :)So, my next question would be, what do you have in
additem.cpp
at line 57 (this would be called from yourreview::on_submit_Button_clicked
slot at line 96). There's aQFile
instance creation that crashes (or rather its constructor argument causes the crash). -
Line 57 is
QFile file(fileName);
File name is defined in an other function:
QString Additem::findimage() { Image_Button->setStyleSheet ("QPushButton{" "background-color:rgb(0, 255,0);" "border-style: outset;" "border-width: 2px;" "border-radius: 10px;" "border-color: beige;" "font: bold 14px;" "min-width: 10em;" "padding: 6px;}" ); QString sPath = "C:/"; QFileDialog *fileDialog = new QFileDialog; fileName = fileDialog->getOpenFileName(this, tr("Finding Friend's Image"),sPath, tr("Image Files (*.png *.jpg *.bmp)")); display_Label->setFixedSize (100,100); if(fileName=="") { qDebug() << "No image was chosen."; QMessageBox::warning (this,"Error 1002","No image was choosen!"); } else { qDebug() << "Image was chosen!"; QPixmap pix(fileName); int w = display_Label->width (); int h = display_Label->height (); display_Label->setPixmap (pix.scaled(w,h,Qt::KeepAspectRatio)); grid->addWidget (display_Label,2,2,3,1,Qt::AlignLeft); } return fileName; }
-
@gabor53 said:
Line 57 is
QFile file(fileName);Then indeed, this is somehow the reason for the crash. You should investigate with the debugger what exactly causes it. Stop it before the object is created, see what the file name variable contains. Perhaps check if everything is fine with how you create it or assign its value.