[GRASS5] v.digit dumps core

Hello all

Some of you already know that v.digit dumps core on my SGI machine when
I confirm that I want to continue after selecting the digitizing file. I
found the statement that is causing the core dump, but I have no idea
why the variable in question is NULL. The line of code that fails is
line 312 of src/mapdev/v.digit/digmain.c:

for (i = 0 ; M_edit.item[i].text != NULL ; i++)

The reason it dumps core is that M_edit.item is NULL thus there is no
elements in the array. However, I have no idea where this array is
supposed to be initialized. This particular line of code has been in the
file since grass was switched to CVS. Note that this particular piece of
code is executed when there is no digitizer selected (ie digitize with
the mouse) but we have been able to run v.digit before. The etc/digcap
file seems to be fine as well.

If anyone has any ideas or even confirmation that this bug exists on
other systems, I would greatly appreciate hearing from you. This is
rather urgent since we would like to start a digitizing project on
Monday.

Thank you in advance for any information you can provide.

--
Sincerely,

Jazzman (a.k.a. Justin Hickey) e-mail: jhickey@hpcc.nectec.or.th
High Performance Computing Center
National Electronics and Computer Technology Center (NECTEC)
Bangkok, Thailand

People who think they know everything are very irritating to those
of us who do. ---Anonymous

Jazz and Trek Rule!!!

----------------------------------------
If you want to unsubscribe from GRASS Development Team mailing list write to:
minordomo@geog.uni-hannover.de with
subject 'unsubscribe grass5'

Justin,

This bug apparently does not effect Grass 5.0 beta 10 on Linux w/egcs.

The M_edit structure is initialized in src/mapdev/v.digit/menus.i, which
is included in src/mapdev/v.digit/menus.c

Upon entry into the loop at digmain.c line 312 the M_edit.item[0].text and
subsequent entries are initialized with menu item text for the Edit menu.

Sorry I can't be more helpful.

Roger Miller
Lee Wilson and Associates

On Thu, 4 Jan 2001, Justin Hickey wrote:

Hello all

Some of you already know that v.digit dumps core on my SGI machine when
I confirm that I want to continue after selecting the digitizing file. I
found the statement that is causing the core dump, but I have no idea
why the variable in question is NULL. The line of code that fails is
line 312 of src/mapdev/v.digit/digmain.c:

for (i = 0 ; M_edit.item[i].text != NULL ; i++)

The reason it dumps core is that M_edit.item is NULL thus there is no
elements in the array. However, I have no idea where this array is
supposed to be initialized. This particular line of code has been in the
file since grass was switched to CVS. Note that this particular piece of
code is executed when there is no digitizer selected (ie digitize with
the mouse) but we have been able to run v.digit before. The etc/digcap
file seems to be fine as well.

If anyone has any ideas or even confirmation that this bug exists on
other systems, I would greatly appreciate hearing from you. This is
rather urgent since we would like to start a digitizing project on
Monday.

Thank you in advance for any information you can provide.

--
Sincerely,

Jazzman (a.k.a. Justin Hickey) e-mail: jhickey@hpcc.nectec.or.th
High Performance Computing Center
National Electronics and Computer Technology Center (NECTEC)
Bangkok, Thailand

People who think they know everything are very irritating to those
of us who do. ---Anonymous

Jazz and Trek Rule!!!

----------------------------------------
If you want to unsubscribe from GRASS Development Team mailing list write to:
minordomo@geog.uni-hannover.de with
subject 'unsubscribe grass5'

----------------------------------------
If you want to unsubscribe from GRASS Development Team mailing list write to:
minordomo@geog.uni-hannover.de with
subject 'unsubscribe grass5'

Hello Roger

"Roger S. Miller" wrote:

This bug apparently does not effect Grass 5.0 beta 10 on Linux w/egcs.

The M_edit structure is initialized in src/mapdev/v.digit/menus.i,
which is included in src/mapdev/v.digit/menus.c

Upon entry into the loop at digmain.c line 312 the M_edit.item[0].text
and subsequent entries are initialized with menu item text for the
Edit menu.

Thank you for this information. Since it works on Linux, I will look
into platform dependent stuff. At least I have a starting point now.

--
Sincerely,

Jazzman (a.k.a. Justin Hickey) e-mail: jhickey@hpcc.nectec.or.th
High Performance Computing Center
National Electronics and Computer Technology Center (NECTEC)
Bangkok, Thailand

People who think they know everything are very irritating to those
of us who do. ---Anonymous

Jazz and Trek Rule!!!

----------------------------------------
If you want to unsubscribe from GRASS Development Team mailing list write to:
minordomo@geog.uni-hannover.de with
subject 'unsubscribe grass5'

Hello all

OK, I found the problem in v.digit. The menu definitions are defined in
menus.i but main.c redefined them when globals.h was included. Thus I
changed the globals.h file so that the menu definitions always have the
"extern" storage type.

--
Sincerely,

Jazzman (a.k.a. Justin Hickey) e-mail: jhickey@hpcc.nectec.or.th
High Performance Computing Center
National Electronics and Computer Technology Center (NECTEC)
Bangkok, Thailand

People who think they know everything are very irritating to those
of us who do. ---Anonymous

Jazz and Trek Rule!!!

----------------------------------------
If you want to unsubscribe from GRASS Development Team mailing list write to:
minordomo@geog.uni-hannover.de with
subject 'unsubscribe grass5'