gnat-gps fails to launch built binaries

Bug #1818406 reported by dhenry
This bug affects 1 person
Affects Status Importance Assigned to Milestone
gnat-gps (Ubuntu)

Bug Description

In Ubuntu 18.10 (and also 19.04 daily of 2019-03-03), the GNAT Programming Studio IDE (gnat-gps) fails to launch binaries built by a project with the "Build & run" button in the menu bar.

The Messages view only outputs:

Uncaught exception in workflows:
TypeError: method-wrapper object is not an iterator

In GPS log file (~/.gps/log.txt), I can see:

[ACTIONS] Entering GPS.Kernel.Actions.Execute_Action:gps-kernel-actions.adb:466 Execute action Build & Run Number 1 1 times synchronous=FALSE (13:12:12.756)
   [WORKFLOW] Unexpected exception in workflow: method-wrapper object is not an iterator <traceback object at 0x7f6b9647a518> (13:12:12.764)
   [TESTSUITE.EXCEPTIONS] Uncaught exception in workflows:
   _TESTSUITE.EXCEPTIONS_ TypeError: method-wrapper object is not an iterator
   _TESTSUITE.EXCEPTIONS_ (13:12:12.765)
[ACTIONS] Leaving GPS.Kernel.Actions.Execute_Action:gps-kernel-actions.adb:466 (13:12:12.766)

I get a similar error for "Build & Debug" button action.

Launching from menu "Build -> Run -> <PROGRAM NAME>" works.
GPS binary downloaded from AdaCore also works fine.
gnat-gps in Ubuntu 18.04 works.

tags: added: cosmic disco
Revision history for this message
dhenry (tfc-duke) wrote :

Ok, I found what's the problem.

In the file /usr/share/gps/support/ui/workflows/, line 248 (gnat-gps 17.0.2017-1ubuntu1 from cosmic):

    el = next (

shall be:

    el = next (gen)

And then it works.

This line has been modified by the python_2_to_3.diff deb patch during packaging. This is where the bug were introduced.
Note that the original line (before patch) was:

    el =

and seems to work fine too for me.

I'm not a python expert, so I don't know why this line had to be patched, and which version shall be used between next(gen) and

Revision history for this message
dhenry (tfc-duke) wrote :

Attached is an updated version of the python_2_to_3.diff (from gnat-gps-17.0.2017 deb) that should fix this issue.

I did not test rebuilding the package with this patch (I encounter some dependencies issues hard to install without breaking things in my current environment), but since the fix is trivial (one line to change, line 1977), I modified directly the patch file by hand.

tags: added: patch
Revision history for this message
Ubuntu Foundations Team Bug Bot (crichton) wrote :

The attachment "Updated python_2_to_3.diff patch from deb" seems to be a patch. If it isn't, please remove the "patch" flag from the attachment, remove the "patch" tag, and if you are a member of the ~ubuntu-reviewers, unsubscribe the team.

[This is an automated message performed by a Launchpad user owned by ~brian-murray, for any issues please contact him.]

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

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