Navigation

    Qt Forum

    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Search
    1. Home
    2. Tags
    3. segfault
    Log in to post

    • UNSOLVED Seg fault when deleting Q3DScatter object
      General and Desktop • segfault segmentation q3dscatter • • vedranMv  

      15
      0
      Votes
      15
      Posts
      96
      Views

      @vedranMv said in Seg fault when deleting Q3DScatter object: Regarding your edit, what you're writing makes perfect sense, but as you can see in the code, it's the other way around. If I don't call delete manually, I get a segfault. Then it seems to me there must be something else wrong in your code.
    • UNSOLVED SIGSEGV when reloading a qml page with View3D component
      QML and Qt Quick • qml segfault qt 5.15 qtquick3d reloading error • • venupeddi  

      1
      0
      Votes
      1
      Posts
      56
      Views

      No one has replied

    • SOLVED updatePaintNode example causing segmentation fault
      QML and Qt Quick • qml segfault updatepaintnode customcomponent • • mxyn  

      3
      0
      Votes
      3
      Posts
      58
      Views

      @dheerendra AH! THANK YOU! @_@
    • UNSOLVED vlc doesnt work on arch (segmentation fault)
      General and Desktop • segfault segmentation segmentation fa vlc-qt vlc • • takti  

      8
      0
      Votes
      8
      Posts
      260
      Views

      @takti You need to understand that most people in this forum are volunteers spending their own time to help others for free. This includes me as well. Since I don't have a solution for your problem I suggested to check somewhere else also.
    • UNSOLVED QtCreator segfault on startup (MacOS)
      General and Desktop • qtcreator segfault qtcreator 4.11 • • peteispo  

      2
      0
      Votes
      2
      Posts
      317
      Views

      @peteispo Try to start QtCreator with disabled plug-ins to see whether it makes a difference (-noload all).
    • UNSOLVED Application crashes while accessing Pointers and while Hovering over custom QGraphicsItems
      General and Desktop • c++ qgraphicsitem segfault pointer • • Lanparty  

      14
      0
      Votes
      14
      Posts
      1052
      Views

      @Lanparty said in Application crashes while accessing Pointers and while Hovering over custom QGraphicsItems: btw: how do I change the status of my post to "solved"? First post, Topic Tools button to the side.
    • UNSOLVED How to debug / backtrace the call stack?
      General and Desktop • debug embedded linux debugging segfault backtrace • • abhisit  

      10
      0
      Votes
      10
      Posts
      2790
      Views

      @jsulm Yep, absolutely, there is much to read/fiddle with, and may not be portable. May or may not work for OP's particular case. Anyway, whether this or your core dump suggestion (OP should look up how his target Linux OS handles core dumps allowed or not), he has a few approaches to consider now....
    • SOLVED SSL problem on linux/windows
      General and Desktop • linux openssl ssl segfault • • borghe  

      7
      0
      Votes
      7
      Posts
      1110
      Views

      Hi, Not the same backend used. Unless you re-build Qt and force the use of OpenSSL. Qt on macOS uses Apple's SecureTransport framework. OpenSSL on that platform has been deprecated a long time ago.
    • UNSOLVED Unable to use Data Breakpoints
      Mobile and Embedded • debugger segfault gdb breakpoint • • mtangy  

      1
      0
      Votes
      1
      Posts
      324
      Views

      No one has replied

    • UNSOLVED Turning off power to a running QSerialPort
      General and Desktop • qserialport segfault asynchronous • • sykac  

      14
      0
      Votes
      14
      Posts
      1528
      Views

      @sykac said in Turning off power to a running QSerialPort: One problem starts probably in the hardware. The COM port of the device disconnects from the PC (I don't why, it could be some driver/firmware issue) Reading you topic title, could it be that the USB connection between PC and FTDI is interrupted? And that's what I said, this may lead to endless loops in the device driver. This kind of problems can hardly be solved in the user space.
    • SOLVED QtCreator crashed and now will not start due to segfault
      Tools • segfault install qt-creator • • TMcSquared  

      35
      0
      Votes
      35
      Posts
      2730
      Views

      @nwoki Hi It means even it reports thats its QtWidgets that crashes, its likely not that DLL if a plain empty GUI project works. ( for exact same folder , same pc) I would next add some openGL to the test project see if it still runs. As it seems might be direclt related to Qt ( like wrong Qt dll loaded) so it could be the openGL for clients gfx card.
    • SOLVED Qt-webkit - segment fault
      Qt WebKit • webkit qt 5.6 segfault • • 1412  

      5
      0
      Votes
      5
      Posts
      1476
      Views

      @Konstantin-Tokarev The problem has been solved. I change the float strategy from neon to vfpv3 and everything works well.
    • SOLVED Segfault core dumped
      C++ Gurus • segfault segmentation • • Qjay  

      3
      0
      Votes
      3
      Posts
      1264
      Views

      @sierdzio said in Segfault core dumped: Anyway, the bug is in line 61 in = &inFile; - you assign a variable created on a stack to variable in. In the next line, the inFile goes out of scope and is deleted. So when you try to access in later in the code, it segfaults. Thanks !! . I know it's not Qt problem but that's why i posted it in C++ section
    • SOLVED Need help with a segfault problem
      C++ Gurus • c++ c++11 segfault • • Qjay  

      13
      0
      Votes
      13
      Posts
      2686
      Views

      Hi @jsulm and @Paul-Colby, if (segs) { delete[] segs; segs = nullptr; } This is an anti-pattern! Just make sure segs is nullptr before you call new and set it to nullptr after delete. No need to check for nullptr before delete: delete segs; segs = nullptr; Quoting the C++ Reference: "If this is a null-pointer, the function does nothing." Regards
    • UNSOLVED Segmentation Fault trying to display camera feed
      Language Bindings • python camera pyqt segfault • • Xenoshell  

      1
      0
      Votes
      1
      Posts
      460
      Views

      No one has replied

    • UNSOLVED segmentation fault triggered in QKeyMapper::changeKeyboard()
      General and Desktop • qt4.8 segfault pyqt4 • • Marc_Van_Daele  

      3
      0
      Votes
      3
      Posts
      867
      Views

      In the PyQt 4.9.4 code downoaded from https://sourceforge.net/projects/pyqt/files/PyQt4/ I find (Note that we are using 4.9.3 but I couldn't find the sources of that version) void sipQLineEdit::changeEvent(QEvent *a0) { sip_gilstate_t sipGILState; PyObject *sipMeth; sipMeth = sipIsPyMethod(&sipGILState,&sipPyMethods[14],sipPySelf,NULL,sipName_changeEvent); if (!sipMeth) { QLineEdit::changeEvent(a0); return; } typedef void (*sipVH_QtCore_17)(sip_gilstate_t,PyObject *,QEvent *); ((sipVH_QtCore_17)(sipModuleAPI_QtGui_QtCore->em_virthandlers[17]))(sipGILState,sipMeth,a0); }
    • SOLVED Segmentation fault on QMenu::exec
      General and Desktop • webview segfault context menu • • Daniil Kolesnichenko  

      4
      0
      Votes
      4
      Posts
      1333
      Views

      @dheerendra oh, I found where was the problem, and it wasn't actually related to context menus. I use my own BrowserApp class that inherits QApplication but I found out that I inherited it the wrong way (constructor signature was wrong) and that caused some segfaults, including the one described in my question. So now I fixed that and everything works fine.
    • UNSOLVED OpenGL and QT, crash at glDrawElements
      General and Desktop • opengl segfault • • DaOnlyOwner  

      9
      0
      Votes
      9
      Posts
      5909
      Views

      @Wieland somehow It's still not working. The reason why I have to call initialize() inside the copyConstructor is, that you can't copy QOpenGLVertexArrayObject..
    • SOLVED The program has unexpectedly finished
      General and Desktop • segfault unexpectedly fi • • Qjay  

      9
      0
      Votes
      9
      Posts
      3591
      Views

      Thanks @SGaist !! . I will work on to improve it !!
    • SOLVED qInstallMessageHandler has a segmentation fault?
      General and Desktop • segfault message handler • • CAD_coding  

      5
      0
      Votes
      5
      Posts
      1629
      Views

      @jsulm thanks I fixed it now. It was a stupid mistake, not setting up the static variable.
    • UNSOLVED segfault in qlistwidget
      General and Desktop • qlistwidget segfault • • Lorence  

      6
      0
      Votes
      6
      Posts
      2009
      Views

      It is not the iterator that is the problem. From your example: for ( QList<QListWidgetItem*>::iterator iter = selectedItems().begin(); iter != selectedItems().end(); iter++ ) { qDebug() << (*iter)->text(); } The functions 'selectedItems().begin()' and 'selectedItems().end()' are the problem. Each time you call 'selectedItems()' a copy of QList<QListWidgetItem*> array is returned. Since you call it twice you have two different copies. The contents of the list may be the same but they are two different lists. Consider this: QString input_text(" some text for input "); QString text = input_text.simplified().trimmed().mid(1); In order to have the second line work a QString is constructed (and destroyed) for each step as a copy constructor. The QString member 'simplfied()' returns an unnamed instance of a new copy of QString after performing whatever 'simplfied()' does. The member 'trimmed()' is then called from this new QString creating another unnamed instance which finally calls member 'mid(1)'. The final variable 'text' is assigned from the last member function of the unnamed instance of QString. If the last member was '.toInt()' it would return an integer instead (which won't compile unless the assigned variable is changed to an integer (or acceptes an integer as a constructor)). The output from the above example is "ome text for input" if you are curious. The member function QListWidget::selectedItems(void) might looks something like this: QList<QListWidgetItem*> QListWidget::selectedItems(void) const { QList<QListWidgetItem*> list; list.push_back(<figure out what is selected>); return list; } You end up calling this function twice and therefore you have two different lists as you would expect (returned values from the same function will each have a unique instance). Your loop starts on the beginning of the first list and ends on the last item of the second list. It is very likely they are not sitting next to each other in memory so after the first list is traversed you are running over unknown memory (which is where your segfault comes from). You need to be careful about copy constructors (when they are created). For example, your 'for' loop uses the postfix operator 'iter++'. For simple variables (integers) this is not a problem but if you have a complex iterator calling the postfix version will be expensive at it creates a copy. A better form is to use the prefix operator '++iter' as no copy is created.
    • SOLVED QtCreator has segmentation fault on Ubuntu 12.04 64 bit
      General and Desktop • qtcreator segfault ubuntu 12.04 • • rastaxe  

      4
      0
      Votes
      4
      Posts
      2171
      Views

      Good catch ! Since you have found the reason, please mark the thread as solved using the "Topic Tool" button so other forum users may know as solution has been found :)
    • Buffer underflow
      General and Desktop • qtmultimedia segfault pulseaudio • • Evil_Genius  

      1
      0
      Votes
      1
      Posts
      1046
      Views

      No one has replied

    • Segfault in C++ standard library from call of function in external library
      General and Desktop • segfault xlslib • • aeturnus  

      5
      0
      Votes
      5
      Posts
      1708
      Views

      I know, I too hate when people propose an alternative instead of answering the actual question but please forgive me this time. QXlsxWriter is a Qt based library to read and write excel files and I did not have many problems with it so far
    • Child/Parent QObject Cleanup
      General and Desktop • qobject segfault memory managmen deletion • • cuddlykittens11  

      2
      0
      Votes
      2
      Posts
      1111
      Views

      How are you deleting your objects? Are you using delete or deleteLater? Seems odd this is happening since any delete on an object will delete all it's children before itself. At least with Qt parenting. If object X isn't a true child of B then that would cause your issue. I.e. if I have: QLabel *label = new QLabel(); QLabel *child = new QLabel(label); delete label; // label should delete child by before it fully deconstructs. Also if you have real code or at the very least a backtrace I could help more.