[GRASSLIST:573] Re: a problem concerning developing using Grass library

Roger Bivand Roger.Bivand at nhh.no
Mon Jun 30 14:14:03 EDT 2003


On Mon, 30 Jun 2003, Xueming Wu wrote:

> Greetings,
> 
> I'm not sure here is the right place to post such a message.
> If it isn't, could anybody tell me where is the right place.
> Thank you.

Probably the GRASS5 developers' list would be better:

http://grass.itc.it/mailman/listinfo/grass5
> 
> I am developing an application using Grass library under OmniORB.
> I encountered a problem and I have no idea what cause it and how
> to fix it. My application will run successfully if it is invoked
> once. But when it is invoked the second time, the program will
> stopping running and turn into sleeping. There isn't any error
> message. I found that the program will stop at some Grass library
> call such as G_open_cell_old, G_get_window or other calls when I
> used gdb to debug my program.

I'm assuming that you are using Grass 5.0.*

The libraries, including the central libgis.a, were written assuming that 
many programs using their functions start, run, and terminate from the 
command line (or tcltk interface). Consequently, they have a tendency not 
to behave graciously when being run as part of a program that calls them 
repeatedly. Almost all functions check that some initialisation conditions 
are met, for example, some will also look for particular files and 
environment variables. You will almost certainly need to put printf()s 
into your code to get an idea of where things are getting lost, probably 
also into the libes/gis/*.[ch] files too. You may find Frank Warmerdam's 
libgrass a help - http://gdal.velocet.ca/projects/grass/.  

Good luck, sounds interesting!

Roger

-- 
Roger Bivand
Economic Geography Section, Department of Economics, Norwegian School of
Economics and Business Administration, Breiviksveien 40, N-5045 Bergen,
Norway. voice: +47 55 95 93 55; fax +47 55 95 93 93
e-mail: Roger.Bivand at nhh.no




More information about the grass-user mailing list