Ticket #117 (closed defect: fixed)

Opened 7 years ago

Last modified 7 years ago

r.digit: make guarantee_xmon fail nicely on WinGrass

Reported by: 4everskiff Owned by: grass-dev@…
Priority: minor Milestone: 6.4.0
Component: Tcl/Tk Version: 6.3.0
Keywords: Cc: marco.pasetti@…, hamish_b@…
Platform: CPU:

Description

Tested on WinGRASS-6.3.0RC6

There's an error in the following menu command:

Raster -> Develop map -> Digitize raster

while r.digit works fine if launched from command line (both pure command line and Run GUI command option)

error log reported in attached file

Attachments

r.digit.menu.error.log Download (227 bytes) - added by 4everskiff 7 years ago.

Change History

Changed 7 years ago by 4everskiff

  Changed 7 years ago by marisn

There are some small bugfixes pending in Michael's patch list. After commiting, they have to be backported to 6.3.0. Still with trunk there's an issue, that guarantee_xmon doesn't work anymore.

  Changed 7 years ago by hamish

is xterm installed?

Hamish

  Changed 7 years ago by hamish

If you have no xterm, you might try putting something like this in ~/.grass.bashrc (if you have rxvt...)

export GRASS_XTERM=rxvt

Hamish

  Changed 7 years ago by hamish

I changed grass-xterm-wrapper to automatically look for rxvt if xterm is not there (r30863)*, but I have zero idea at all how grass-xterm-wrapper should be handled for native MS Windows installs (but guarantee-xmon is useless there anyway, as there is no xmons, so don't bother?).

[*] add others as needed (eterm?). I added only rxvt because that's all I use; xterm is no longer installed by default on Debian.

note r.digit is just a simple front end to r.in.poly, which uses an ascii format very similar to v.in.ascii's format=standard. Thus creating a new wxPython raster digitizer to replace the old r.digit should not be /that/ much work. IMO using r.in.poly is a slightly better approach than v.digit+v.to.rast, although the latter happening for the backend wouldn't be so bad if it could be automated.

Hamish

follow-up: ↓ 6   Changed 7 years ago by hamish

Tested on WinGRASS-6.3.0RC6

...

while r.digit works fine if launched from command line (both pure command line and Run GUI command option)

r.digit works fine if launched from the WinGRASS command line?! This isn't Cygwin, right?

H

in reply to: ↑ 5   Changed 7 years ago by 4everskiff

Replying to hamish:

r.digit works fine if launched from the WinGRASS command line?! This isn't Cygwin, right?

Yes, this is WinGRASS (Native Windows Binary) and r.digit works fine if started from command line (output window, both Run and RunGUI options). Current WinGRASS release contains rxvt as standard.

Marco Pasetti

follow-up: ↓ 8   Changed 7 years ago by hamish

Hamish:

r.digit works fine if launched from the WinGRASS command line?!

Marco:

Yes, this is WinGRASS (Native Windows Binary) and r.digit works fine if started from command line

You can really digitize then view a map created with it? As far as I knew r.digit needed an interactive xmon window, which is only available if using X11. It should fail with a "no monitor found" error *after* you give it a map name.

Perhaps something changed, but this surprises me.

I have backported grass-xterm-wrapper to the 6.3.0 branch, but I hope others can add more xterm compatible terms to the list as needed.

see also previous discussion:

 http://thread.gmane.org/gmane.comp.gis.grass.devel/14702  http://thread.gmane.org/gmane.comp.gis.grass.devel/24109

re r20925, I assume that the various distro's x-terminal-emulator wrappers have gotten their act together re gnome-terminal since last time we tried. It works for me on debian (points to /usr/bin/gnome-terminal.wrapper which translates command line options); could Ubuntu users please re-test to see if r.digit now works from the gis.m menu? (that's where the earlier problems were reported)

I don't like changing this so late in the RC cycle, but hopefully it helps more than it harms.

Hamish

in reply to: ↑ 7   Changed 7 years ago by 4everskiff

Replying to hamish:

You can really digitize then view a map created with it?

Hi Hamish. Sorry, you're right! I was going to open another ticket, while I realized that it was related to the same problem of that one. In fact, for both r.digit and v.digit, the command GUI opens, but the tool panel don't; that means that it's impossible to actually digitize both rasters and vectors.

What should we do? leave this ticket opened, or close it and add a new ticket reporting that r.digit and v.digit don't work?

Marco

  Changed 7 years ago by martinl

  • component changed from default to Tcl

  Changed 7 years ago by hamish

  • priority changed from major to minor
  • summary changed from r.digit fails if launched from menu to r.digit: make guarantee_xmon fail nicely on WinGrass

AFAIK the Tcl version of v.digit works fine on native WinGrass, it's only menu items which call guarantee_xmon that won't work. Those are:

r.digit
r.le.setup
d.path.sh
i.ortho.photo
d.nviz

I have just modified guarantee_xmon in svn (r30966) to fail in a nicer way if there are no xmons*. It should really return with an error code, and menu items that call it should act like "guarantee_xmon && d.module" (I've no idea how to do that in tcl)

[*] the error message is perhaps misleading if the user has 8 xmons already running, so no free ones. Feel free to improve it.

nicer would be if those menu items were greyed out for WinGrass. again I've little clue how to do that in Tcl, but this is the shell code version that could be run at gui startup time before building the menus:

if [ `d.mon -L | grep -c '^x[0-9]'` -lt 1 ] ; then
  HAVE_XMON=0
else
  HAVE_XMON=1
fi

Hamish

  Changed 7 years ago by neteler

  • milestone changed from 6.3.0 to 6.4.0

follow-up: ↓ 13   Changed 7 years ago by cmbarton

  • cc hamish_b@… added
  • status changed from new to closed
  • resolution set to fixed

I just committed a fix to this, but can't test it on my Mac. At least it doesn't do any harm on a Mac.

Michael

in reply to: ↑ 12 ; follow-up: ↓ 14   Changed 7 years ago by marcopx

  • version changed from 6.3.0 RCs to 6.3.0

Replying to cmbarton:

I just committed a fix to this, but can't test it on my Mac. At least it doesn't do any harm on a Mac. Michael

Hi Michael,

I'll test it as soon as possible. Is it on SVN GRASS trunk? BTW, the problem is that r.digit doesn't work on windows. Should we really leave the ticket closed? we probably should open a new ticket, such as:

WinGRASS: r.digit doesn't work

Marco

PS: I created a new OSGEOID, the previous 4everskiff was not actually appropriate :-) Starting from now I will always use the marcopx ID, as in IRC

in reply to: ↑ 13   Changed 7 years ago by martinl

Replying to marcopx:

I'll test it as soon as possible. Is it on SVN GRASS trunk?

it was committed to 'develbranch_6', see

r31350

'trunk' is dedicated for grass7 demolition, for main development (leading to 6.4.0) is used 'develbranch_6'

I cannot judge if this fix should be also committed to 'trunk'...

Martin

Note: See TracTickets for help on using tickets.