[GRASS-dev] [GRASS GIS] #3505: Opening a workspace file

#3505: Opening a workspace file
-------------------------+-------------------------
Reporter: clerici | Owner: grass-dev@…
     Type: defect | Status: new
Priority: normal | Milestone:
Component: Default | Version: 7.4.0
Keywords: | CPU: Unspecified
Platform: Unspecified |
-------------------------+-------------------------
When a saved setting is loaded (Files > Workspace > Open) in my GRASS7.4.0
for Windows, the maps are correctly listed in the Layer Manager and
displayed in the Map Display, but in the Layer Manager no action (delete,
move, etc) is possible on the listed maps.

Platform Windows 8 and Windows 10.
It works on WinGrass 7.2.2

--
Ticket URL: <https://trac.osgeo.org/grass/ticket/3505&gt;
GRASS GIS <https://grass.osgeo.org>

#3505: Opening a workspace file
--------------------------+-------------------------
  Reporter: clerici | Owner: grass-dev@…
      Type: defect | Status: new
  Priority: normal | Milestone: 7.4.1
Component: wxGUI | Version: 7.4.0
Resolution: | Keywords: wingrass
       CPU: Unspecified | Platform: Unspecified
--------------------------+-------------------------
Changes (by martinl):

* keywords: => wingrass
* component: Default => wxGUI
* milestone: => 7.4.1

Comment:

I cannot reproduce this bug on Linux. It's probably Windows related. Can
anyone else on Windows reproduce it?

--
Ticket URL: <https://trac.osgeo.org/grass/ticket/3505#comment:1&gt;
GRASS GIS <https://grass.osgeo.org>

#3505: Opening a workspace file
--------------------------+-------------------------
  Reporter: clerici | Owner: grass-dev@…
      Type: defect | Status: new
  Priority: normal | Milestone: 7.4.1
Component: wxGUI | Version: 7.4.0
Resolution: | Keywords: wingrass
       CPU: Unspecified | Platform: Unspecified
--------------------------+-------------------------

Comment (by hellik):

Replying to [comment:1 martinl]:
> I cannot reproduce this bug on Linux. It's probably Windows related. Can
anyone else on Windows reproduce it?

tested by

{{{
System Info
GRASS version: 7.4.0
GRASS SVN revision: r72154
Build date: 2018-01-27
Build platform: x86_64-w64-mingw32
GDAL: 2.2.3
PROJ.4: 4.9.3
GEOS: 3.5.0
SQLite: 3.17.0
Python: 2.7.5
wxPython: 2.8.12.1
Platform: Windows-8-6.2.9200 (OSGeo4W)
}}}

and confirmed. moving/deleting layers isn't possible.

--
Ticket URL: <https://trac.osgeo.org/grass/ticket/3505#comment:2&gt;
GRASS GIS <https://grass.osgeo.org>

#3505: Opening a workspace file
--------------------------+-------------------------
  Reporter: clerici | Owner: grass-dev@…
      Type: defect | Status: new
  Priority: normal | Milestone: 7.4.1
Component: wxGUI | Version: 7.4.0
Resolution: | Keywords: wingrass
       CPU: Unspecified | Platform: Unspecified
--------------------------+-------------------------

Comment (by hellik):

Replying to [comment:1 martinl]:
> I cannot reproduce this bug on Linux. It's probably Windows related. Can
anyone else on Windows reproduce it?

tested also with

{{{
System Info
GRASS version: 7.5.svn
GRASS SVN revision: r72285
Build date: 2018-01-27
Build platform: x86_64-w64-mingw32
GDAL: 2.2.3
PROJ.4: 4.9.3
GEOS: 3.5.0
SQLite: 3.17.0
Python: 2.7.5
wxPython: 2.8.12.1
Platform: Windows-8-6.2.9200 (OSGeo4W)
}}}

and confirmed. moving/deleting layers isn't possible.

--
Ticket URL: <https://trac.osgeo.org/grass/ticket/3505#comment:3&gt;
GRASS GIS <https://grass.osgeo.org>

#3505: Opening a workspace file
--------------------------+-------------------------
  Reporter: clerici | Owner: grass-dev@…
      Type: defect | Status: new
  Priority: major | Milestone: 7.4.1
Component: wxGUI | Version: 7.4.0
Resolution: | Keywords: wingrass
       CPU: Unspecified | Platform: MSWindows 8
--------------------------+-------------------------
Changes (by hellik):

* priority: normal => major
* platform: Unspecified => MSWindows 8

--
Ticket URL: <https://trac.osgeo.org/grass/ticket/3505#comment:4&gt;
GRASS GIS <https://grass.osgeo.org>

#3505: Opening a workspace file
--------------------------+-------------------------
  Reporter: clerici | Owner: grass-dev@…
      Type: defect | Status: new
  Priority: major | Milestone: 7.4.1
Component: wxGUI | Version: 7.4.0
Resolution: | Keywords: wingrass
       CPU: Unspecified | Platform: MSWindows 8
--------------------------+-------------------------

Comment (by martinl):

Replying to [comment:2 hellik]:

> and confirmed. moving/deleting layers isn't possible.

It's not possible to move/delete layers only from open workspace or also
after adding few layers into new workspace?

No traceback in Console?

Reporter claims that this bug is not included in GRASS 7.2.2. It's
strange, there is the same wxPython version, and apparently it's only
Windows related.

--
Ticket URL: <https://trac.osgeo.org/grass/ticket/3505#comment:5&gt;
GRASS GIS <https://grass.osgeo.org>

#3505: Opening a workspace file
--------------------------+-------------------------
  Reporter: clerici | Owner: grass-dev@…
      Type: defect | Status: new
  Priority: major | Milestone: 7.4.1
Component: wxGUI | Version: 7.4.0
Resolution: | Keywords: wingrass
       CPU: Unspecified | Platform: MSWindows 8
--------------------------+-------------------------

Comment (by hellik):

Replying to [comment:5 martinl]:
> Replying to [comment:2 hellik]:
>
> > and confirmed. moving/deleting layers isn't possible.
>
> It's not possible to move/delete layers only from open workspace or also
after adding few layers into new workspace?
>
> No traceback in Console?
>
> Reporter claims that this bug is not included in GRASS 7.2.2. It's
strange, there is the same wxPython version, and apparently it's only
Windows related.

workflow:

{{{
d.rast map=elevation@PERMANENT
d.vect map=streams@PERMANENT color=blue fill_color=blue width=1
d.vect map=firestations@PERMANENT width=1 icon=extra/target size=15
}}}

{{{
save workspace as g74.gxw
}}}

{{{
<?xml version="1.0" encoding="cp1252"?>
<!DOCTYPE gxw SYSTEM "grass-gxw.dtd">
<gxw>
     <layer_manager dim="1,1,525,600">
     </layer_manager>
     <display name="Display 1" render="1" mode="0" showCompExtent="0"
alignExtent="1" constrainRes="0" showStatusbar="1" showToolbars="1"
dim="526,1,825,600"
extent="630000.000000,215000.000000,645000.000000,228500.000000,0.000000,1.000000"
tbres="1.000000" viewMode="2d" >
         <layer type="vector" name="firestations@PERMANENT" checked="1"
opacity="1.000000">
             <selected />
             <task name="d.vect">
                 <parameter name="size">
                     <value>15</value>
                 </parameter>
                 <parameter name="map">
                     <value>firestations@PERMANENT</value>
                 </parameter>
                 <parameter name="icon">
                     <value>extra/target</value>
                 </parameter>
                 <parameter name="width">
                     <value>1</value>
                 </parameter>
             </task>
         </layer>
         <layer type="vector" name="streams@PERMANENT" checked="1"
opacity="1.000000">
             <task name="d.vect">
                 <parameter name="color">
                     <value>blue</value>
                 </parameter>
                 <parameter name="map">
                     <value>streams@PERMANENT</value>
                 </parameter>
                 <parameter name="fill_color">
                     <value>blue</value>
                 </parameter>
                 <parameter name="width">
                     <value>1</value>
                 </parameter>
             </task>
         </layer>
         <layer type="raster" name="elevation@PERMANENT" checked="1"
opacity="1.000000">
             <task name="d.rast">
                 <parameter name="map">
                     <value>elevation@PERMANENT</value>
                 </parameter>
             </task>
         </layer>
     </display>
</gxw>
}}}

closing winGRASS7.4.0 session, then re-opening winGRASS7.4.0

opening workspace g74.gxw

=> not possible to move/delete layers from open workspace

then add a new layer

{{{
d.vect map=bridges@PERMANENT width=1 icon=extra/bridge size=15
}}}

=> not possible to move/delete layers from open workspace **and** not
possible to move/delete new added layer.

no traceback in console

--
Ticket URL: <https://trac.osgeo.org/grass/ticket/3505#comment:6&gt;
GRASS GIS <https://grass.osgeo.org>

#3505: Opening a workspace file
--------------------------+-------------------------
  Reporter: clerici | Owner: grass-dev@…
      Type: defect | Status: new
  Priority: major | Milestone: 7.4.1
Component: wxGUI | Version: 7.4.0
Resolution: | Keywords: wingrass
       CPU: Unspecified | Platform: MSWindows 8
--------------------------+-------------------------

Comment (by hellik):

Replying to [comment:5 martinl]:
> No traceback in Console?

set DEBUG=3 and then opened the workspace

{{{
C:\>D1/3: G_set_program_name(): g.gisenv
D3/3: G_option_to_separator(): key = separator -> sep = '
'
D1/3: G_set_program_name(): g.gisenv
D3/3: G_option_to_separator(): key = separator -> sep = '
'
D1/3: grass.script.core.start_command(): g.tempfile -d pid=12544
D1/3: G_set_program_name(): g.tempfile
D2/3: G_file_name(): path = D:\grassdata\nc_spm_08_grass7\user1
D2/3: G_file_name(): path = D:\grassdata\nc_spm_08_grass7\user1
D2/3: G__temp_element(): .tmp/unknown (tmp=0)
D2/3: G_file_name(): path =
D:\grassdata\nc_spm_08_grass7\user1\.tmp/unknown\12544.0
D2/3: G_tempfile_pid():
D:\grassdata\nc_spm_08_grass7\user1\.tmp/unknown\12544.0
D1/3: grass.script.core.start_command(): g.tempfile -d pid=12544
D1/3: G_set_program_name(): g.tempfile
D2/3: G_file_name(): path = D:\grassdata\nc_spm_08_grass7\user1
D2/3: G_file_name(): path = D:\grassdata\nc_spm_08_grass7\user1
D2/3: G__temp_element(): .tmp/unknown (tmp=0)
D2/3: G_file_name(): path =
D:\grassdata\nc_spm_08_grass7\user1\.tmp/unknown\12544.0
D2/3: G_tempfile_pid():
D:\grassdata\nc_spm_08_grass7\user1\.tmp/unknown\12544.0
D1/3: grass.script.core.start_command(): g.gisenv -n
D1/3: G_set_program_name(): g.gisenv
D3/3: G_option_to_separator(): key = separator -> sep = '
'
D1/3: grass.script.core.start_command(): g.proj -p
D1/3: grass.script.core.start_command(): g.region -ugpc
D1/3: grass.script.core.start_command(): g.gisenv -n
D1/3: G_set_program_name(): g.gisenv
D3/3: G_option_to_separator(): key = separator -> sep = '
'
D1/3: grass.script.core.start_command(): g.findfile -n mapset=user1
file=MASK element=cell
D1/3: G_set_program_name(): g.findfile
D2/3: G_file_name(): path = D:\grassdata\nc_spm_08_grass7\user1
D2/3: G_file_name(): path = D:\grassdata\nc_spm_08_grass7\user1\cell\MASK
D1/3: grass.script.core.start_command(): g.gisenv -n
D1/3: G_set_program_name(): g.gisenv
D3/3: G_option_to_separator(): key = separator -> sep = '
'
D1/3: grass.script.core.start_command(): g.findfile -n mapset=user1
file=MASK element=cell
D1/3: G_set_program_name(): g.findfile
D2/3: G_file_name(): path = D:\grassdata\nc_spm_08_grass7\user1
D2/3: G_file_name(): path = D:\grassdata\nc_spm_08_grass7\user1\cell\MASK
D1/3: grass.script.core.start_command(): g.gisenv -n
D1/3: G_set_program_name(): g.gisenv
D3/3: G_option_to_separator(): key = separator -> sep = '
'
D1/3: grass.script.core.start_command(): g.gisenv -n
D1/3: G_set_program_name(): g.gisenv
D3/3: G_option_to_separator(): key = separator -> sep = '
'
D1/3: grass.script.core.start_command(): g.findfile -n mapset=user1
file=MASK element=cell
D1/3: G_set_program_name(): g.findfile
D2/3: G_file_name(): path = D:\grassdata\nc_spm_08_grass7\user1
D2/3: G_file_name(): path = D:\grassdata\nc_spm_08_grass7\user1\cell\MASK
D1/3: grass.script.core.start_command(): g.gisenv -n
D1/3: G_set_program_name(): g.gisenv
D3/3: G_option_to_separator(): key = separator -> sep = '
'
D1/3: grass.script.core.start_command(): g.findfile -n mapset=user1
file=MASK element=cell
D1/3: G_set_program_name(): g.findfile
D2/3: G_file_name(): path = D:\grassdata\nc_spm_08_grass7\user1
D2/3: G_file_name(): path = D:\grassdata\nc_spm_08_grass7\user1\cell\MASK
D1/3: grass.script.core.start_command(): g.region -ugpc s=215000.0
e=645000.0 w=630000.0 n=228500.0
D1/3: grass.script.core.start_command(): g.gisenv -n
D1/3: G_set_program_name(): g.gisenv
D3/3: G_option_to_separator(): key = separator -> sep = '
'
D1/3: grass.script.core.start_command(): g.findfile -n mapset=user1
file=MASK element=cell
D1/3: G_set_program_name(): g.findfile
D2/3: G_file_name(): path = D:\grassdata\nc_spm_08_grass7\user1
D2/3: G_file_name(): path = D:\grassdata\nc_spm_08_grass7\user1\cell\MASK
D1/3: grass.script.core.start_command(): g.gisenv -n
D1/3: G_set_program_name(): g.gisenv
D3/3: G_option_to_separator(): key = separator -> sep = '
'
D1/3: grass.script.core.start_command(): g.findfile -n mapset=user1
file=MASK element=cell
D1/3: G_set_program_name(): g.findfile
D2/3: G_file_name(): path = D:\grassdata\nc_spm_08_grass7\user1
D2/3: G_file_name(): path = D:\grassdata\nc_spm_08_grass7\user1\cell\MASK
D1/3: grass.script.core.start_command(): g.tempfile pid=12544
D1/3: G_set_program_name(): g.tempfile
D2/3: G_file_name(): path = D:\grassdata\nc_spm_08_grass7\user1
D2/3: G_file_name(): path = D:\grassdata\nc_spm_08_grass7\user1
D2/3: G__temp_element(): .tmp/unknown (tmp=0)
D2/3: G_file_name(): path =
D:\grassdata\nc_spm_08_grass7\user1\.tmp/unknown\12544.0
D2/3: G_tempfile_pid():
D:\grassdata\nc_spm_08_grass7\user1\.tmp/unknown\12544.0
D1/3: grass.script.core.start_command(): g.tempfile pid=12544
D1/3: G_set_program_name(): g.tempfile
D2/3: G_file_name(): path = D:\grassdata\nc_spm_08_grass7\user1
D2/3: G_file_name(): path = D:\grassdata\nc_spm_08_grass7\user1
D2/3: G__temp_element(): .tmp/unknown (tmp=0)
D2/3: G_file_name(): path =
D:\grassdata\nc_spm_08_grass7\user1\.tmp/unknown\12544.0
D2/3: G_file_name(): path =
D:\grassdata\nc_spm_08_grass7\user1\.tmp/unknown\12544.1
D2/3: G_tempfile_pid():
D:\grassdata\nc_spm_08_grass7\user1\.tmp/unknown\12544.1
D1/3: grass.script.core.start_command(): g.gisenv -n
D1/3: grass.script.core.start_command(): d.rast --q
map=elevation@PERMANENT
D1/3: G_set_program_name(): g.gisenv
D1/3: grass.script.core.start_command(): d.vect --q color=blue
map=streams@PERMANENT fill_color=blue width=1
D1/3: grass.script.core.start_command(): d.vect --q
map=firestations@PERMANENT icon=extra/target width=1 size=1D5
3/3: G_option_to_separator(): key = separator -> sep = '
'
D1/3: grass.script.core.start_command(): g.findfile -n mapset=user1
file=MASK element=cell
D1/3: G_set_program_name(): g.findfile
D2/3: G_file_name(): path = D:\grassdata\nc_spm_08_grass7\user1
D2/3: G_file_name(): path = D:\grassdata\nc_spm_08_grass7\user1\cell\MASK
D1/3: grass.script.core.start_command(): g.gisenv -n
D1/3: G_set_program_name(): g.gisenv
D3/3: G_option_to_separator(): key = separator -> sep = '
'
D1/3: grass.script.core.start_command(): g.findfile -n mapset=user1
file=MASK element=cell
D1/3: G_set_program_name(): g.findfile
D2/3: G_file_name(): path = D:\grassdata\nc_spm_08_grass7\user1
D2/3: G_file_name(): path = D:\grassdata\nc_spm_08_grass7\user1\cell\MASK
D1/3: grass.script.core.start_command(): g.pnmcomp --o opacity=1.0,1.0,1.0
width=807
mask=c:\users\myuser\appdata\local\temp\grass7-myuser-11436\tmpya4dnk.pgm,c:\users\myuser\appdata\local\temp\grass7-myuser-11436\tmp8ucbs7.pgm,c:\users\myuser\appdata\local\temp\grass7-myuser-11436\tmphud9ld.pgm
height=501 bgcolor=255:255:255
input=c:\users\myuser\appdata\local\temp\grass7-myuser-11436\tmpya4dnk.ppm,c:\users\myuser\appdata\local\temp\grass7-myuser-11436\tmp8ucbs7.ppm,c:\users\myuser\appdata\local\temp\grass7-myuser-11436\tmphud9ld.ppm
output=D:\grassdata\nc_spm_08_grass7\user1\.tmp/unknown\12544.0.ppm
D1/3: grass.script.core.start_command(): g.pnmcomp --o opacity=1.0,1.0,1.0
width=807
mask=c:\users\myuser\appdata\local\temp\grass7-myuser-11436\tmpya4dnk.pgm,c:\users\myuser\appdata\local\temp\grass7-myuser-11436\tmp8ucbs7.pgm,c:\users\myuser\appdata\local\temp\grass7-myuser-11436\tmphud9ld.pgm
height=501 bgcolor=255:255:255
input=c:\users\myuser\appdata\local\temp\grass7-myuser-11436\tmpya4dnk.ppm,c:\users\myuser\appdata\local\temp\grass7-myuser-11436\tmp8ucbs7.ppm,c:\users\myuser\appdata\local\temp\grass7-myuser-11436\tmphud9ld.ppm
output=D:\grassdata\nc_spm_08_grass7\user1\.tmp/unknown\12544.0.ppm
D1/3: grass.script.core.start_command(): g.pnmcomp --o opacity=1.0,1.0,1.0
width=807
mask=c:\users\myuser\appdata\local\temp\grass7-myuser-11436\tmpya4dnk.pgm,c:\users\myuser\appdata\local\temp\grass7-myuser-11436\tmp8ucbs7.pgm,c:\users\myuser\appdata\local\temp\grass7-myuser-11436\tmphud9ld.pgm
height=501 bgcolor=255:255:255
input=c:\users\myuser\appdata\local\temp\grass7-myuser-11436\tmpya4dnk.ppm,c:\users\myuser\appdata\local\temp\grass7-myuser-11436\tmp8ucbs7.ppm,c:\users\myuser\appdata\local\temp\grass7-myuser-11436\tmphud9ld.ppm
output=D:\grassdata\nc_spm_08_grass7\user1\.tmp/unknown\12544.0.ppm
}}}

no other debug or traceback

--
Ticket URL: <https://trac.osgeo.org/grass/ticket/3505#comment:7&gt;
GRASS GIS <https://grass.osgeo.org>

#3505: Opening a workspace file
--------------------------+-------------------------
  Reporter: clerici | Owner: grass-dev@…
      Type: defect | Status: new
  Priority: major | Milestone: 7.4.1
Component: wxGUI | Version: 7.4.0
Resolution: | Keywords: wingrass
       CPU: Unspecified | Platform: MSWindows 8
--------------------------+-------------------------

Comment (by annakrat):

I think that might have something to do with the changes for compatibility
with wxPython 4. I need more time to investigate this.

--
Ticket URL: <https://trac.osgeo.org/grass/ticket/3505#comment:8&gt;
GRASS GIS <https://grass.osgeo.org>

#3505: Opening a workspace file
--------------------------+-------------------------
  Reporter: clerici | Owner: grass-dev@…
      Type: defect | Status: new
  Priority: major | Milestone: 7.4.1
Component: wxGUI | Version: 7.4.0
Resolution: | Keywords: wingrass
       CPU: Unspecified | Platform: MSWindows 8
--------------------------+-------------------------

Comment (by annakrat):

In [changeset:"72455" 72455]:
{{{
#!CommitTicketReference repository="" revision="72455"
wxGUI: correctly delete layertree, see #3505
}}}

--
Ticket URL: <https://trac.osgeo.org/grass/ticket/3505#comment:9&gt;
GRASS GIS <https://grass.osgeo.org>

#3505: Opening a workspace file
--------------------------+-------------------------
  Reporter: clerici | Owner: grass-dev@…
      Type: defect | Status: new
  Priority: major | Milestone: 7.4.1
Component: wxGUI | Version: 7.4.0
Resolution: | Keywords: wingrass
       CPU: Unspecified | Platform: MSWindows 8
--------------------------+-------------------------

Comment (by annakrat):

Could anyone confirm it's working now?

--
Ticket URL: <https://trac.osgeo.org/grass/ticket/3505#comment:10&gt;
GRASS GIS <https://grass.osgeo.org>

#3505: Opening a workspace file
--------------------------+-------------------------
  Reporter: clerici | Owner: grass-dev@…
      Type: defect | Status: new
  Priority: major | Milestone: 7.4.1
Component: wxGUI | Version: 7.4.0
Resolution: | Keywords: wingrass
       CPU: Unspecified | Platform: MSWindows 8
--------------------------+-------------------------

Comment (by hellik):

Replying to [comment:10 annakrat]:
> Could anyone confirm it's working now?

tested with

{{{
System Info
GRASS version: 7.5.svn
GRASS SVN revision: r72553
Build date: 2018-03-24
Build platform: x86_64-w64-mingw32
GDAL: 2.2.3
PROJ.4: 4.9.3
GEOS: 3.5.0
SQLite: 3.17.0
Python: 2.7.5
wxPython: 2.8.12.1
Platform: Windows-8-6.2.9200 (OSGeo4W)
}}}

confirmed, moving and deleting layers are working now.

--
Ticket URL: <https://trac.osgeo.org/grass/ticket/3505#comment:11&gt;
GRASS GIS <https://grass.osgeo.org>

#3505: Opening a workspace file
--------------------------+-------------------------
  Reporter: clerici | Owner: grass-dev@…
      Type: defect | Status: new
  Priority: major | Milestone: 7.4.1
Component: wxGUI | Version: 7.4.0
Resolution: | Keywords: wingrass
       CPU: Unspecified | Platform: MSWindows 8
--------------------------+-------------------------

Comment (by annakrat):

In [changeset:"72624" 72624]:
{{{
#!CommitTicketReference repository="" revision="72624"
wxGUI: correctly delete layertree, see #3505 (merge from trunk, r72455)
}}}

--
Ticket URL: <https://trac.osgeo.org/grass/ticket/3505#comment:12&gt;
GRASS GIS <https://grass.osgeo.org>

#3505: Opening a workspace file
--------------------------+-------------------------
  Reporter: clerici | Owner: grass-dev@…
      Type: defect | Status: closed
  Priority: major | Milestone: 7.4.1
Component: wxGUI | Version: 7.4.0
Resolution: fixed | Keywords: wingrass
       CPU: Unspecified | Platform: MSWindows 8
--------------------------+-------------------------
Changes (by annakrat):

* status: new => closed
* resolution: => fixed

--
Ticket URL: <https://trac.osgeo.org/grass/ticket/3505#comment:13&gt;
GRASS GIS <https://grass.osgeo.org>