SWIG 2.0.5 does not work with PyDOLFIN

Bug #996398 reported by Johan Hake
14
This bug affects 2 people
Affects Status Importance Assigned to Milestone
DOLFIN
Fix Released
Medium
Johan Hake

Bug Description

The recent release of SWIG does not work with DOLFIN. Some sort of type conversion bug is introduced. Can be reproduced by running the test suite:

  make run_quicktest

Related branches

Johan Hake (johan-hake)
Changed in dolfin:
assignee: nobody → Johan Hake (johan-hake)
importance: Undecided → Medium
status: New → Confirmed
milestone: none → 1.1.0
Revision history for this message
Johan Hake (johan-hake) wrote :

This is caused by change in SWIG. SWIG_From_unsigned_SS_int now returns a python long. I have asked the SWIG devel list if this change is intended or a regression bug.

Changed in dolfin:
status: Confirmed → In Progress
Revision history for this message
Garth Wells (garth-wells) wrote :
Revision history for this message
Johan Hake (johan-hake) wrote : Re: [Bug 996398] Re: SWIG 2.0.5 does not work with PyDOLFIN

Pointer to an actual SWIG bug also relevant for this bug:

https://sourceforge.net/tracker/?func=detail&atid=101645&aid=3525050&group_id=1645

I will try to add workarounds for both of these issues.

Johan Hake (johan-hake)
Changed in dolfin:
status: In Progress → Fix Committed
Revision history for this message
Johannes Ring (johannr) wrote :

Is it much work to fix for this in the 1.0.x branch? SWIG 2.0.5 is in Debian unstable and I would like to add the fix to the DOLFIN package.

Revision history for this message
Johan Hake (johan-hake) wrote :

On 05/10/2012 01:10 PM, Johannes Ring wrote:
> Is it much work to fix for this in the 1.0.x branch? SWIG 2.0.5 is in
> Debian unstable and I would like to add the fix to the DOLFIN package.

Urk... Probably not. Most of the changes was done in typemap files which
are all more or less mirrored in 1.0.0. I have no time looking at that
right now. SWIG has already stolen too much of my time lately.

Johan

Revision history for this message
Johannes Ring (johannr) wrote :

OK, I'll try backporting your fix.

Revision history for this message
Johan Hake (johan-hake) wrote :

The bug with shadownig typemaps in SWIG has now been fixed, and to SWIG's creadit, it now supports templated types of typedefs much better. This bug was a regression introduced while fixing this in SWIG.

The error introduced by SWIG_From(insigned int) now returning a Python long instead of a Pythin int, is now reported as a bug:

https://sourceforge.net/tracker/?func=detail&aid=3526487&group_id=1645&atid=101645

Revision history for this message
Anders Logg (logg) wrote :

On Mon, May 14, 2012 at 07:48:35AM -0000, Johan Hake wrote:
> The bug with shadownig typemaps in SWIG has now been fixed, and to
> SWIG's creadit, it now supports templated types of typedefs much better.
> This bug was a regression introduced while fixing this in SWIG.
>
> The error introduced by SWIG_From(insigned int) now returning a Python
> long instead of a Pythin int, is now reported as a bug:
>
> https://sourceforge.net/tracker/?func=detail&aid=3526487&group_id=1645&atid=101645
>
> ** Bug watch added: SourceForge.net Tracker #3526487
> http://sourceforge.net/support/tracker.php?aid=3526487

I didn't know it was possible to watch sf bugs from lp. Nice!

--
Anders

Revision history for this message
Johan Hake (johan-hake) wrote :

On 05/14/2012 11:56 AM, Anders Logg wrote:
> On Mon, May 14, 2012 at 07:48:35AM -0000, Johan Hake wrote:
>> The bug with shadownig typemaps in SWIG has now been fixed, and to
>> SWIG's creadit, it now supports templated types of typedefs much better.
>> This bug was a regression introduced while fixing this in SWIG.
>>
>> The error introduced by SWIG_From(insigned int) now returning a Python
>> long instead of a Pythin int, is now reported as a bug:
>>
>> https://sourceforge.net/tracker/?func=detail&aid=3526487&group_id=1645&atid=101645
>>
>> ** Bug watch added: SourceForge.net Tracker #3526487
>> http://sourceforge.net/support/tracker.php?aid=3526487
>
> I didn't know it was possible to watch sf bugs from lp. Nice!

Nor, did I. Did someone add these bug trackers manually or did launchpad
automagically extract the bugs from the links?

Johan

Changed in dolfin:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.