Amaury Forgeot d'Arc <[EMAIL PROTECTED]> added the comment: I thought first that the problem was during the execution of gc.collect(), but its not: when configured --with-pydebug, the exception is printed before:
>>> import gc, _bsddb; env=_bsddb.DBEnv(3); del env XXX undetected error Traceback (most recent call last): File "<stdin>", line 1, in <module> bsddb.db.DBNoServerError: (-30992, 'DB_NOSERVER: Fatal error, no RPC server -- No Berkeley DB RPC server environment') gc.collect() is just a rude way to display this "XXX undetected error". (Victor: does Fusil check for this? gc.collect() will not fail if there is another exception in-between, or in debug mode) Now, to the _bsddb module: in general, the following pattern is wrong: dummy = someFunction(); Py_XDECREF(dummy); because it does nothing about an eventual exception set. If the exception can be discarded, PyErr_Clear() must be called. I think there is an invariant to keep in each function: return NULL if and only if an exception is set. Many places in _bsddb do not respect this. ---------- nosy: +amaury.forgeotdarc _______________________________________ Python tracker <[EMAIL PROTECTED]> <http://bugs.python.org/issue3885> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com