[lxml-dev] Failure to Compile on Windows

I've got pretty far with setting up the dependencies and all but after that the compilation failed with this error. Anyone have a clue? Looks like it's missing some .h that 'nano http' depends on. C:\Arquivos de programas\Microsoft Visual C++ Toolkit 2003\bin\link.exe /DLL /no logo /INCREMENTAL:NO /LIBPATH:c:\Python24\libs /LIBPATH:c:\Python24\PCBuild /EXPORT:initobjectify build\temp.win32-2.4\Release\src/lxml/objectify.obj /OUT:build\lib.win32-2.4\lxml\objectify.pyd /IMPLIB:build\temp.win32-2.4\Release\src/lxml\objectify.lib ..\libxml2-2.6.26.win32\lib\libxml2_a.lib ..\libxslt-1.1.17.win32\lib\libxslt_a.lib ..\libxslt-1.1.17.win32\lib\libexslt_a.lib ..\zlib-1.2.3.win32\lib\zlib.lib ..\iconv-1.9.2.win32\lib\iconv_a.lib Creating library build\temp.win32-2.4\Release\src/lxml\objectify.lib and object build\temp.win32-2.4\Release\src/lxml\objectify.exp libxml2_a.lib(nanohttp.obj) : error LNK2019: unresolved external symbol __imp__WSAGetLastError@0 referenced in function _socket_errno libxml2_a.lib(nanohttp.obj) : error LNK2019: unresolved external symbol __imp__WSACleanup@0 referenced in function _xmlNanoHTTPCleanup libxml2_a.lib(nanoftp.obj) : error LNK2001: unresolved external symbol __imp__WSACleanup@0 libxml2_a.lib(nanohttp.obj) : error LNK2019: unresolved external symbol __imp__closesocket@4 referenced in function _xmlNanoHTTPFreeCtxt libxml2_a.lib(nanoftp.obj) : error LNK2019: unresolved external symbol __imp__closesocket@4 referenced in function _xmlNanoFTPNewCtxt libxml2_a.lib(nanohttp.obj) : error LNK2019: unresolved external symbol __imp__select@20 referenced in function _xmlNanoHTTPSend libxml2_a.lib(nanoftp.obj) : error LNK2001: unresolved external symbol __imp__select@20 libxml2_a.lib(nanohttp.obj) : error LNK2019: unresolved external symbol __imp__send@16 referenced in function _xmlNanoHTTPSend libxml2_a.lib(nanoftp.obj) : error LNK2001: unresolved external symbol __imp__send@16 libxml2_a.lib(nanohttp.obj) : error LNK2019: unresolved external symbol __imp__recv@16 referenced in function _xmlNanoHTTPRecv libxml2_a.lib(nanoftp.obj) : error LNK2001: unresolved external symbol __imp__recv@16 libxml2_a.lib(nanohttp.obj) : error LNK2019: unresolved external symbol __imp__getsockopt@20 referenced in function _xmlNanoHTTPConnectAttempt libxml2_a.lib(nanohttp.obj) : error LNK2019: unresolved external symbol ___WSAFDIsSet@8 referenced in function _xmlNanoHTTPConnectAttempt libxml2_a.lib(nanohttp.obj) : error LNK2019: unresolved external symbol __imp__connect@12 referenced in function _xmlNanoHTTPConnectAttempt libxml2_a.lib(nanoftp.obj) : error LNK2001: unresolved external symbol __imp__connect@12 libxml2_a.lib(nanohttp.obj) : error LNK2019: unresolved external symbol __imp__ioctlsocket@12 referenced in function _xmlNanoHTTPConnectAttempt libxml2_a.lib(nanohttp.obj) : error LNK2019: unresolved external symbol __imp__socket@12 referenced in function _xmlNanoHTTPConnectAttempt libxml2_a.lib(nanoftp.obj) : error LNK2001: unresolved external symbol __imp__socket@12 libxml2_a.lib(nanohttp.obj) : error LNK2019: unresolved external symbol __imp__htons@4 referenced in function _xmlNanoHTTPConnectHost libxml2_a.lib(nanoftp.obj) : error LNK2001: unresolved external symbol __imp__htons@4 libxml2_a.lib(nanohttp.obj) : error LNK2019: unresolved external symbol __imp__gethostbyname@4 referenced in function _xmlNanoHTTPConnectHost libxml2_a.lib(nanoftp.obj) : error LNK2001: unresolved external symbol __imp__gethostbyname@4 libxml2_a.lib(nanohttp.obj) : error LNK2019: unresolved external symbol __imp__WSAStartup@8 referenced in function _xmlNanoHTTPInit libxml2_a.lib(nanoftp.obj) : error LNK2001: unresolved external symbol __imp__WSAStartup@8 libxml2_a.lib(nanoftp.obj) : error LNK2019: unresolved external symbol __imp__listen@8 referenced in function _xmlNanoFTPGetConnection libxml2_a.lib(nanoftp.obj) : error LNK2019: unresolved external symbol __imp__bind@12 referenced in function _xmlNanoFTPGetConnection libxml2_a.lib(nanoftp.obj) : error LNK2019: unresolved external symbol __imp__getsockname@12 referenced in function _xmlNanoFTPGetConnection build\lib.win32-2.4\lxml\objectify.pyd : fatal error LNK1120: 17 unresolved externals error: command '"C:\Arquivos de programas\Microsoft Visual C++ Toolkit 2003\bin\link.exe"' failed with exit status 1120 -- Sidnei da Silva Enfold Systems http://enfoldsystems.com Fax +1 832 201 8856 Office +1 713 942 2377 Ext 214

On Mon, Sep 25, 2006 at 07:09:13PM -0300, Sidnei da Silva wrote: | I've got pretty far with setting up the dependencies and all but after | that the compilation failed with this error. Anyone have a clue? Looks | like it's missing some .h that 'nano http' depends on. FWIW, I've got past that. It was missing Ws2_32.lib. I've managed to build lxml with python trunk, but when running the tests I've got a fatal error due to a negative refcount to a tuple (!). I think I will disable running lxml tests with python trunk, unless someone wants to digg into this. -- Sidnei da Silva Enfold Systems http://enfoldsystems.com Fax +1 832 201 8856 Office +1 713 942 2377 Ext 214

On Mon, Sep 25, 2006 at 11:56:06PM -0300, Sidnei da Silva wrote: | I've managed to build lxml with python trunk, but when running the | tests I've got a fatal error due to a negative refcount to a tuple | (!). | | I think I will disable running lxml tests with python trunk, unless | someone wants to digg into this. And, to my surprise, it fails with the same refcount issue with python2.5-branch. -- Sidnei da Silva Enfold Systems http://enfoldsystems.com Fax +1 832 201 8856 Office +1 713 942 2377 Ext 214

Hi Sidnei, finally coming back to this. Sidnei da Silva wrote:
Thanks for setting this up. The fact that it's a tuple does not necessarily mean it's a Python problem. Could you come up with a stack trace or at least the test name that triggered it? Try running test.py -v. Stefan

On Fri, Oct 20, 2006 at 02:22:26PM +0200, Stefan Behnel wrote: | Thanks for setting this up. The fact that it's a tuple does not necessarily | mean it's a Python problem. Could you come up with a stack trace or at least | the test name that triggered it? Try running test.py -v. There you have it: test_empty_parse (lxml.tests.test_errors.ErrorTestCase) ... ok test_XMLDTDID (lxml.tests.test_etree.ETreeOnlyTestCase) ... Fatal Python error: \pybots\slave\2.5.dasilva-x86\build\Objects\tupleobject.c:169 object at 013A91B8 has negative ref count -606348326 Stack Trace: ------------------------------------------------------------------------------- ntdll.dll!7c822583()
python25_d.dll!Py_FatalError(const char * msg=0x0021d274) Line 1552 C
python25_d.dll!_Py_NegativeRefcount(const char * fname=0x1e2b7da8, int lineno=0x000000a9, _object * op=0x013a91b8) Line 193 + 0xc C python25_d.dll!tupledealloc(PyTupleObject * op=0x0144e478) Line 169 + 0x75 C python25_d.dll!_Py_Dealloc(_object * op=0x0144e478) Line 1928 + 0x7 C python25_d.dll!tupledealloc(PyTupleObject * op=0x01451ab8) Line 169 + 0x8a C python25_d.dll!_Py_Dealloc(_object * op=0x01451ab8) Line 1928 + 0x7 C etree_d.pyd!__pyx_tp_dealloc_5etree__IDDict(_object * o=0x013a94f8) Line 45102 + 0x73 C python25_d.dll!_Py_Dealloc(_object * op=0x013a94f8) Line 1928 + 0x7 C python25_d.dll!frame_dealloc(_frame * f=0x01470b68) Line 416 + 0x6a C python25_d.dll!_Py_Dealloc(_object * op=0x01470b68) Line 1928 + 0x7 C python25_d.dll!fast_function(_object * func=0x00922690, _object * * * pp_stack=0x0021d4dc, int n=0x00000001, int na=0x00000001, int nk=0x00000000) Line 3654 + 0x6 C python25_d.dll!call_function(_object * * * pp_stack=0x0021d4dc, int oparg=0x00000001) Line 3587 + 0x12 C python25_d.dll!PyEval_EvalFrameEx(_frame * f=0x01337c68, int throwflag=0x00000000) Line 2271 C python25_d.dll!PyEval_EvalCodeEx(PyCodeObject * co=0x00a70808, _object * globals=0x01337c68, _object * locals=0x00000000, _object * * args=0x013af60c, int argcount=0x00000002, _object * * kws=0x01449038, int kwcount=0x00000000, _object * * defs=0x00a7e7bc, int defcount=0x00000001, _object * closure=0x00000000) Line 2833 + 0xb C python25_d.dll!function_call(_object * func=0x00b04508, _object * arg=0x013af5f8, _object * kw=0x0144a380) Line 522 + 0x40 C python25_d.dll!PyObject_Call(_object * func=0x00b04508, _object * arg=0x013af5f8, _object * kw=0x0144a380) Line 1858 + 0xf C python25_d.dll!ext_do_call(_object * func=0x00b04508, _object * * * pp_stack=0x0021da3c, int flags=0x00000003, int na=0x00000001, int nk=0x00000000) Line 3848 C python25_d.dll!PyEval_EvalFrameEx(_frame * f=0x01337ac0, int throwflag=0x00000000) Line 2312 C python25_d.dll!PyEval_EvalCodeEx(PyCodeObject * co=0x00a70868, _object * globals=0x01337ac0, _object * locals=0x00000000, _object * * args=0x013afd8c, int argcount=0x00000002, _object * * kws=0x00000000, int kwcount=0x00000000, _object * * defs=0x00000000, int defcount=0x00000000, _object * closure=0x00000000) Line 2833 + 0xb C python25_d.dll!function_call(_object * func=0x00b04560, _object * arg=0x013afd78, _object * kw=0x00000000) Line 522 + 0x40 C python25_d.dll!PyObject_Call(_object * func=0x00b04560, _object * arg=0x013afd78, _object * kw=0x00000000) Line 1858 + 0xf C python25_d.dll!instancemethod_call(_object * func=0x00b04560, _object * arg=0x013afd78, _object * kw=0x00000000) Line 2495 + 0x11 C python25_d.dll!PyObject_Call(_object * func=0x00b8a2b8, _object * arg=0x014e02a0, _object * kw=0x00000000) Line 1858 + 0xf C python25_d.dll!slot_tp_call(_object * self=0x016fe738, _object * args=0x014e02a0, _object * kwds=0x00000000) Line 4581 + 0x11 C python25_d.dll!PyObject_Call(_object * func=0x016fe738, _object * arg=0x014e02a0, _object * kw=0x00000000) Line 1858 + 0xf C python25_d.dll!do_call(_object * func=0x016fe738, _object * * * pp_stack=0x0021e250, int na=0x00000001, int nk=0x00000000) Line 3779 C python25_d.dll!call_function(_object * * * pp_stack=0x0021e250, int oparg=0x00000001) Line 3589 + 0xa C python25_d.dll!PyEval_EvalFrameEx(_frame * f=0x01337918, int throwflag=0x00000000) Line 2271 C python25_d.dll!PyEval_EvalCodeEx(PyCodeObject * co=0x00a75148, _object * globals=0x01337918, _object * locals=0x00000000, _object * * args=0x013d638c, int argcount=0x00000002, _object * * kws=0x01449028, int kwcount=0x00000000, _object * * defs=0x00000000, int defcount=0x00000000, _object * closure=0x00000000) Line 2833 + 0xb C python25_d.dll!function_call(_object * func=0x00b04b38, _object * arg=0x013d6378, _object * kw=0x0144a230) Line 522 + 0x40 C python25_d.dll!PyObject_Call(_object * func=0x00b04b38, _object * arg=0x013d6378, _object * kw=0x0144a23 python25_d.dll!PyObject_Call(_object * func=0x00b04b90, _object * arg=0x0176a538, _object * kw=0x00000000) Line 1858 + 0xf C python25_d.dll!instancemethod_call(_object * func=0x00b04b90, _object * arg=0x0176a538, _object * kw=0x00000000) Line 2495 + 0x11 C python25_d.dll!PyObject_Call(_object * func=0x00b8a138, _object * arg=0x0142c690, _object * kw=0x00000000) Line 1858 + 0xf C python25_d.dll!slot_tp_call(_object * self=0x01503dc8, _object * args=0x0142c690, _object * kwds=0x00000000) Line 4581 + 0x11 C python25_d.dll!PyObject_Call(_object * func=0x01503dc8, _object * arg=0x0142c690, _object * kw=0x00000000) Line 1858 + 0xf C python25_d.dll!do_call(_object * func=0x01503dc8, _object * * * pp_stack=0x0021efc4, int na=0x00000001, int nk=0x00000000) Line 3779 C python25_d.dll!call_function(_object * * * pp_stack=0x0021efc4, int oparg=0x00000001) Line 3589 + 0xa C python25_d.dll!PyEval_EvalFrameEx(_frame * f=0x013369b8, int throwflag=0x00000000) Line 2271 C python25_d.dll!fast_function(_object * func=0x00922690, _object * * * pp_stack=0x0021f498, int n=0x00000002, int na=0x00000002, int nk=0x00000000) Line 3653 C python25_d.dll!call_function(_object * * * pp_stack=0x0021f498, int oparg=0x00000002) Line 3587 + 0x12 C python25_d.dll!PyEval_EvalFrameEx(_frame * f=0x00a85120, int throwflag=0x00000000) Line 2271 C python25_d.dll!fast_function(_object * func=0x00922690, _object * * * pp_stack=0x0021f96c, int n=0x00000001, int na=0x00000001, int nk=0x00000000) Line 3653 C python25_d.dll!call_function(_object * * * pp_stack=0x0021f96c, int oparg=0x00000001) Line 3587 + 0x12 C python25_d.dll!PyEval_EvalFrameEx(_frame * f=0x009f6648, int throwflag=0x00000000) Line 2271 C python25_d.dll!PyEval_EvalCodeEx(PyCodeObject * co=0x00a698c8, _object * globals=0x009f6648, _object * locals=0x009674d0, _object * * args=0x00000000, int argcount=0x00000000, _object * * kws=0x00000000, int kwcount=0x00000000, _object * * defs=0x00000000, int defcount=0x00000000, _object * closure=0x00000000) Line 2833 + 0xb C python25_d.dll!PyEval_EvalCode(PyCodeObject * co=0x00a698c8, _object * globals=0x009674d0, _object * locals=0x009674d0) Line 499 + 0x1f C python25_d.dll!run_mod(_mod * mod=0x00a3cc30, const char * filename=0x00923fe1, _object * globals=0x009674d0, _object * locals=0x009674d0, PyCompilerFlags * flags=0x0021ff2c, _arena * arena=0x00987e20) Line 1264 + 0x11 C python25_d.dll!PyRun_FileExFlags(_iobuf * fp=0x1027c898, const char * filename=0x00923fe1, int start=0x00000101, _object * globals=0x009674d0, _object * locals=0x009674d0, int closeit=0x00000001, PyCompilerFlags * flags=0x0021ff2c) Line 1250 + 0x1d C python25_d.dll!PyRun_SimpleFileExFlags(_iobuf * fp=0x1027c898, const char * filename=0x00923fe1, int closeit=0x00000001, PyCompilerFlags * flags=0x0021ff2c) Line 871 + 0x22 C python25_d.dll!PyRun_AnyFileExFlags(_iobuf * fp=0x1027c898, const char * filename=0x00923fe1, int closeit=0x00000001, PyCompilerFlags * flags=0x0021ff2c) Line 689 + 0x15 C python25_d.dll!Py_Main(int argc=0x00000003, char * * argv=0x00923fa0) Line 499 + 0x30 C python_d.exe!main(int argc=0x00000003, char * * argv=0x00923fa0) Line 23 + 0xe C python_d.exe!mainCRTStartup() Line 398 + 0x11 C kernel32.dll!77e523e5() ------------------------------------------------------------------------------- -- Sidnei da Silva Enfold Systems http://enfoldsystems.com Fax +1 832 201 8856 Office +1 713 942 2377 Ext 214

Hi Sidney, Sidnei da Silva wrote:
Thanks. That wasn't the greatest code anyway, so thanks for pointing me at it. I couldn't reproduce the bug and didn't find anything suspicious under valgrind, so I just committed a cleaned up version of some code parts that may have lead to the problem and I hope that changes the refcount behaviour also. Could you retry with the current trunk version? Thanks again, Stefan

On Sat, Oct 21, 2006 at 10:14:56PM +0200, Stefan Behnel wrote: | Thanks. That wasn't the greatest code anyway, so thanks for pointing me at it. | I couldn't reproduce the bug and didn't find anything suspicious under | valgrind, so I just committed a cleaned up version of some code parts that may | have lead to the problem and I hope that changes the refcount behaviour also. | | Could you retry with the current trunk version? Great! That seems to have fixed it. I do not get the refcount problem anymore. There are a couple failing tests, mainly due to calling os.remove() on an open file (that does not work on Windows). Ex:
-- Sidnei da Silva Enfold Systems http://enfoldsystems.com Fax +1 832 201 8856 Office +1 713 942 2377 Ext 214

On Mon, Sep 25, 2006 at 07:09:13PM -0300, Sidnei da Silva wrote: | I've got pretty far with setting up the dependencies and all but after | that the compilation failed with this error. Anyone have a clue? Looks | like it's missing some .h that 'nano http' depends on. FWIW, I've got past that. It was missing Ws2_32.lib. I've managed to build lxml with python trunk, but when running the tests I've got a fatal error due to a negative refcount to a tuple (!). I think I will disable running lxml tests with python trunk, unless someone wants to digg into this. -- Sidnei da Silva Enfold Systems http://enfoldsystems.com Fax +1 832 201 8856 Office +1 713 942 2377 Ext 214

On Mon, Sep 25, 2006 at 11:56:06PM -0300, Sidnei da Silva wrote: | I've managed to build lxml with python trunk, but when running the | tests I've got a fatal error due to a negative refcount to a tuple | (!). | | I think I will disable running lxml tests with python trunk, unless | someone wants to digg into this. And, to my surprise, it fails with the same refcount issue with python2.5-branch. -- Sidnei da Silva Enfold Systems http://enfoldsystems.com Fax +1 832 201 8856 Office +1 713 942 2377 Ext 214

Hi Sidnei, finally coming back to this. Sidnei da Silva wrote:
Thanks for setting this up. The fact that it's a tuple does not necessarily mean it's a Python problem. Could you come up with a stack trace or at least the test name that triggered it? Try running test.py -v. Stefan

On Fri, Oct 20, 2006 at 02:22:26PM +0200, Stefan Behnel wrote: | Thanks for setting this up. The fact that it's a tuple does not necessarily | mean it's a Python problem. Could you come up with a stack trace or at least | the test name that triggered it? Try running test.py -v. There you have it: test_empty_parse (lxml.tests.test_errors.ErrorTestCase) ... ok test_XMLDTDID (lxml.tests.test_etree.ETreeOnlyTestCase) ... Fatal Python error: \pybots\slave\2.5.dasilva-x86\build\Objects\tupleobject.c:169 object at 013A91B8 has negative ref count -606348326 Stack Trace: ------------------------------------------------------------------------------- ntdll.dll!7c822583()
python25_d.dll!Py_FatalError(const char * msg=0x0021d274) Line 1552 C
python25_d.dll!_Py_NegativeRefcount(const char * fname=0x1e2b7da8, int lineno=0x000000a9, _object * op=0x013a91b8) Line 193 + 0xc C python25_d.dll!tupledealloc(PyTupleObject * op=0x0144e478) Line 169 + 0x75 C python25_d.dll!_Py_Dealloc(_object * op=0x0144e478) Line 1928 + 0x7 C python25_d.dll!tupledealloc(PyTupleObject * op=0x01451ab8) Line 169 + 0x8a C python25_d.dll!_Py_Dealloc(_object * op=0x01451ab8) Line 1928 + 0x7 C etree_d.pyd!__pyx_tp_dealloc_5etree__IDDict(_object * o=0x013a94f8) Line 45102 + 0x73 C python25_d.dll!_Py_Dealloc(_object * op=0x013a94f8) Line 1928 + 0x7 C python25_d.dll!frame_dealloc(_frame * f=0x01470b68) Line 416 + 0x6a C python25_d.dll!_Py_Dealloc(_object * op=0x01470b68) Line 1928 + 0x7 C python25_d.dll!fast_function(_object * func=0x00922690, _object * * * pp_stack=0x0021d4dc, int n=0x00000001, int na=0x00000001, int nk=0x00000000) Line 3654 + 0x6 C python25_d.dll!call_function(_object * * * pp_stack=0x0021d4dc, int oparg=0x00000001) Line 3587 + 0x12 C python25_d.dll!PyEval_EvalFrameEx(_frame * f=0x01337c68, int throwflag=0x00000000) Line 2271 C python25_d.dll!PyEval_EvalCodeEx(PyCodeObject * co=0x00a70808, _object * globals=0x01337c68, _object * locals=0x00000000, _object * * args=0x013af60c, int argcount=0x00000002, _object * * kws=0x01449038, int kwcount=0x00000000, _object * * defs=0x00a7e7bc, int defcount=0x00000001, _object * closure=0x00000000) Line 2833 + 0xb C python25_d.dll!function_call(_object * func=0x00b04508, _object * arg=0x013af5f8, _object * kw=0x0144a380) Line 522 + 0x40 C python25_d.dll!PyObject_Call(_object * func=0x00b04508, _object * arg=0x013af5f8, _object * kw=0x0144a380) Line 1858 + 0xf C python25_d.dll!ext_do_call(_object * func=0x00b04508, _object * * * pp_stack=0x0021da3c, int flags=0x00000003, int na=0x00000001, int nk=0x00000000) Line 3848 C python25_d.dll!PyEval_EvalFrameEx(_frame * f=0x01337ac0, int throwflag=0x00000000) Line 2312 C python25_d.dll!PyEval_EvalCodeEx(PyCodeObject * co=0x00a70868, _object * globals=0x01337ac0, _object * locals=0x00000000, _object * * args=0x013afd8c, int argcount=0x00000002, _object * * kws=0x00000000, int kwcount=0x00000000, _object * * defs=0x00000000, int defcount=0x00000000, _object * closure=0x00000000) Line 2833 + 0xb C python25_d.dll!function_call(_object * func=0x00b04560, _object * arg=0x013afd78, _object * kw=0x00000000) Line 522 + 0x40 C python25_d.dll!PyObject_Call(_object * func=0x00b04560, _object * arg=0x013afd78, _object * kw=0x00000000) Line 1858 + 0xf C python25_d.dll!instancemethod_call(_object * func=0x00b04560, _object * arg=0x013afd78, _object * kw=0x00000000) Line 2495 + 0x11 C python25_d.dll!PyObject_Call(_object * func=0x00b8a2b8, _object * arg=0x014e02a0, _object * kw=0x00000000) Line 1858 + 0xf C python25_d.dll!slot_tp_call(_object * self=0x016fe738, _object * args=0x014e02a0, _object * kwds=0x00000000) Line 4581 + 0x11 C python25_d.dll!PyObject_Call(_object * func=0x016fe738, _object * arg=0x014e02a0, _object * kw=0x00000000) Line 1858 + 0xf C python25_d.dll!do_call(_object * func=0x016fe738, _object * * * pp_stack=0x0021e250, int na=0x00000001, int nk=0x00000000) Line 3779 C python25_d.dll!call_function(_object * * * pp_stack=0x0021e250, int oparg=0x00000001) Line 3589 + 0xa C python25_d.dll!PyEval_EvalFrameEx(_frame * f=0x01337918, int throwflag=0x00000000) Line 2271 C python25_d.dll!PyEval_EvalCodeEx(PyCodeObject * co=0x00a75148, _object * globals=0x01337918, _object * locals=0x00000000, _object * * args=0x013d638c, int argcount=0x00000002, _object * * kws=0x01449028, int kwcount=0x00000000, _object * * defs=0x00000000, int defcount=0x00000000, _object * closure=0x00000000) Line 2833 + 0xb C python25_d.dll!function_call(_object * func=0x00b04b38, _object * arg=0x013d6378, _object * kw=0x0144a230) Line 522 + 0x40 C python25_d.dll!PyObject_Call(_object * func=0x00b04b38, _object * arg=0x013d6378, _object * kw=0x0144a23 python25_d.dll!PyObject_Call(_object * func=0x00b04b90, _object * arg=0x0176a538, _object * kw=0x00000000) Line 1858 + 0xf C python25_d.dll!instancemethod_call(_object * func=0x00b04b90, _object * arg=0x0176a538, _object * kw=0x00000000) Line 2495 + 0x11 C python25_d.dll!PyObject_Call(_object * func=0x00b8a138, _object * arg=0x0142c690, _object * kw=0x00000000) Line 1858 + 0xf C python25_d.dll!slot_tp_call(_object * self=0x01503dc8, _object * args=0x0142c690, _object * kwds=0x00000000) Line 4581 + 0x11 C python25_d.dll!PyObject_Call(_object * func=0x01503dc8, _object * arg=0x0142c690, _object * kw=0x00000000) Line 1858 + 0xf C python25_d.dll!do_call(_object * func=0x01503dc8, _object * * * pp_stack=0x0021efc4, int na=0x00000001, int nk=0x00000000) Line 3779 C python25_d.dll!call_function(_object * * * pp_stack=0x0021efc4, int oparg=0x00000001) Line 3589 + 0xa C python25_d.dll!PyEval_EvalFrameEx(_frame * f=0x013369b8, int throwflag=0x00000000) Line 2271 C python25_d.dll!fast_function(_object * func=0x00922690, _object * * * pp_stack=0x0021f498, int n=0x00000002, int na=0x00000002, int nk=0x00000000) Line 3653 C python25_d.dll!call_function(_object * * * pp_stack=0x0021f498, int oparg=0x00000002) Line 3587 + 0x12 C python25_d.dll!PyEval_EvalFrameEx(_frame * f=0x00a85120, int throwflag=0x00000000) Line 2271 C python25_d.dll!fast_function(_object * func=0x00922690, _object * * * pp_stack=0x0021f96c, int n=0x00000001, int na=0x00000001, int nk=0x00000000) Line 3653 C python25_d.dll!call_function(_object * * * pp_stack=0x0021f96c, int oparg=0x00000001) Line 3587 + 0x12 C python25_d.dll!PyEval_EvalFrameEx(_frame * f=0x009f6648, int throwflag=0x00000000) Line 2271 C python25_d.dll!PyEval_EvalCodeEx(PyCodeObject * co=0x00a698c8, _object * globals=0x009f6648, _object * locals=0x009674d0, _object * * args=0x00000000, int argcount=0x00000000, _object * * kws=0x00000000, int kwcount=0x00000000, _object * * defs=0x00000000, int defcount=0x00000000, _object * closure=0x00000000) Line 2833 + 0xb C python25_d.dll!PyEval_EvalCode(PyCodeObject * co=0x00a698c8, _object * globals=0x009674d0, _object * locals=0x009674d0) Line 499 + 0x1f C python25_d.dll!run_mod(_mod * mod=0x00a3cc30, const char * filename=0x00923fe1, _object * globals=0x009674d0, _object * locals=0x009674d0, PyCompilerFlags * flags=0x0021ff2c, _arena * arena=0x00987e20) Line 1264 + 0x11 C python25_d.dll!PyRun_FileExFlags(_iobuf * fp=0x1027c898, const char * filename=0x00923fe1, int start=0x00000101, _object * globals=0x009674d0, _object * locals=0x009674d0, int closeit=0x00000001, PyCompilerFlags * flags=0x0021ff2c) Line 1250 + 0x1d C python25_d.dll!PyRun_SimpleFileExFlags(_iobuf * fp=0x1027c898, const char * filename=0x00923fe1, int closeit=0x00000001, PyCompilerFlags * flags=0x0021ff2c) Line 871 + 0x22 C python25_d.dll!PyRun_AnyFileExFlags(_iobuf * fp=0x1027c898, const char * filename=0x00923fe1, int closeit=0x00000001, PyCompilerFlags * flags=0x0021ff2c) Line 689 + 0x15 C python25_d.dll!Py_Main(int argc=0x00000003, char * * argv=0x00923fa0) Line 499 + 0x30 C python_d.exe!main(int argc=0x00000003, char * * argv=0x00923fa0) Line 23 + 0xe C python_d.exe!mainCRTStartup() Line 398 + 0x11 C kernel32.dll!77e523e5() ------------------------------------------------------------------------------- -- Sidnei da Silva Enfold Systems http://enfoldsystems.com Fax +1 832 201 8856 Office +1 713 942 2377 Ext 214

Hi Sidney, Sidnei da Silva wrote:
Thanks. That wasn't the greatest code anyway, so thanks for pointing me at it. I couldn't reproduce the bug and didn't find anything suspicious under valgrind, so I just committed a cleaned up version of some code parts that may have lead to the problem and I hope that changes the refcount behaviour also. Could you retry with the current trunk version? Thanks again, Stefan

On Sat, Oct 21, 2006 at 10:14:56PM +0200, Stefan Behnel wrote: | Thanks. That wasn't the greatest code anyway, so thanks for pointing me at it. | I couldn't reproduce the bug and didn't find anything suspicious under | valgrind, so I just committed a cleaned up version of some code parts that may | have lead to the problem and I hope that changes the refcount behaviour also. | | Could you retry with the current trunk version? Great! That seems to have fixed it. I do not get the refcount problem anymore. There are a couple failing tests, mainly due to calling os.remove() on an open file (that does not work on Windows). Ex:
-- Sidnei da Silva Enfold Systems http://enfoldsystems.com Fax +1 832 201 8856 Office +1 713 942 2377 Ext 214
participants (3)
-
Sidnei da Silva
-
Sidnei da Silva
-
Stefan Behnel