Opened 10 years ago

Closed 9 years ago

#2434 closed defect (fixed)

v.surf.bspline: WARNING: Unable to rename null file / WARNING: Unable to write quant rules:

Reported by: baharmon Owned by: grass-dev@…
Priority: major Milestone: 7.0.3
Component: Raster Version: svn-releasebranch70
Keywords: v.surf.bspline, raster, quant rules, null file, cell file Cc:
CPU: OSX/Intel Platform: MSWindows 8

Description

I got the following error with v.surf.bspline:

v.surf.bspline input=ground@lidar raster_output=lake_raleigh_dem_bspline ew_step=6 ns_step=6 method=bicubic lambda_i=0.02 memory=12000 --overwrite
Initializing output...
WARNING: Unable to rename null file 'C:\Users\Brendan\Documents\grassdata/nc_spf/lidar/.tmp/unknown/3624.1' to 'C:\Users\Brendan\Documents\grassdata/nc_spf/lidar/cell_misc/lake_raleigh_dem_bspline/null': Permission denied
WARNING: Unable to rename cell file 'C:\Users\Brendan\Documents\grassdata/nc_spf/lidar/.tmp/unknown/3624.0' to 'C:\Users\Brendan\Documents\grassdata/nc_spf/lidar/fcell/lake_raleigh_dem_bspline': Permission denied
WARNING: Unable to write quant rules: raster map <lake_raleigh_dem_bspline> is integer
v.surf.bspline complete.

Change History (23)

comment:1 by neteler, 10 years ago

Two questions:

  • how big was your computational region (approximately)?
  • is the mapset directory locally or mounted via network (check permissions in that case)?

comment:2 by baharmon, 10 years ago

The computational region is approximately 4000 ft sq or 1.2 km sq. The mapset directory is local.

in reply to:  2 ; comment:3 by neteler, 10 years ago

Replying to baharmon:

The computational region is approximately 4000 ft sq or 1.2 km sq.

We'd like to know the number of rows/cells as well.

The mapset directory is local.

ok.

in reply to:  3 comment:4 by baharmon, 10 years ago

Replying to neteler:

Replying to baharmon:

The computational region is approximately 4000 ft sq or 1.2 km sq.

We'd like to know the number of rows/cells as well.

Should be approx. 1300 x 1300. I'll check on Monday.

The mapset directory is local.

ok.

comment:5 by neteler, 10 years ago

Keywords: v.surf.bspline added

If you can, please provide a North Carolina dataset example.

in reply to:  5 ; comment:6 by baharmon, 10 years ago

Replying to neteler:

If you can, please provide a North Carolina dataset example.

I used the nc_spm_08_grass7 dataset to recreate the issue. Here are the steps I took:

d.vect map=elev_lid792_bepts@PERMANENT
g.region vect=elev_lid792_bepts@PERMANENT res=1
v.surf.bspline --overwrite input=elev_lid792_bepts@PERMANENT raster_output=elev_lid792_bepts_bspline memory=12000
(Mon Nov 10 11:43:02 2014)                                                      
v.surf.bspline --overwrite input=elev_lid792_bepts@PERMANENT raster_output=elev_lid792_bepts_bspline memory=12000
Initializing output...
Processing subregion 1 of 16...
Processing subregion 2 of 16...
Processing subregion 3 of 16...
Processing subregion 4 of 16...
Processing subregion 5 of 16...
Processing subregion 6 of 16...
Processing subregion 7 of 16...
Processing subregion 8 of 16...
Processing subregion 9 of 16...
Processing subregion 10 of 16...
Processing subregion 11 of 16...
Processing subregion 12 of 16...
Processing subregion 13 of 16...
Processing subregion 14 of 16...
Processing subregion 15 of 16...
Processing subregion 16 of 16...
WARNING: Unable to rename null file 'C:\Users\Brendan\Documents\grassdata/nc_spm_08_grass7/PERMANENT/.tmp/unknown/7332.1' to 'C:\Users\Brendan\Documents\grassdata/nc_spm_08_grass7/PERMANENT/cell_misc/elev_lid792_bepts_bspline/null': Permission denied
WARNING: Unable to rename cell file 'C:\Users\Brendan\Documents\grassdata/nc_spm_08_grass7/PERMANENT/.tmp/unknown/7332.0' to 'C:\Users\Brendan\Documents\grassdata/nc_spm_08_grass7/PERMANENT/fcell/elev_lid792_bepts_bspline': Permission denied
WARNING: Unable to write quant rules: raster map <elev_lid792_bepts_bspline> is integer
v.surf.bspline complete.
(Mon Nov 10 11:46:02 2014) Command finished (2 min 59 sec)

in reply to:  6 ; comment:7 by baharmon, 10 years ago

Replying to baharmon:

Replying to neteler:

If you can, please provide a North Carolina dataset example.

I used the nc_spm_08_grass7 dataset to recreate the issue. Here are the steps I took:

d.vect map=elev_lid792_bepts@PERMANENT
g.region vect=elev_lid792_bepts@PERMANENT res=1
v.surf.bspline --overwrite input=elev_lid792_bepts@PERMANENT raster_output=elev_lid792_bepts_bspline memory=12000
(Mon Nov 10 11:43:02 2014)                                                      
v.surf.bspline --overwrite input=elev_lid792_bepts@PERMANENT raster_output=elev_lid792_bepts_bspline memory=12000
Initializing output...
Processing subregion 1 of 16...
Processing subregion 2 of 16...
Processing subregion 3 of 16...
Processing subregion 4 of 16...
Processing subregion 5 of 16...
Processing subregion 6 of 16...
Processing subregion 7 of 16...
Processing subregion 8 of 16...
Processing subregion 9 of 16...
Processing subregion 10 of 16...
Processing subregion 11 of 16...
Processing subregion 12 of 16...
Processing subregion 13 of 16...
Processing subregion 14 of 16...
Processing subregion 15 of 16...
Processing subregion 16 of 16...
WARNING: Unable to rename null file 'C:\Users\Brendan\Documents\grassdata/nc_spm_08_grass7/PERMANENT/.tmp/unknown/7332.1' to 'C:\Users\Brendan\Documents\grassdata/nc_spm_08_grass7/PERMANENT/cell_misc/elev_lid792_bepts_bspline/null': Permission denied
WARNING: Unable to rename cell file 'C:\Users\Brendan\Documents\grassdata/nc_spm_08_grass7/PERMANENT/.tmp/unknown/7332.0' to 'C:\Users\Brendan\Documents\grassdata/nc_spm_08_grass7/PERMANENT/fcell/elev_lid792_bepts_bspline': Permission denied
WARNING: Unable to write quant rules: raster map <elev_lid792_bepts_bspline> is integer
v.surf.bspline complete.
(Mon Nov 10 11:46:02 2014) Command finished (2 min 59 sec)

Just wanted to note that I ran this again using the user1 mapset rather than from the PERMANENT mapset just to follow best practices. The result was the same:

(Mon Nov 10 11:51:15 2014)                                                      
g.region vect=elev_lid792_bepts@PERMANENT res=1                                 
(Mon Nov 10 11:51:16 2014) Command finished (0 sec)                             
(Mon Nov 10 11:51:30 2014)                                                      
v.surf.bspline --overwrite input=elev_lid792_bepts@PERMANENT raster_output=elev_lid792_bepts_bspline memory=12000
Initializing output...
Processing subregion 1 of 16...
Processing subregion 2 of 16...
Processing subregion 3 of 16...
Processing subregion 4 of 16...
Processing subregion 5 of 16...
Processing subregion 6 of 16...
Processing subregion 7 of 16...
Processing subregion 8 of 16...
Processing subregion 9 of 16...
Processing subregion 10 of 16...
Processing subregion 11 of 16...
Processing subregion 12 of 16...
Processing subregion 13 of 16...
Processing subregion 14 of 16...
Processing subregion 15 of 16...
Processing subregion 16 of 16...
WARNING: Unable to rename null file 'C:\Users\Brendan\Documents\grassdata/nc_spm_08_grass7/user1/.tmp/unknown/7556.1' to 'C:\Users\Brendan\Documents\grassdata/nc_spm_08_grass7/user1/cell_misc/elev_lid792_bepts_bspline/null': Permission denied
WARNING: Unable to rename cell file 'C:\Users\Brendan\Documents\grassdata/nc_spm_08_grass7/user1/.tmp/unknown/7556.0' to 'C:\Users\Brendan\Documents\grassdata/nc_spm_08_grass7/user1/fcell/elev_lid792_bepts_bspline': Permission denied
WARNING: Unable to write quant rules: raster map <elev_lid792_bepts_bspline> is integer
v.surf.bspline complete.
(Mon Nov 10 11:54:28 2014) Command finished (2 min 58 sec)                      
Command 'd.rast map=elev_lid792_bepts_bspline@user1' failed
Details: Fontconfig error: Cannot load default config file
Raster map <elev_lid792_bepts_bspline@user1>: format field
in header file invalid

in reply to:  7 comment:8 by hellik, 10 years ago

Replying to baharmon:

Replying to baharmon:

Replying to neteler:

If you can, please provide a North Carolina dataset example.

I used the nc_spm_08_grass7 dataset to recreate the issue. Here are the steps I took:

d.vect map=elev_lid792_bepts@PERMANENT
g.region vect=elev_lid792_bepts@PERMANENT res=1
v.surf.bspline --overwrite input=elev_lid792_bepts@PERMANENT raster_output=elev_lid792_bepts_bspline memory=12000
(Mon Nov 10 11:43:02 2014)                                                      
v.surf.bspline --overwrite input=elev_lid792_bepts@PERMANENT raster_output=elev_lid792_bepts_bspline memory=12000
Initializing output...
Processing subregion 1 of 16...
Processing subregion 2 of 16...
Processing subregion 3 of 16...
Processing subregion 4 of 16...
Processing subregion 5 of 16...
Processing subregion 6 of 16...
Processing subregion 7 of 16...
Processing subregion 8 of 16...
Processing subregion 9 of 16...
Processing subregion 10 of 16...
Processing subregion 11 of 16...
Processing subregion 12 of 16...
Processing subregion 13 of 16...
Processing subregion 14 of 16...
Processing subregion 15 of 16...
Processing subregion 16 of 16...
WARNING: Unable to rename null file 'C:\Users\Brendan\Documents\grassdata/nc_spm_08_grass7/PERMANENT/.tmp/unknown/7332.1' to 'C:\Users\Brendan\Documents\grassdata/nc_spm_08_grass7/PERMANENT/cell_misc/elev_lid792_bepts_bspline/null': Permission denied
WARNING: Unable to rename cell file 'C:\Users\Brendan\Documents\grassdata/nc_spm_08_grass7/PERMANENT/.tmp/unknown/7332.0' to 'C:\Users\Brendan\Documents\grassdata/nc_spm_08_grass7/PERMANENT/fcell/elev_lid792_bepts_bspline': Permission denied
WARNING: Unable to write quant rules: raster map <elev_lid792_bepts_bspline> is integer
v.surf.bspline complete.
(Mon Nov 10 11:46:02 2014) Command finished (2 min 59 sec)

Just wanted to note that I ran this again using the user1 mapset rather than from the PERMANENT mapset just to follow best practices. The result was the same:

(Mon Nov 10 11:51:15 2014)                                                      
g.region vect=elev_lid792_bepts@PERMANENT res=1                                 
(Mon Nov 10 11:51:16 2014) Command finished (0 sec)                             
(Mon Nov 10 11:51:30 2014)                                                      
v.surf.bspline --overwrite input=elev_lid792_bepts@PERMANENT raster_output=elev_lid792_bepts_bspline memory=12000
Initializing output...
Processing subregion 1 of 16...
Processing subregion 2 of 16...
Processing subregion 3 of 16...
Processing subregion 4 of 16...
Processing subregion 5 of 16...
Processing subregion 6 of 16...
Processing subregion 7 of 16...
Processing subregion 8 of 16...
Processing subregion 9 of 16...
Processing subregion 10 of 16...
Processing subregion 11 of 16...
Processing subregion 12 of 16...
Processing subregion 13 of 16...
Processing subregion 14 of 16...
Processing subregion 15 of 16...
Processing subregion 16 of 16...
WARNING: Unable to rename null file 'C:\Users\Brendan\Documents\grassdata/nc_spm_08_grass7/user1/.tmp/unknown/7556.1' to 'C:\Users\Brendan\Documents\grassdata/nc_spm_08_grass7/user1/cell_misc/elev_lid792_bepts_bspline/null': Permission denied
WARNING: Unable to rename cell file 'C:\Users\Brendan\Documents\grassdata/nc_spm_08_grass7/user1/.tmp/unknown/7556.0' to 'C:\Users\Brendan\Documents\grassdata/nc_spm_08_grass7/user1/fcell/elev_lid792_bepts_bspline': Permission denied
WARNING: Unable to write quant rules: raster map <elev_lid792_bepts_bspline> is integer
v.surf.bspline complete.
(Mon Nov 10 11:54:28 2014) Command finished (2 min 58 sec)                      
Command 'd.rast map=elev_lid792_bepts_bspline@user1' failed
Details: Fontconfig error: Cannot load default config file
Raster map <elev_lid792_bepts_bspline@user1>: format field
in header file invalid

confirmed here with:

System Info                                                                     
GRASS Version: 7.1.svn                                                          
GRASS SVN Revision: 62657                                                       
Erstellungsdatum: 2014-11-08                                                    
Build Platform: i686-pc-mingw32                                                 
GDAL/OGR: 1.11.0                                                                
PROJ.4: 4.8.0                                                                   
GEOS: 3.4.2                                                                     
SQLite: 3.7.17                                                                  
Python: 2.7.4                                                                   
wxPython: 2.8.12.1                                                              
Platform: Windows-7-6.1.7601-SP1 (OSGeo4W) 
(Mon Nov 10 20:23:05 2014)                                                      
v.surf.bspline --verbose input=elev_lid792_bepts@PERMANENT raster_output=mytestrast memory=10000
Input is 3D: using z-coordinates for approximation
Zellen für die Rasterkarte <mytestrast> werden interpoliert.
Initialisiere die Ausgabe...
Adjusted EW splines 150
Adjusted NS splines 150
Processing subregion 1 of 16...
8785 points found in this subregion
Processing subregion 2 of 16...
12132 points found in this subregion
Processing subregion 3 of 16...
11562 points found in this subregion
Processing subregion 4 of 16...
9385 points found in this subregion
Processing subregion 5 of 16...
10376 points found in this subregion
Processing subregion 6 of 16...
14703 points found in this subregion
Processing subregion 7 of 16...
14656 points found in this subregion
Processing subregion 8 of 16...
10855 points found in this subregion
Processing subregion 9 of 16...
13453 points found in this subregion
Processing subregion 10 of 16...
15950 points found in this subregion
Processing subregion 11 of 16...
16042 points found in this subregion
Processing subregion 12 of 16...
11484 points found in this subregion
Processing subregion 13 of 16...
7861 points found in this subregion
Processing subregion 14 of 16...
9337 points found in this subregion
Processing subregion 15 of 16...
9184 points found in this subregion
Processing subregion 16 of 16...
6968 points found in this subregion
Schreibe Ausgabe...
WARNING: Unable to rename null file 'C:\grassdata/nc_spm_08_grass7/testspine/.tmp/unknown/7528.1' to 'C:\grassdata/nc_spm_08_grass7/testspine/cell_misc/mytestrast/null': Permission denied
WARNING: Unable to rename cell file 'C:\grassdata/nc_spm_08_grass7/testspine/.tmp/unknown/7528.0' to 'C:\grassdata/nc_spm_08_grass7/testspine/fcell/mytestrast': Permission denied
WARNING: Unable to write quant rules: raster map <mytestrast> is integer
v.surf.bspline komplett.
(Mon Nov 10 20:26:54 2014) Befehl ausgeführt (3 Min 48 Sek)  

could it be that the files aren't closed?

comment:9 by neteler, 10 years ago

Can you please re-run the test and watch how big the files grow in

C:\grassdata/nc_spm_08_grass7/testspine/.tmp/unknown/

?

comment:10 by baharmon, 10 years ago

I re-ran the test. File 6684.0 was 20,788 KB and file 6684.1 was 361 KB. The others were 1 KB.

WARNING: Unable to rename null file 'C:\Users\Brendan\Documents\grassdata/nc_spm_08_grass7/user1/.tmp/unknown/6684.1' to 'C:\Users\Brendan\Documents\grassdata/nc_spm_08_grass7/user1/cell_misc/elev_lid792_bepts_bspline/null': Permission denied
WARNING: Unable to rename cell file 'C:\Users\Brendan\Documents\grassdata/nc_spm_08_grass7/user1/.tmp/unknown/6684.0' to 'C:\Users\Brendan\Documents\grassdata/nc_spm_08_grass7/user1/fcell/elev_lid792_bepts_bspline': Permission denied
WARNING: Unable to write quant rules: raster map <elev_lid792_bepts_bspline> is integer

comment:11 by annakrat, 10 years ago

Milestone: 7.0.07.0.1
Priority: normalmajor
Version: svn-trunksvn-releasebranch70

How to reproduce (taken from #2597):

g.region rast=elevation res=100
v.random out=points n=1000 -z zmax=100
v.surf.bspline in=points raster_o=surf ns=100 ew=100     

comment:12 by annakrat, 10 years ago

Anyone has any idea? I looked at it but without the ability to debug on Windows I couldn't find anything.

comment:13 by hellik, 9 years ago

Summary: v.surf.bsplinev.surf.bspline: WARNING: Unable to rename null file / WARNING: Unable to write quant rules:

in reply to:  11 comment:14 by hellik, 9 years ago

Replying to annakrat:

How to reproduce (taken from #2597):

g.region rast=elevation res=100
v.random out=points n=1000 -z zmax=100
v.surf.bspline in=points raster_o=surf ns=100 ew=100     

tested here with

System Info                                                                     
GRASS Version: 7.1.svn                                                          
GRASS SVN revision: 65777                                                       
Build date: 2015-07-25                                                          
Build platform: i686-pc-mingw32                                                 
GDAL: 1.11.2                                                                    
PROJ.4: 4.8.0                                                                   
GEOS: 3.4.2                                                                     
SQLite: 3.7.17                                                                  
Python: 2.7.4                                                                   
wxPython: 2.8.12.1                                                              
Platform: Windows-Vista-6.0.6002-SP2 (OSGeo4W)   

and the example from the manual

g.region -p region=rural_1m@PERMANENT res=2   
v.surf.bspline --verbose input=elev_lid792_bepts@PERMANENT raster_output=elev_lid792_rast ew_step=5 ns_step=5 method=bicubic lambda_i=0.1 memory=900
Input is 3D: using z-coordinates for approximation
Zellen für die Rasterkarte <elev_lid792_rast> werden interpoliert.
Initialisiere die Ausgabe...
Adjusted EW splines 121
Adjusted NS splines 131
Processing subregion 1 of 4...
16805 points found in this subregion
Processing subregion 2 of 4...
13741 points found in this subregion
Processing subregion 3 of 4...
13512 points found in this subregion
Processing subregion 4 of 4...
11564 points found in this subregion
Schreibe Ausgabe...
WARNING: Unable to rename null file 'J:\gisdata\nc_spm_08_grass7\user1\.tmp/unknown\5848.1' to 'J:\gisdata\nc_spm_08_grass7\user1\cell_misc\elev_lid792_rast\null': Permission denied
WARNING: Unable to rename cell file 'J:\gisdata\nc_spm_08_grass7\user1\.tmp/unknown\5848.0' to 'J:\gisdata\nc_spm_08_grass7\user1\fcell\elev_lid792_rast': Permission denied
WARNING: Unable to write quant rules: raster map <elev_lid792_rast> is integer
v.surf.bspline komplett.
(Sun Jul 26 10:30:40 2015) Befehl ausgeführt (38 Sek)     

bug report still valid.

comment:15 by hellik, 9 years ago

Keywords: raster quant rules null file cell file added

comment:16 by neteler, 9 years ago

Milestone: 7.0.17.0.2

Ticket retargeted after 7.0.1 milestone closed

comment:17 by neteler, 9 years ago

Milestone: 7.0.27.0.3

Ticket retargeted after milestone closed

comment:18 by neteler, 9 years ago

See also #2712

Perhaps a backport of r65775 is needed?

in reply to:  18 ; comment:19 by annakrat, 9 years ago

Replying to neteler:

See also #2712

Perhaps a backport of r65775 is needed?

It still doesn't work in trunk.

in reply to:  19 comment:20 by hellik, 9 years ago

Replying to annakrat:

Replying to neteler:

See also #2712

Perhaps a backport of r65775 is needed?

It still doesn't work in trunk.

tested in

GRASS version: 7.0.2                                                            
GRASS SVN Revision: 66861                                                       
Build Date: 2015-11-19                                                          
Build Platform: i686-pc-mingw32 
Platform: Windows-7-6.1.7601-SP1 (OSGeo4W) 
Writing output...
WARNING: Unable to rename null file 'C:\grassdata/nc_spm_08_grass7/splinetest/.tmp/unknown/8924.1' to 'C:\grassdata/nc_spm_08_grass7/splinetest/cell_misc/mytestrast/null': Permission denied
WARNING: Unable to rename cell file 'C:\grassdata/nc_spm_08_grass7/splinetest/.tmp/unknown/8924.0' to 'C:\grassdata/nc_spm_08_grass7/splinetest/fcell/mytestrast': Permission denied
WARNING: Unable to write quant rules: raster map <mytestrast> is integer
v.surf.bspline complete.

in reply to:  description ; comment:21 by glynn, 9 years ago

Replying to baharmon:

My main suspicion is that this is caused by the DBMI driver process being spawned after the output raster is opened (so it inherits a handle) and still being alive when Rast_close() is called (similar to issue #2775).

If the driver inherits a handle to the temporary null and cell files, renaming them will fail as the files will be "open".

If that's what's happening, either the close-on-exec flag needs to be set on those files, or DBMI drivers need to close all open files between the fork() and the exec(), or the DBMI driver needs to be terminated before closing the raster.

Also, see the "Open/close db drivers order" thread (ca Oct 22) on the grass-dev list for some more discussion of this.

in reply to:  21 comment:22 by hellik, 9 years ago

Replying to glynn:

Replying to baharmon:

My main suspicion is that this is caused by the DBMI driver process being spawned after the output raster is opened (so it inherits a handle) and still being alive when Rast_close() is called (similar to issue #2775).

If the driver inherits a handle to the temporary null and cell files, renaming them will fail as the files will be "open".

If that's what's happening, either the close-on-exec flag needs to be set on those files, or DBMI drivers need to close all open files between the fork() and the exec(), or the DBMI driver needs to be terminated before closing the raster.

Also, see the "Open/close db drivers order" thread (ca Oct 22) on the grass-dev list for some more discussion of this.

Author: annakrat
Date: 2015-12-05 06:51:04 -0800 (Sat, 05 Dec 2015)
New Revision: 67020

Modified:
   grass/trunk/vector/v.surf.bspline/main.c
Log:
v.surf.bspline: move opening raster after opening driver, closing is in reverse order, attempt to fix #2434

tested with

System Info                                                                     
GRASS version: 7.1.svn                                                          
GRASS SVN revision: 67023M                                                      
Build date: 2015-12-06                                                          
Build platform: i686-pc-mingw32                                                 
GDAL: 1.11.3                                                                    
PROJ.4: 4.9.2                                                                   
GEOS: 3.5.0                                                                     
SQLite: 3.7.17                                                                  
Python: 2.7.4                                                                   
wxPython: 2.8.12.1                                                              
Platform: Windows-7-6.1.7601-SP1 (OSGeo4W) 
g.region -p region=rural_1m@PERMANENT res=2                                     
projection: 99 (Lambert Conformal Conic)
zone:       0
datum:      nad83
ellipsoid:  a=6378137 es=0.006694380022900787
north:      220750
south:      220000
west:       638300
east:       639000
nsres:      2
ewres:      2
rows:       375
cols:       350
cells:      131250
(Sun Dec 06 15:33:21 2015) Command finished (0 sec) 
                            
(Sun Dec 06 15:33:38 2015)                                                      
v.surf.bspline --verbose input=elev_lid792_bepts@PERMANENT raster_output=elev_lid792_rast ew_step=5 ns_step=5 method=bicubic lambda_i=0.1 memory=900
Input is 3D: using z-coordinates for approximation
Cells for raster map <elev_lid792_rast> will be interpolated
Initializing output...
Adjusted EW splines 121
Adjusted NS splines 131
Processing subregion 1 of 4...
16805 points found in this subregion
Processing subregion 2 of 4...
13741 points found in this subregion
Processing subregion 3 of 4...
13512 points found in this subregion
Processing subregion 4 of 4...
11564 points found in this subregion
Writing output...
v.surf.bspline complete.
(Sun Dec 06 15:33:54 2015) Command finished (15 sec) 

so it seems to work now.

comment:23 by annakrat, 9 years ago

Resolution: fixed
Status: newclosed

Thanks Helmut for testing and Glynn for pointing to the solution! I backported it.

Note: See TracTickets for help on using tickets.