Details Ticket 2525


Comment | Reply | Take | Open


Serial Number 2525
Subject starting nviz from tcltkgui
Area grass5.7
Queue grass
Requestors silke@intevation.de
Owner none
Status resolved
Last User Contact Fri Jul 9 12:13:57 2004 (4 yr ago)
Current Priority 30
Final Priority 70
Due No date assigned
Last Action Fri Jul 9 12:14:03 2004 (4 yr ago)
Created Thu Jul 8 17:14:33 2004 (4 yr ago)

Transaction History Ticket 2525


Thu, Jul 8 2004 17:14:33    Request created by silke  
Subject: starting nviz from tcltkgui

Hallo,

I found a bug in the function GS_get_zrange_nz: The aim of this
function is to set the min and max z value of a list of surfaces.
This is used for example by NVIZ.

However, if nviz is called from tcltkgrass no surface is provided
and since GS_get_zrange_nz doesn't initialize zmin and zmax with
default values this leads to harzardous values. (In my case NVIZ
crashed, since the values became to big.)

I add a little patch which solves the problem for me: just
initialize min and max with 0. Perhaps someone could check whether
this is could be integrated into the cvs.

Greetings,

        Silke



----------------------------------
--- lib/ogsf/GS2.c.orig 2004-07-07 18:13:30.827228952 +0200
+++ lib/ogsf/GS2.c      2004-07-07 18:13:36.259403136 +0200
@@ -2046,6 +2046,8 @@
     int i, first = 1;
     geosurf *gs;
 
+    *min = 0;
+    *max = 0;
     for (i = 0; i < Next_surf; i++) {
        if (gs = gs_get_surf(Surf_ID[i])) {
            if (first) {
Fri, Jul 9 2004 12:13:57    Mail sent by mneteler  
Silke,

I have submitted the patch to CVS (it affects 5.3 and 5.7).

Thanks,

 Markus
Fri, Jul 9 2004 12:14:03    Status changed to resolved by mneteler  
Comment | Reply | Take | Open

You are currently authenticated as guest.
[Show Configuration] [Login as another user]

Users Guide - Mail Commands - Homepage of RequestTracker 1.0.7 - list any request