[GRASS-dev] winGRASS: debugging vector db issues

Moritz Lennert mlennert at club.worldonline.be
Tue Feb 20 07:45:44 EST 2007


On Tue, February 20, 2007 12:34, Moritz Lennert wrote:
> On Wed, February 14, 2007 02:49, Moritz Lennert wrote:
>> Hello Martin,
>>
>> Markus tells me that you might participate in trying to debug the vector
>> db problems we are having in winGRASS.
>>
>> Paul and I have both failed to find the reason up to now. It seems to me
>> that the (or at least the first...) problem is with the table
>> description,
>> and within that most probably in the column description (
>> db__recv_*_definition in xdrtable.c and xdrcolumn.c in
>> lib/db/dbmi_base/).
>> I don't know if Paul has come to the same conclusion.
>>
>
> I think I have been able to get closer to the exact point of the problem.
>
> Using db.select as the test case, the error seems to happen around a call
> to xdr_int() in lib/db/dbmi_base/xdrstring.c.
>
> Below you can see the debug output. Everything marked with 'Moritz:' are
> my debugging statements. As you can see the problem seems to be the next
> attempt of reading a string after the first column name was read. This
> happens either on the second column name, if there are more than one
> column, or on the attempt to read the table name in xdrtable.c after
> having read the (unique) column name.
>
> The problem is in line 105 of lib/db/dbmi_base/xdrstring.c:
>
> if(!xdr_int (&xdrs, &len) || len <= 0)  /* len will include the null byte
> */
>
> len = 0 in this case.
>
> IIUC, xdr_int() is an internal function of the XDR library, so maybe there
> are some specificities with the Windows version of this library which we
> need to take into account ?
>

Some more info:

Both with the dbf driver and the PostgreSQL driver, I cannot create a
table with db.execute. Again, this seems to hang at a call to xdr_int.

Moritz




More information about the grass-dev mailing list