[GRASS-dev] v.digit crash

Glynn Clements glynn at gclements.plus.com
Wed May 2 20:16:01 EDT 2007


Markus Neteler wrote:

> > I managed to crash the new v.digit by editing the "streams"
> > map of the new NC dataset. I tried to insert a new point
> > (outlet), then
> > 
> > g.copy vect=streams,mystreams
> > v.digit mystreams
> > X Error of failed request:  BadAlloc (insufficient resources for operation)
> >   Major opcode of failed request:  53 (X_CreatePixmap)
> >   Serial number of failed request:  4353
> >   Current serial number in output stream:  4361

> Digging further into this, I found out that it doesn't crash with the DBF
> driver. So it is related to the SQLite driver.
> 
> Here some more debugging stuff:
> http://mpa.itc.it/markus/tmp/vdigit_settings_sqlite.png
> (how the table definition looks like in v.digit - all 99999 lengths!)
> 
> DEBUG=2 output, put here to not make the mail too long:
> http://mpa.itc.it/markus/tmp/vdigit_settings_sqlite.txt

> <INPUT type=text size=99999 name=FTYPE value="">

That will translate into a Tk entry widget with "-width 99999", which
could be nasty.

> There are various size=99999 there which come from
> db/drivers/sqlite/describe.c
> 
>    113          fsize = 99999; /* sqlite doesn't care, it must be long enough to
>    114                            satisfy tests in GRASS */
> 
> Last year I changes fsize from -1 to 99999 for v.in.ascii:
> 
> 2006-07-04 11:24  markus
>         * describe.c: define sufficient length to make v.in.ascii functional
> 
> So far it worked. The trick seems to be to get it fixed for the form in
> v.digit.

The same issue could apply to code using the form library, as that
uses the same HTML library.

The main question is where to fix it; in the HTML library, in the code
which generates the form, or in the database driver.

-- 
Glynn Clements <glynn at gclements.plus.com>




More information about the grass-dev mailing list