RIDE icon indicating copy to clipboard operation
RIDE copied to clipboard

RIDE crash during test case name editing

Open JFoederer opened this issue 1 year ago • 2 comments

  • From the tree view select a test case and press F2 or click rename to start a rename action
  • Press Escape

On Windows nothing happens On Linux RIDE crashes (No logs available)

RIDE v2.1dev19

Work around: Use enter or point and click elsewhere in the suite.

JFoederer avatar Feb 12 '24 12:02 JFoederer

This error occurs in wx library, CustomTreeControl. I did not find a way to avoid the problem. In my Fedora Linux 40, Python 3.12.7 and wxPython 4.2.2 the crash does not happen, but the editing of tree labels will stop working. Below is the output observed on PyCharm:

(__init__.py:12298): GLib-GObject-CRITICAL **: 21:36:42.654: ../gobject/gsignal.c:2585: instance '0x55a1ca3d2de0' has no handler with id '65536'
Traceback (most recent call last):
  File "/home/helio/.local/lib/python3.12/site-packages/wx/lib/agw/customtreectrl.py", line 1499, in OnChar
    self.StopEditing()
  File "/home/helio/.local/lib/python3.12/site-packages/wx/lib/agw/customtreectrl.py", line 1557, in StopEditing
    self.Finish()
  File "/home/helio/.local/lib/python3.12/site-packages/wx/lib/agw/customtreectrl.py", line 1474, in Finish
    self._owner.ResetEditControl()
  File "/home/helio/.local/lib/python3.12/site-packages/wx/lib/agw/customtreectrl.py", line 4978, in ResetEditControl
    self._editCtrl.Destroy()
wx._core.wxAssertionError: C++ assertion "m_inKeyPress" failed at /tmp/pip-install-kc7u3hr7/wxpython_3a72f56fd7374f9595ccde3ffa23404e/ext/wxWidgets/src/gtk/textentry.cpp(77) in EndHandlingKeyPressAndCheckIfPending(): 

Users should be aware of this bug, and not press Escape to interrupt editing.

HelioGuilherme66 avatar Nov 02 '24 21:11 HelioGuilherme66

@JFoederer @ZDabrowski I have found an ugly workaround for this problem. Edit the file /usr/lib64/python3.13/site-packages/wx/lib/agw/customtreectrl.py at around lines 4975 to ignore the exception:

if self._editCtrl is not None:
    try:
        self._editCtrl.Destroy()
    except AssertionError:
       pass
    self._editCtrl = None

With this workaround, editing nodes stays normal.

Tested on Fedora 41, Python 3.13.2, wxPython 4.2.2.

HelioGuilherme66 avatar Apr 12 '25 11:04 HelioGuilherme66

@JFoederer This problem is fixed in current development version, 2.2dev41.

HelioGuilherme66 avatar Aug 16 '25 23:08 HelioGuilherme66