Opened 17 years ago

Closed 17 years ago

Last modified 17 years ago

#117 closed defect (fixed)

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@…
CPU: Unspecified Platform: Unspecified

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 (1)

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

Download all attachments as: .zip

Change History (15)

by 4everskiff, 17 years ago

Attachment: r.digit.menu.error.log added

comment:1 by marisn, 17 years ago

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.

comment:2 by hamish, 17 years ago

is xterm installed?

Hamish

comment:3 by hamish, 17 years ago

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

export GRASS_XTERM=rxvt

Hamish

comment:4 by hamish, 17 years ago

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

comment:5 by hamish, 17 years ago

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 comment:6 by 4everskiff, 17 years ago

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

comment:7 by hamish, 17 years ago

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 comment:8 by 4everskiff, 17 years ago

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

comment:9 by martinl, 17 years ago

Component: defaultTcl

comment:10 by hamish, 17 years ago

Priority: majorminor
Summary: r.digit fails if launched from menur.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

comment:11 by neteler, 17 years ago

Milestone: 6.3.06.4.0

comment:12 by cmbarton, 17 years ago

Cc: hamish_b@… added
Resolution: fixed
Status: newclosed

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 ; comment:13 by marcopx, 17 years ago

Version: 6.3.0 RCs6.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 comment:14 by martinl, 17 years ago

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.