Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

pydevd_sys_monitoring crashing with inexplicable TypeError #280

Open
bernd-wechner opened this issue Jun 19, 2024 · 1 comment
Open

pydevd_sys_monitoring crashing with inexplicable TypeError #280

bernd-wechner opened this issue Jun 19, 2024 · 1 comment

Comments

@bernd-wechner
Copy link

A strange crash in the debugger:

    for filename in os.listdir(target):
  File "<stringsource>", line 69, in cfunc.to_py.__Pyx_CFunc_7f6725__29_pydevd_sys_monitoring_cython_object__lParen__etc_to_py_4code_11from_offset_9to_offset.wrap
  File "_pydevd_sys_monitoring\\_pydevd_sys_monitoring_cython.pyx", line 1332, in _pydevd_sys_monitoring_cython._jump_event
TypeError: an integer is required

I am using:

  PyDev for Eclipse	12.1.0.202405272215	org.python.pydev.feature.feature.group	Fabio Zadrozny
  PyDev for Eclipse Developer Resources	12.1.0.202405272215	org.python.pydev.feature.source.feature.group	Fabio Zadrozny

in Eclipse:

Version: 2024-03 (4.31.0)
Build id: 20240307-1437

I restarted Eclipse, no change. I pulled an age old trick I picked up in the 1980s no less, of inserting a null statement just before the crash line (in Python a pass statement). And voila, the crash disappeared.

Essentially:

for filename in os.listdir(target):
      <my guff>

crashes, and this:

for filename in os.listdir(target):
      <my guff>
      pass

does not. So my code moving forwards reads:

for filename in os.listdir(target):
      <my guff>
      pass # Debugger 12.1 bug crashes here without this statement

I reckon there's still a line thus annotated in FORTRAN code I wrote in the '80s and maybe a few other code bases around the world ;-).

@fabioz
Copy link
Owner

fabioz commented Jun 27, 2024

Thank you for the report (this may need a bit of investigation on my side...).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants