[GRASS-dev] wxGUI lock import problem

Hi,

recently I started to have problem with wxGUI in G7. When starting GRASS

Traceback (most recent call last):
  File "/home/martin/src/grass_trunk/dist.x86_64-unknown-linux-gnu/etc/gui/wxpython/gis_set.py",
line 36, in <module>
    from core import globalvar
RuntimeError: not holding the import lock

...

Traceback (most recent call last):
  File "/home/martin/src/grass_trunk/dist.x86_64-unknown-linux-gnu/etc/gui/wxpython/wxgui.py",
line 27, in <module>
    from core import globalvar
RuntimeError: not holding the import lock

After quiting the GUI I need to press Ctrl-C and then I get bunch of

  File "/home/martin/src/grass_trunk/dist.x86_64-unknown-linux-gnu/etc/python/grass/script/core.py",
line 56, in __init__
    ps = pipe_command(*args, **kwargs)
      File "/home/martin/src/grass_trunk/dist.x86_64-unknown-linux-gnu/etc/python/grass/script/core.py",
line 211, in pipe_command
startupinfo, creationflags)
  File "/usr/lib/python2.7/subprocess.py", line 679, in __init__
    return start_command(*args, **kwargs)
  File "/home/martin/src/grass_trunk/dist.x86_64-unknown-linux-gnu/etc/python/grass/script/core.py",
line 169, in start_command
    if debug_level() > 0:
  File "/home/martin/src/grass_trunk/dist.x86_64-unknown-linux-gnu/etc/python/grass/script/core.py",
line 1346, in debug_level
    errread, errwrite)
  File "/usr/lib/python2.7/subprocess.py", line 1244, in _execute_child
    _debug_level = int(gisenv().get('DEBUG', 0))
  File "/home/martin/src/grass_trunk/dist.x86_64-unknown-linux-gnu/etc/python/grass/script/core.py",
line 682, in gisenv
    data = _eintr_retry_call(os.read, errpipe_read, 1048576)
  File "/usr/lib/python2.7/subprocess.py", line 478, in _eintr_retry_call
    s = read_command("g.gisenv", flags='n')
  File "/home/martin/src/grass_trunk/dist.x86_64-unknown-linux-gnu/etc/python/grass/script/core.py",
line 234, in read_command
    return func(*args)
    ps = pipe_command(*args, **kwargs)
KeyboardInterrupt File
"/home/martin/src/grass_trunk/dist.x86_64-unknown-linux-gnu/etc/python/grass/script/core.py",
line 211, in pipe_command

    return start_command(*args, **kwargs)
  File "/home/martin/src/grass_trunk/dist.x86_64-unknown-linux-gnu/etc/python/grass/script/core.py",
line 173, in start_command
    return Popen(args, **popts)
  File "/home/martin/src/grass_trunk/dist.x86_64-unknown-linux-gnu/etc/python/grass/script/core.py",
line 56, in __init__
    startupinfo, creationflags)
  File "/usr/lib/python2.7/subprocess.py", line 679, in __init__
    errread, errwrite)
  File "/usr/lib/python2.7/subprocess.py", line 1247, in _execute_child
    os.close(errpipe_read)
OSError: [Errno 9] Bad file descriptor

I am not sure what could be the reason. Very wild guess, couldn't be
related to r53674.

Martin

--
Martin Landa <landa.martin gmail.com> * http://geo.fsv.cvut.cz/~landa

2012/11/4 Martin Landa <landa.martin@gmail.com>:

[...]

I am not sure what could be the reason. Very wild guess, couldn't be
related to r53674.

quick test: after reverting this commit, the problem will not occur.

Martin

--
Martin Landa <landa.martin gmail.com> * http://geo.fsv.cvut.cz/~landa

On Sun, Nov 4, 2012 at 10:31 PM, Martin Landa <landa.martin@gmail.com> wrote:

2012/11/4 Martin Landa <landa.martin@gmail.com>:

[...]

I am not sure what could be the reason. Very wild guess, couldn't be
related to r53674.

quick test: after reverting this commit, the problem will not occur.

Additionally, it seems to slow down the GRASS prompt.

Teverting r53674 appears to help (I wonder why).

Markus

Martin Landa wrote:

> I am not sure what could be the reason. Very wild guess, couldn't be
> related to r53674.

quick test: after reverting this commit, the problem will not occur.

Oops. There's an infinite recursion bug in that version:

  start_command
   debug_level
    gisenv
     read_command
      pipe_command
       start_command

Try r53716. Although I don't know if this is actually related to the
"import lock" issue.

--
Glynn Clements <glynn@gclements.plus.com>

Hi,

2012/11/7 Glynn Clements <glynn@gclements.plus.com>:

Oops. There's an infinite recursion bug in that version:

        start_command
         debug_level
          gisenv
           read_command
            pipe_command
             start_command

Try r53716. Although I don't know if this is actually related to the
"import lock" issue.

seems to be fixed. Thanks, Martin

--
Martin Landa <landa.martin gmail.com> * http://geo.fsv.cvut.cz/~landa