gdb in QtCreator on windows quits constantly
-
Hello,
I am using QtCreator 4.9, with Qt 5.12.3 and mingw tools on Windows 10. I am trying to debug a nasty issue in my code where the selectionModel of a QTableView is not being updated. When I am in the debugger, I see the reference to my QTableView.I am using the Qt maintenance tool installed Qt libraries, with the QTcreator source pointed to the source installed by the maintenance tool.
Clicking on some of the attributes in the Qt framework objects(QTableView, etc) is like a minefield. Some fields which if I try to expand that just cause gdb to quit with "Unexpected gdb exit" (with the message "the gdb process terminated"). Is there a way to avoid this?
Thanks
-
This is what I see in my debugger log. I am pasting the parts from a little before the shutdown...
>182^done t07:52:27.352 tResponse time: python theDumper.fetchStack({"limit":20,"nativemixed":0,"token":182}): 0.606 s t07:52:27.368 <183-stack-select-frame 0 t07:52:27.368 <184python theDumper.fetchVariables({"autoderef":1,"context":"","displaystringlimit":"100","dyntype":1,"expanded":["inspect","return","watch","local"],"fancy":1,"formats":{},"nativemixed":0,"partialvar":"","passexceptions":0,"qobjectnames":1,"resultvarname":"","stringcutoff":"10000","token":184,"typeformats":{},"watchers":[]}) t07:52:27.368 t07:52:27.399 [31ms] >183^done t07:52:27.399 tResponse time: -stack-select-frame 0: 0.031 s t07:52:27.399 t07:52:27.399 >&"python theDumper.fetchVariables({\"autoderef\":1,\"context\":\"\",\"displaystringlimit\":\"100\",\"dyntype\":1,\"expanded\":[\"inspect\",\"return\",\"watch\",\"local\"],\"fancy\":1,\"formats\":{},\"nativemixed\":0,\"partialvar\":\"\",\"passexceptions\":0,\"qobjectnames\":1,\"resultvarname\":\"\",\"stringcutoff\":\"10000\",\"token\":184,\"typeformats\":{},\"watchers\":[]})\n" >~"result={token=\"0\",data=[{iname=\"local.this\",name=\"this\",origaddr=\"0xb5b0c0\",address=\"0x1ed0aae0\",address=\"0x1ed0aae0\",numchild=\"1\",type=\"AddressWidget\",value=\"\",},{iname=\"local.temp\",name=\"temp\",origaddr=\"0xb5b098\",address=\"0x1ed9ddd0\",address=\"0x1ed9ddd0\",numchild=\"1\",type=\"QTableView\",value=\"\",},{iname=\"local.proxy\",name=\"proxy\",origaddr=\"0xb5b090\",address=\"0x1ed9b160\",address=\"0x1ed9b160\",numchild=\"1\",type=\"QSortFilterProxyModel\",value=\"\",},{iname=\"local.selectionModel\",name=\"selectionModel\",origaddr=\"0xb5b088\",address=\"0x1edacd50\",address=\"0x1edacd50\",numchild=\"1\",type=\"QItemSelectionModel\",value=\"\",},{iname=\"local.indexes\",name=\"indexes\",numchild=\"0\",type=\"QList<QModelIndex>\",valueencoded=\"notaccessible\",value=\"\",},],typeinfo=[],partial=\"0\",counts={},timings=[]}\n" t07:52:28.211 [812ms] >184^done t07:52:28.211 tResponse time: python theDumper.fetchVariables({"autoderef":1,"context":"","displaystringlimit":"100","dyntype":1,"expanded":["inspect","return","watch","local"],"fancy":1,"formats":{},"nativemixed":0,"partialvar":"","passexceptions":0,"qobjectnames":1,"resultvarname":"","stringcutoff":"10000","token":184,"typeformats":{},"watchers":[]}): 0.843 s t07:52:28.211 <Rebuild Watchmodel 4 @ 07:52:28.211 > t07:52:28.211 Finished retrieving data. t07:52:28.211 t07:52:34.228 <185python theDumper.fetchVariables({"autoderef":1,"context":"","displaystringlimit":"100","dyntype":1,"expanded":["inspect","return","watch","local.temp","local"],"fancy":1,"formats":{},"nativemixed":0,"partialvar":"local.temp","passexceptions":0,"qobjectnames":1,"resultvarname":"","stringcutoff":"10000","token":185,"typeformats":{},"watchers":[]}) t07:52:34.259 [31ms] >&"python theDumper.fetchVariables({\"autoderef\":1,\"context\":\"\",\"displaystringlimit\":\"100\",\"dyntype\":1,\"expanded\":[\"inspect\",\"return\",\"watch\",\"local.temp\",\"local\"],\"fancy\":1,\"formats\":{},\"nativemixed\":0,\"partialvar\":\"local.temp\",\"passexceptions\":0,\"qobjectnames\":1,\"resultvarname\":\"\",\"stringcutoff\":\"10000\",\"token\":185,\"typeformats\":{},\"watchers\":[]})\n" >~"result={token=\"0\",data=[{iname=\"local.temp\",name=\"temp\",origaddr=\"0xb5b098\",address=\"0x1ed9ddd0\",address=\"0x1ed9ddd0\",numchild=\"1\",sortable=\"1\",children=[{iname=\"local.temp.@1\",name=\"[QAbstractItemView]\",sortgroup=\"999\",address=\"0x1ed9ddd0\",address=\"0x1ed9ddd0\",numchild=\"1\",type=\"QAbstractItemView\",value=\"\",},{name=\"staticMetaObject\",numchild=\"1\",address=\"0x680e26c0\",type=\"QMetaObject\",value=\"\",},{name=\"[parent]\",sortgroup=\"9\",address=\"0x1ed0cea0\",numchild=\"1\",type=\"QStackedWidget\",valueencoded=\"utf16\",value=\"710074005f007400610062007700690064006700650074005f0073007400610063006b0065006400770069006400670065007400\",},{name=\"[children]\",sortgroup=\"8\",numchild=\"8\",valueencoded=\"itemcount\",value=\"8\",},{name=\"[extra]\",sortgroup=\"1\",numchild=\"1\",value=\"\",},{name=\"[properties]\",sortgroup=\"5\",numchild=\"1\",valueencoded=\"minimumitemcount\",value=\"5\",},{name=\"[methods]\",sortgroup=\"3\",numchild=\"24\",valueencoded=\"itemcount\",value=\"24\",},{name=\"[d]\",address=\"0x1ed9f590\",numchild=\"1\",sortgroup=\"15\",type=\"QTableViewPrivate\",value=\"\",},],type=\"QTableView\",value=\"\",},],typeinfo=[],partial=\"1\",counts={'metaObjectFromType': 1},timings=[]}\n" t07:52:34.321 [62ms] >185^done t07:52:34.321 tResponse time: python theDumper.fetchVariables({"autoderef":1,"context":"","displaystringlimit":"100","dyntype":1,"expanded":["inspect","return","watch","local.temp","local"],"fancy":1,"formats":{},"nativemixed":0,"partialvar":"local.temp","passexceptions":0,"qobjectnames":1,"resultvarname":"","stringcutoff":"10000","token":185,"typeformats":{},"watchers":[]}): 0.093 s t07:52:34.321 <Rebuild Watchmodel 5 @ 07:52:34.321 > t07:52:34.321 Finished retrieving data. t07:52:34.321 dADJUSTING CHILD EXPECTATION FOR local.temp t07:52:34.321 t07:52:48.368 <186python theDumper.fetchVariables({"autoderef":1,"context":"","displaystringlimit":"100","dyntype":1,"expanded":["inspect","return","watch","local.temp.[properties]","local.temp","local"],"fancy":1,"formats":{},"nativemixed":0,"partialvar":"local.temp.[properties]","passexceptions":0,"qobjectnames":1,"resultvarname":"","stringcutoff":"10000","token":186,"typeformats":{},"watchers":[]}) t07:52:48.400 [32ms] >&"python theDumper.fetchVariables({\"autoderef\":1,\"context\":\"\",\"displaystringlimit\":\"100\",\"dyntype\":1,\"expanded\":[\"inspect\",\"return\",\"watch\",\"local.temp.[properties]\",\"local.temp\",\"local\"],\"fancy\":1,\"formats\":{},\"nativemixed\":0,\"partialvar\":\"local.temp.[properties]\",\"passexceptions\":0,\"qobjectnames\":1,\"resultvarname\":\"\",\"stringcutoff\":\"10000\",\"token\":186,\"typeformats\":{},\"watchers\":[]})\n" t07:52:49.915 [1515ms] dHANDLE GDB ERROR: The process was ended forcefully. dProcess crashed t07:52:49.915 dGDB PROCESS FINISHED, status 1, exit code -1073741819 t07:52:49.915 dNOTE: INFERIOR ILL t07:52:49.915 dState changed from InferiorStopOk(11) to InferiorShutdownRequested(13) t07:52:49.915 dCALL: SHUTDOWN INFERIOR t07:52:49.915 dNO GDB PROCESS RUNNING, CMD IGNORED: kill 13 t07:52:49.915 dINFERIOR FINISHED SHUT DOWN t07:52:49.915 dState changed from InferiorShutdownRequested(13) to InferiorShutdownFinished(14) t07:52:49.915 dState changed from InferiorShutdownFinished(14) to EngineShutdownRequested(15) t07:52:49.915 dCALL: SHUTDOWN ENGINE t07:52:49.915 dPLAIN ADAPTER SHUTDOWN 15 t07:52:49.915 dINITIATE GDBENGINE SHUTDOWN, PROC STATE: 0 t07:52:49.915 dNOTE: ENGINE SHUTDOWN FINISHED t07:52:49.915 dState changed from EngineShutdownRequested(15) to EngineShutdownFinished(16) t07:52:49.915
-
@JohnGa said in gdb in QtCreator on windows quits constantly:
dHANDLE GDB ERROR: The process was ended forcefully.
That one looks strange. I'd suggest you to create a bugreport at https://bugreports.qt.io/projects/QTCREATORBUG
Attach the full log and fill out all needed information. You may be asked for a minimal example to reproduce the bug.
In the worst case it's a GDB thing and Creator cannot do anything - but that has to be proved first.
Regards
-
@JohnGa thanks. for reference, this is the report: https://bugreports.qt.io/browse/QTCREATORBUG-22438
-
I solved in this way http://robertoviola.cloud/2020/04/08/qtcreator-gdb-process-exited-unexpectedly/
-
Hi,
I had the same problem with the gdb debugger terminating on entry to a function. (Windows 10 64) Qt Creator 41.2 64 Bit build.
I cleared all of the expressions in the expression evaluator and this got rid of the issue.
There is obviously something wrong with the way Qt and the debugger interact when displaying variables. I have often clicked on a "d" child of an object and had the debugger crash.
Best regards
Rob
-
@robgarnett
How you cleared all expressions in the expression evaluator. I am facing same problem and I think I have to clear it. Beacause it is giving this error only debug mode. So I am not finding way to clear the expressions. Can you guide me please -
@Imran-Hassan
In the left side toolbar, choose "Debug". Then in the "Window" menu, go to "Views", and choose "Reset to Default Layout". Against the right edge, the "Locals" pane will open. Below the "Locals" pane you will see the "Expressions" pane. You can select and clear out all the expressions there.