gnat-gps fails to launch built binaries
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
gnat-gps (Ubuntu) |
New
|
Undecided
|
Unassigned |
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.
[WORKFLOW] Unexpected exception in workflow: method-wrapper object is not an iterator <traceback object at 0x7f6b9647a518> (13:12:12.764)
[TESTSUITE.
_TESTSUITE.
_TESTSUITE.
[ACTIONS] Leaving GPS.Kernel.
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 |
Ok, I found what's the problem.
In the file /usr/share/ gps/support/ ui/workflows/ __init_ _.py, line 248 (gnat-gps 17.0.2017-1ubuntu1 from cosmic):
el = next (gen.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 = gen.next()
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 gen.next().