Ice development environment together with Python 2.7

thowethowe Member Thomas WeiningerOrganization: Dialog SemiconductorProject: Semiconductor Industry

We use Ice 3.6.1 in combination with Python 2.7 under Windows 7. We see cases where the Python process crashes because of an access violation. The call stack indicates that Ice might be somehow involved in this crashes. In order to be able to debug this issue thoroughly we would like to create a Python development environment that allows us to debug the C/C++ sources of Python 2.7 and Ice 3.6 in MS Visual C++.

Python 2.7 is built using Visual C++ 2008 and Ice 3.6 is built using Visual C++ 2015 and does not support Visual C++ 2008, which makes it difficult for us to use both together. Could to please give us some advice about how we could proceed? Is there an easy way to build Ice using Visual C++ 2008 so we can use it in combination with our Python debug builds?

Tagged:

Best Answer

  • xdmxdm ZeroC Staff La Coruña, SpainJose Gutierrez de la ConchaOrganization: ZeroC, Inc.Project: Ice Developer ZeroC Staff
    Accepted Answer

    Hi,

    To do a debug build with setup.py try

    python setup.py build --debug
    

Answers

  • xdmxdm ZeroC Staff La Coruña, SpainAdministrators, ZeroC Staff Jose Gutierrez de la ConchaOrganization: ZeroC, Inc.Project: Ice Developer ZeroC Staff

    Hi Thomas,

    We provide binary wheels for Python 2.7 build with VS 2008, those packages doesn't have any dependencies on Visual Studio 2015. Are you using these packages?

    See details in https://doc.zeroc.com/display/Ice36/Using+the+Python+Distribution

    We also provide pip source packages and binary packages for other Python versions see https://pypi.python.org/pypi/zeroc-ice/3.6.2

  • thowethowe Member Thomas WeiningerOrganization: Dialog SemiconductorProject: Semiconductor Industry

    Thank you for your answer. I didn't realize that I could use the source distribution on pypi to build also the C++ libraries that are needed. One question: What do I need to do to start a DEBUG build? Is it enough to add a

    extra_compile_args.append('/DDEBUG')
    

    in the setup.py?

  • xdmxdm ZeroC Staff La Coruña, SpainAdministrators, ZeroC Staff Jose Gutierrez de la ConchaOrganization: ZeroC, Inc.Project: Ice Developer ZeroC Staff
    Accepted Answer

    Hi,

    To do a debug build with setup.py try

    python setup.py build --debug
    
  • xdmxdm ZeroC Staff La Coruña, SpainAdministrators, ZeroC Staff Jose Gutierrez de la ConchaOrganization: ZeroC, Inc.Project: Ice Developer ZeroC Staff

    Hi Thomas,

    You should also try to upgrade to 3.6.2 and see if the crash still occurs, if you are able to reproduce this crash with a test case that you can upload we will be happy to look at it.

  • thowethowe Member Thomas WeiningerOrganization: Dialog SemiconductorProject: Semiconductor Industry

    Hi Jose,

    Thanks for your help. I will let you know if it turns out to be a problem with Ice.

Sign In or Register to comment.