2

我在Eclipse中有以下Python代码,在调试时会导致堆栈溢出:

v = ogr.Feature(layer.GetLayerDefn())

方法调用是GDAL/OGR库的一部分,我得到的错误消息是:

Traceback (most recent call last):
File "C:\Users\Default\.eclipse\org.eclipse.platform_3.7.0_920333535\plugins\org.python.pydev_2.7.1.2012100913\pysrc\pydevd.py", line 963, in trace_dispatch
     return additionalInfo.CreateDbFrame((self, filename, additionalInfo, t, frame)).trace_dispatch(frame, event, arg)
RuntimeError: maximum recursion depth exceeded Fatal Python error:
Cannot recover from stack overflow.

This application has requested the Runtime to terminate it in an
unusual way. Please contact the application's support team for more
information.

导致错误的代码部分是:

v = ogr.Feature(...)

但它仅在我调试 (F11) 时发生,但在我运行 (CTRL+F11) 时不会发生。

可能会发生什么,我能做些什么来防止这个堆栈溢出

4

0 回答 0