[bug #4246] [GRASS-dev] Memory freeing errors in NVIZ

Hamish hamish_nospam at yahoo.com
Fri May 26 04:19:00 EDT 2006


Cedric:
> I just fixed your keyframe bug in CVS. I didn't close the bug because
> it mentions other pieces of the nviz code that do the same thing
> (something about draw.c).

Yes, it all seems to work ok now, great!

It didn't work for me earier - I guess I just added "(char *)" but must
have left the G_free()s in place?? Hmph. No matter, it is working now.


what about the "const"?

Bob: [from the bug report]
> I do get the compiler warning for all of the Tcl_SplitList in src.
> According to TCL recent documentation arg 4 in Tcl_SplitList should
> actually be "const char **". If I change 
> char **listels;
> in anim_support.c (line ~933)
> to const char **listels;
> I do not get the compiler warning.


Cedric:
> Memory allocated by Tcl must be freed using Tcl_Free. This is the same
> thing that was the nviz segfault on startup bug. Tcl 8.4 is the first
> version that takes advantage of tcl's memory management abstraction,
> which has been in place since at least 7.0. Tcl_Alloc and Tcl_Free
> just happened to be malloc an free on all platforms before 8.4. I
> know I've said this before, but it bears repeating.

repetition helps


Glynn:
> My guess is that the Debian package uses threads while the FC4 version
> doesn't. FWIW, my version was built without thread support.

Debian's 8.4 uses threads. This would explain why the Mandrake version
failed too.



thanks,
Hamish




More information about the grass-dev mailing list