SWIG bug in version 3.0.5 causes 'Wrong number or type of arguments' error

Issue #64 resolved
Sam Preston created an issue

I've tracked down a SWIG bug introduced sometime after 3.0.2 (ie version 3.0.2 works, the latest (3.0.5) does not) which causes PyCA runtime errors such as:

NotImplementedError: Wrong number or type of arguments for overloaded function 'Image3D_bla'.
  Possible C/C++ prototypes are:
    PyCA::Image3D::bla(PyCA::MemoryType,StreamT)
    PyCA::Image3D::bla(PyCA::MemoryType)

I've created a minimal example to reproduce the bug and added it to the following SWIG issue, for the moment just use SWIG v <= 3.0.2.

https://github.com/swig/swig/issues/365

Comments (6)

  1. Sam Preston reporter

    commit f0738a9 fixes some remaining problems for SWIG 3.0.7, but problems with 3.0.5 are internal to SWIG and will not be fixed.

  2. Sam Preston reporter

    SWIG versions <= 3.0.2 and >= 3.0.7 work, bugs in 3.0.5 and possibly other versions between 3.0.2 and 3.0.7 mean these are unsupported.

  3. Markus Foote

    This issue still exists with SWIG 3.0.7 for methods of MultiscaleResamplerGaussGPU. My guess is that either it is fixed in > 3.0.7, or a fix similar to f0738a9 will need to be implemented for this class. I'm planning to test 3.0.10 after I update to Leap 42.2/3 so that getting 3.0.10 is easy. Meanwhile, rolling back to SWIG 2.0.12 still works fine.

  4. Markus Foote

    My initial testing with my own build of SWIG 3.0.10 suggests that further bug fixes within SWIG have resolved whatever was wrong with the MultiscaleResamplerGaussGPU. I'm updating the wiki to reflect 3.0.7 doesn't (fully) work, and this issue can remain resolved.

  5. Log in to comment