<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[Pyside6.6.1  program crashed when QComboBox addItem() after clear()]]></title><description><![CDATA[<pre><code class="language-python"># init
self.dbList = QComboBox(self.centralwidget)

# use in
self.ui.dbList.clear()
db_count = get_dbs(r)
print(f"db count:{db_count}")
for db_idx in range(int(db_count)):
     key = f"db{db_idx}"
     db_key_count = 0
     if key in redis_info_list:
          db_key_count = redis_info_list[key]["keys"]
     self.ui.dbList.addItem(f"{key} ({db_key_count})", db_idx)
</code></pre>
<p dir="auto">full code:<br />
<a href="https://github.com/goodspb/reedis/blob/main/window/main_window.py#L145" target="_blank" rel="noopener noreferrer nofollow ugc">https://github.com/goodspb/reedis/blob/main/window/main_window.py#L145</a></p>
<p dir="auto">error:</p>
<pre><code>2024-01-13 17:03:38.386 python[28960:998356] *** Terminating app due to uncaught exception 'NSRangeException', reason: '*** -[__NSArrayM objectAtIndexedSubscript:]: index 0 beyond bounds for empty array'
*** First throw call stack:
(
	0   CoreFoundation                      0x00000001a44cf0e4 __exceptionPreprocess + 176
	1   libobjc.A.dylib                     0x00000001a3fedfd0 objc_exception_throw + 60
	2   CoreFoundation                      0x00000001a45b99b4 -[__NSCFString characterAtIndex:].cold.1 + 0
	3   CoreFoundation                      0x00000001a4442b28 -[__NSArrayM objectAtIndexedSubscript:] + 188
	4   libqcocoa.dylib                     0x000000010bca6044 _ZN20QCocoaSystemTrayIcon13emitActivatedEv + 274796
	5   libqcocoa.dylib                     0x000000010bca60c8 _ZN20QCocoaSystemTrayIcon13emitActivatedEv + 274928
	6   libqcocoa.dylib                     0x000000010bca4688 _ZN20QCocoaSystemTrayIcon13emitActivatedEv + 268208
	7   QtWidgets                           0x00000001048bd1a8 _ZN9QListView16selectionChangedERK14QItemSelectionS2_ + 204
	8   QtCore                              0x000000010551348c _ZN11QMetaObject8activateEP7QObjectPKS_iPPv + 3808
	9   QtCore                              0x00000001056d9e44 _ZN19QItemSelectionModel20emitSelectionChangedERK14QItemSelectionS2_ + 216
	10  QtCore                              0x00000001056d9a2c _ZN19QItemSelectionModel6selectERK14QItemSelection6QFlagsINS_13SelectionFlagEE + 636
	11  QtCore                              0x00000001056d970c _ZN19QItemSelectionModel6selectERK11QModelIndex6QFlagsINS_13SelectionFlagEE + 68
	12  QtCore                              0x00000001056da8cc _ZN19QItemSelectionModel15setCurrentIndexERK11QModelIndex6QFlagsINS_13SelectionFlagEE + 260
	13  QtWidgets                           0x000000010471b338 _ZNK9QComboBox5countEv + 828
	14  QtWidgets                           0x000000010471e8b4 _ZN9QComboBoxC1ER16QComboBoxPrivateP7QWidget + 2412
	15  QtCore                              0x0000000105513224 _ZN11QMetaObject8activateEP7QObjectPKS_iPPv + 3192
	16  QtCore                              0x00000001056c2944 _ZN18QAbstractItemModel13endInsertRowsEv + 200
	17  QtGui                               0x0000000109a677a4 _ZN18QStandardItemModel11itemChangedEP13QStandardItem + 2376
	18  QtWidgets                           0x0000000104721910 _ZN9QComboBox10insertItemEiRK5QIconRK7QStringRK8QVariant + 368
	19  QtWidgets.abi3.so                   0x00000001091153a8 _ZL25Sbk_QComboBoxFunc_addItemP7_objectS0_S0_ + 1032
	20  python3.10                          0x00000001027c4b9c cfunction_call + 60
	21  python3.10                          0x0000000102765f34 _PyObject_MakeTpCall + 336
	22  python3.10                          0x000000010289b1c4 _PyEval_EvalFrameDefault + 155768
	23  pydevd_frame_evaluator_darwin_310_6 0x0000000103f63500 __pyx_f_18_pydevd_frame_eval_36pydevd_frame_evaluator_darwin_310_64_get_bytecode_while_frame_eval + 4316
	24  python3.10                          0x0000000102767548 _PyFunction_Vectorcall + 548
	25  python3.10                          0x000000010276bcb4 method_vectorcall + 288
	26  libpyside6.abi3.6.6.dylib           0x0000000103efe750 _ZN6PySide13SignalManager20callPythonMetaMethodERK11QMetaMethodPPvP7_objectb + 536
	27  libpyside6.abi3.6.6.dylib           0x0000000103efe318 _ZN6PySide13SignalManager20SignalManagerPrivate16qtMethodMetacallEP7QObjectiPPv + 760
	28  QtCore                              0x00000001055131f4 _ZN11QMetaObject8activateEP7QObjectPKS_iPPv + 3144
	29  QtWidgets                           0x0000000104704ec8 _ZNK15QAbstractButton11isCheckableEv + 816
	30  QtWidgets                           0x0000000104704d48 _ZNK15QAbstractButton11isCheckableEv + 432
	31  QtWidgets                           0x0000000104705c48 _ZN15QAbstractButton17mouseReleaseEventEP11QMouseEvent + 172
	32  QtWidgets                           0x00000001046518b8 _ZN7QWidget5eventEP6QEvent + 132
	33  QtWidgets                           0x00000001047b2b24 _ZN11QPushButton5eventEP6QEvent + 204
	34  QtWidgets                           0x0000000104608594 _ZN19QApplicationPrivate13notify_helperEP7QObjectP6QEvent + 272
	35  QtWidgets                           0x000000010460a5c0 _ZN12QApplication6notifyEP7QObjectP6QEvent + 5072
	36  QtCore                              0x00000001054c9474 _ZN16QCoreApplication15notifyInternal2EP7QObjectP6QEvent + 292
	37  QtWidgets                           0x0000000104608b34 _ZN19QApplicationPrivate14sendMouseEventEP7QWidgetP11QMouseEventS1_S1_PS1_R8QPointerIS0_Ebb + 808
	38  QtWidgets                           0x0000000104666860 _ZNK21QWidgetRepaintManager3rhiEv + 11080
	39  QtWidgets                           0x0000000104665a6c _ZNK21QWidgetRepaintManager3rhiEv + 7508
	40  QtWidgets                           0x0000000104608594 _ZN19QApplicationPrivate13notify_helperEP7QObjectP6QEvent + 272
	41  QtWidgets                           0x00000001046093e8 _ZN12QApplication6notifyEP7QObjectP6QEvent + 504
	42  QtCore                              0x00000001054c9474 _ZN16QCoreApplication15notifyInternal2EP7QObjectP6QEvent + 292
	43  QtGui                               0x00000001097c39ec _ZN22QGuiApplicationPrivate17processMouseEventEPN29QWindowSystemInterfacePrivate10MouseEventE + 1740
	44  QtGui                               0x000000010981f674 _ZN22QWindowSystemInterface22sendWindowSystemEventsE6QFlagsIN10QEventLoop17ProcessEventsFlagEE + 408
	45  libqcocoa.dylib                     0x000000010bc47d74 qt_plugin_instance + 58768
	46  CoreFoundation                      0x00000001a44565ac __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 28
	47  CoreFoundation                      0x00000001a4456540 __CFRunLoopDoSource0 + 176
	48  CoreFoundation                      0x00000001a44562b0 __CFRunLoopDoSources0 + 244
	49  CoreFoundation                      0x00000001a4454eb8 __CFRunLoopRun + 828
	50  CoreFoundation                      0x00000001a4454428 CFRunLoopRunSpecific + 612
	51  HIToolbox                           0x00000001adca8df0 RunCurrentEventLoopInMode + 292
	52  HIToolbox                           0x00000001adca8a80 ReceiveNextEventCommon + 220
	53  HIToolbox                           0x00000001adca8984 _BlockUntilNextEventMatchingListInModeWithFilter + 76
	54  AppKit                              0x00000001a767c908 _DPSNextEvent + 636
	55  AppKit                              0x00000001a767baa4 -[NSApplication(NSEvent) _nextEventMatchingEventMask:untilDate:inMode:dequeue:] + 716
	56  AppKit                              0x00000001a766ff08 -[NSApplication run] + 464
	57  libqcocoa.dylib                     0x000000010bc458fc qt_plugin_instance + 49432
	58  QtCore                              0x00000001054d3160 _ZN10QEventLoop4execE6QFlagsINS_17ProcessEventsFlagEE + 540
	59  QtCore                              0x00000001054c9b00 _ZN16QCoreApplication4execEv + 112
	60  QtWidgets.abi3.so                   0x00000001091d72d8 _ZL25Sbk_QApplicationFunc_execP7_object + 60
	61  python3.10                          0x00000001027c57cc cfunction_vectorcall_NOARGS + 96
	62  python3.10                          0x0000000102897c90 _PyEval_EvalFrameDefault + 142148
	63  pydevd_frame_evaluator_darwin_310_6 0x0000000103f63500 __pyx_f_18_pydevd_frame_eval_36pydevd_frame_evaluator_darwin_310_64_get_bytecode_while_frame_eval + 4316
	64  python3.10                          0x0000000102873444 _PyEval_Vector + 532
	65  python3.10                          0x000000010286de8c builtin_exec + 308
	66  python3.10                          0x00000001027c59a0 cfunction_vectorcall_FASTCALL + 88
	67  python3.10                          0x000000010289e570 call_function + 1620
	68  python3.10                          0x0000000102876fe8 _PyEval_EvalFrameDefault + 7836
	69  pydevd_frame_evaluator_darwin_310_6 0x0000000103f63500 __pyx_f_18_pydevd_frame_eval_36pydevd_frame_evaluator_darwin_310_64_get_bytecode_while_frame_eval + 4316
	70  python3.10                          0x0000000102767548 _PyFunction_Vectorcall + 548
	71  python3.10                          0x000000010289ded8 PyObject_Vectorcall.4459 + 76
	72  python3.10                          0x000000010289aa18 _PyEval_EvalFrameDefault + 153804
	73  pydevd_frame_evaluator_darwin_310_6 0x0000000103f63500 __pyx_f_18_pydevd_frame_eval_36pydevd_frame_evaluator_darwin_310_64_get_bytecode_while_frame_eval + 4316
	74  python3.10                          0x0000000102767548 _PyFunction_Vectorcall + 548
	75  python3.10                          0x000000010289ded8 PyObject_Vectorcall.4459 + 76
	76  python3.10                          0x0000000102898e30 _PyEval_EvalFrameDefault + 146660
	77  python3.10                          0x0000000102767548 _PyFunction_Vectorcall + 548
	78  python3.10                          0x000000010287d66c _PyEval_EvalFrameDefault + 34080
	79  python3.10                          0x0000000102767548 _PyFunction_Vectorcall + 548
	80  python3.10                          0x000000010289dfb0 call_function + 148
	81  python3.10                          0x0000000102876fe8 _PyEval_EvalFrameDefault + 7836
	82  python3.10                          0x0000000102873444 _PyEval_Vector + 532
	83  python3.10                          0x00000001028ec518 run_mod + 220
	84  python3.10                          0x00000001028ec2b8 pyrun_file + 156
	85  python3.10                          0x00000001028ebd04 _PyRun_SimpleFileObject + 316
	86  python3.10                          0x00000001028eb66c _PyRun_AnyFileObject + 216
	87  python3.10                          0x000000010290fc14 pymain_run_file_obj + 196
	88  python3.10                          0x000000010290f4a0 pymain_run_file + 72
	89  python3.10                          0x000000010290eb40 pymain_run_python + 340
	90  python3.10                          0x000000010290e994 Py_RunMain + 40
	91  python3.10                          0x000000010270a650 main + 56
	92  dyld                                0x00000001a401ff28 start + 2236
)
libc++abi: terminating due to uncaught exception of type NSException
</code></pre>
]]></description><link>https://forum.qt.io/topic/153687/pyside6-6-1-program-crashed-when-qcombobox-additem-after-clear</link><generator>RSS for Node</generator><lastBuildDate>Thu, 05 Nov 2026 14:49:45 GMT</lastBuildDate><atom:link href="https://forum.qt.io/topic/153687.rss" rel="self" type="application/rss+xml"/><pubDate>Sat, 13 Jan 2024 09:11:02 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Pyside6.6.1  program crashed when QComboBox addItem() after clear() on Fri, 08 Mar 2024 15:25:18 GMT]]></title><description><![CDATA[<p dir="auto">Just checked on 6.6.2, and it's been fixed. Thanks</p>
]]></description><link>https://forum.qt.io/post/792617</link><guid isPermaLink="true">https://forum.qt.io/post/792617</guid><dc:creator><![CDATA[Malvin Lok]]></dc:creator><pubDate>Fri, 08 Mar 2024 15:25:18 GMT</pubDate></item><item><title><![CDATA[Reply to Pyside6.6.1  program crashed when QComboBox addItem() after clear() on Sun, 03 Mar 2024 08:36:31 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/sgaist">@<bdi>SGaist</bdi></a> Cool, thanks. Let me try to update it to 6.6.2.</p>
]]></description><link>https://forum.qt.io/post/791942</link><guid isPermaLink="true">https://forum.qt.io/post/791942</guid><dc:creator><![CDATA[Malvin Lok]]></dc:creator><pubDate>Sun, 03 Mar 2024 08:36:31 GMT</pubDate></item><item><title><![CDATA[Reply to Pyside6.6.1  program crashed when QComboBox addItem() after clear() on Sat, 02 Mar 2024 19:52:46 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/malvin-lok">@<bdi>Malvin-Lok</bdi></a> based on the bug report, it has been fixed for the next release.</p>
]]></description><link>https://forum.qt.io/post/791919</link><guid isPermaLink="true">https://forum.qt.io/post/791919</guid><dc:creator><![CDATA[SGaist]]></dc:creator><pubDate>Sat, 02 Mar 2024 19:52:46 GMT</pubDate></item><item><title><![CDATA[Reply to Pyside6.6.1  program crashed when QComboBox addItem() after clear() on Sat, 02 Mar 2024 10:08:05 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/sgaist">@<bdi>SGaist</bdi></a> Thanks.</p>
<p dir="auto">I've created a sample project.</p>
<p dir="auto"><a href="https://github.com/goodspb/Pyside6Crash" target="_blank" rel="noopener noreferrer nofollow ugc">https://github.com/goodspb/Pyside6Crash</a></p>
]]></description><link>https://forum.qt.io/post/791891</link><guid isPermaLink="true">https://forum.qt.io/post/791891</guid><dc:creator><![CDATA[Malvin Lok]]></dc:creator><pubDate>Sat, 02 Mar 2024 10:08:05 GMT</pubDate></item><item><title><![CDATA[Reply to Pyside6.6.1  program crashed when QComboBox addItem() after clear() on Sat, 02 Mar 2024 08:28:37 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/friedemannkleint">@<bdi>friedemannkleint</bdi></a> As I look at the question, yes, it's quite similar.</p>
]]></description><link>https://forum.qt.io/post/791884</link><guid isPermaLink="true">https://forum.qt.io/post/791884</guid><dc:creator><![CDATA[Malvin Lok]]></dc:creator><pubDate>Sat, 02 Mar 2024 08:28:37 GMT</pubDate></item><item><title><![CDATA[Reply to Pyside6.6.1  program crashed when QComboBox addItem() after clear() on Fri, 02 Feb 2024 07:02:23 GMT]]></title><description><![CDATA[<p dir="auto">This sounds like <a href="https://bugreports.qt.io/browse/QTBUG-120469" target="_blank" rel="noopener noreferrer nofollow ugc">https://bugreports.qt.io/browse/QTBUG-120469</a> ?</p>
]]></description><link>https://forum.qt.io/post/788605</link><guid isPermaLink="true">https://forum.qt.io/post/788605</guid><dc:creator><![CDATA[friedemannkleint]]></dc:creator><pubDate>Fri, 02 Feb 2024 07:02:23 GMT</pubDate></item><item><title><![CDATA[Reply to Pyside6.6.1  program crashed when QComboBox addItem() after clear() on Thu, 01 Feb 2024 21:23:35 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/malvin-lok">@<bdi>Malvin-Lok</bdi></a> Hi,</p>
<p dir="auto">Can you reduce your code so we can rule out interference from other dependencies ?</p>
]]></description><link>https://forum.qt.io/post/788571</link><guid isPermaLink="true">https://forum.qt.io/post/788571</guid><dc:creator><![CDATA[SGaist]]></dc:creator><pubDate>Thu, 01 Feb 2024 21:23:35 GMT</pubDate></item><item><title><![CDATA[Reply to Pyside6.6.1  program crashed when QComboBox addItem() after clear() on Sat, 13 Jan 2024 09:30:11 GMT]]></title><description><![CDATA[<p dir="auto">python: 3.10.13<br />
OS: macOS 13.6.3</p>
]]></description><link>https://forum.qt.io/post/786199</link><guid isPermaLink="true">https://forum.qt.io/post/786199</guid><dc:creator><![CDATA[Malvin Lok]]></dc:creator><pubDate>Sat, 13 Jan 2024 09:30:11 GMT</pubDate></item></channel></rss>