Opened 6 years ago

Closed 6 years ago

Last modified 6 years ago

#2054 closed defect (fixed)

d.barscale module gui doesn't start from the command line

Reported by: hamish Owned by: grass-dev@…
Priority: critical Milestone: 6.4.4
Component: wxGUI Version: svn-develbranch6
Keywords: d.barscale Cc:
CPU: x86-64 Platform: Linux

Description

Hi,

in relbr64 and devbr6 d.barscale doesn't launch from the command line, with or without --ui. tested on debian/squeeze and ubuntu 12.04.

GRASS64> d.barscale
D3/5: G_recreate_command()
D1/5: grass.script.core.start_command(): g.gisenv -n
D1/5: grass.script.core.start_command(): g.gisenv -n
Traceback (most recent call last):
  File "/usr/lib/grass64/etc/wxpython/gui_core/forms.py", line 2023, in <module>
    app = GrassGUIApp(task)
  File "/usr/lib/grass64/etc/wxpython/gui_core/forms.py", line 1996, in __init__
    wx.App.__init__(self, False)
  File "/usr/lib/python2.7/dist-packages/wx-2.8-gtk2-unicode/wx/_core.py", line 7981, in __init__
    self._BootstrapApp()
  File "/usr/lib/python2.7/dist-packages/wx-2.8-gtk2-unicode/wx/_core.py", line 7555, in _BootstrapApp
    return _core_.PyApp__BootstrapApp(*args, **kwargs)
  File "/usr/lib/grass64/etc/wxpython/gui_core/forms.py", line 2004, in OnInit
    self.mf = TaskFrame(parent = None, ID = wx.ID_ANY, task_description = self.grass_task)
  File "/usr/lib/grass64/etc/wxpython/gui_core/forms.py", line 417, in __init__
    frame = self)
  File "/usr/lib/grass64/etc/wxpython/gui_core/forms.py", line 1385, in __init__
    win = self.FindWindowById(p['wxId'][0])
  File "/usr/lib/python2.7/dist-packages/wx-2.8-gtk2-unicode/wx/_core.py", line 9458, in FindWindowById
    return _core_.Window_FindWindowById(*args, **kwargs)
TypeError: in method 'Window_FindWindowById', expected argument 2 of type 'long'

running "g.gui tcltk -nu" lets the tcl/tk gui start. (gui icon is included in the tcl/tk module gui, a nice touch!)

?

thanks, Hamish

Change History (4)

comment:1 Changed 6 years ago by neteler

It should (in theory) behave like d.text (display/d.text.new/) which also comes without required parameters and does not crash.

comment:2 Changed 6 years ago by annakrat

It should be fixed in r57401, applied also to other branches (although not needed in 7).

comment:3 Changed 6 years ago by hamish

Priority: majorcritical
Resolution: fixed
Status: newclosed

tested in relbr64 and devbr6, all seems well now, thanks.

d.barscale works from the wxGUI, but if you press the [Set options] button there to get something custom you get the breakage. I suggest packagers apply Anna's patch to the 6.4.3 packages as part of their build process.

'd.erase --ui' was the only other display module I found with the trouble. What was the connection with the color picker? Can we expect any others?

thanks, Hamish

comment:4 in reply to:  3 Changed 6 years ago by annakrat

Replying to hamish:

'd.erase --ui' was the only other display module I found with the trouble. What was the connection with the color picker? Can we expect any others?

It has nothing to do with display commands. There was some trick to set focus on the first option which needed widget id which happened to be None for some reason. Forms are full of these small tricks and it's almost impossible to test it completely because each module is a special combination.

Note: See TracTickets for help on using tickets.