Stack Exchange
No clue of the cause of a weird crash during a debug session in Pydev(Chinese Locale)
Environment:
     Chinese Locale
     Microsoft Windows [Version 10.0.17763.1217]
     Eclipse Version: 2020-03(4.15.0) Build id: 20200313-1211
     PyDev version: 7.5.0.202001101138
     Two interpreters tried:
     (1)Python 3.7.1 (v3.7.1:260ec2c36a, Oct 20 2018, 14:57:15) [MSC v.1915 64 bit (AMD64)] on win32
     (2)Python ActivePython 3.7.4 (ActiveState Software Inc.) based on
 on 3.7.4 (default, Jan 21 2020, 18:17:23) [MSC v.1900 64 bit (AMD64)]
Procedure:
(1) set the breakpoint at the line "here = 1"
(2) Load a debug session
(3) In Mainwindow, press characters like "a", "b",...
    The breakpoint will be triggered.
(4) Convert to Console, input "dir(a)", "a.length". After waiting for a second, the programe will be terminated.
I tried my best to rewrite the codes as simple as possible. In a debug session under PyDev/Eclipse/Windows, it reoccures again and again.
But in a run session under python/Windows, everything is fine and normal.

import sys
from PyQt5 import QtGui, QtWidgets, QtCore

class innocent_object(QtCore.QObject):

    def __init__(self):
        super().__init__()

    def eventFilter(self, object, event):
        eventtype = event.type()
        if eventtype == QtCore.QEvent.InputMethod:
            attrlist = event.attributes()
            if len(attrlist):
                a = attrlist[len(attrlist)-1]
                # suspend here, convert to Console, input the below lines:
                # dir(a)
                # a.length
                here = 1
        return super().eventFilter(object, event)

if __name__ == "__main__":    

    app = QtWidgets.QApplication(sys.argv)
    main_window = QtWidgets.QMainWindow()
    main_window.setAttribute(QtCore.Qt.WA_InputMethodEnabled)
    monitor = innocent_object()
    main_window.installEventFilter(monitor)
    main_window.show()
    sys.exit(app.exec_()) 


I can't reproduce this with the instructions given. Which Python version are you using? If you do print(dir(a)) at that place without the debugger in place, does the issue happen too?

thanks for warm reply. I reedited and restyled the question text for your question and kindness.  The script.py works normal and fine in Python/Windows without the debugger.  I have a instinct that accessing SIP wrappers or pydev's flaws is the cause. No futher exploration with my poor knowledge of internals and time-consuming job.
