From: Michael W. <mw...@it...> - 2003-07-11 08:07:25
|
Hi On Thu, Jul 10, 2003 at 02:16:30PM -0400, KEVIN ZEMBOWER wrote: > Michael, thank you for your response. No problem. > I tried both things, to see if there was difference. Here's the output > of the debugging, after compiling with the -g option: > www:/home/kevinz/mdbtools-0.5rc2# gdb mdb-export [snip] > (gdb) run -H ../budgetdb/budgettables.mdb BCODE > Starting program: /usr/local/bin/mdb-export -H ../budgetdb/budgettables.mdb BCODE > > Program received signal SIGSEGV, Segmentation fault. > 0x08048db3 in main (argc=4, argv=0xbffff914) at mdb-export.c:103 > 103 if (quote_text && is_text_type(col->col_type)) { > (gdb) backtrace > #0 0x08048db3 in main (argc=4, argv=0xbffff914) at mdb-export.c:103 > (gdb) OK, do that again, but this time type: (gdb) print col I think col is either NULL or has some other bad value. If it's NULL it will look something like this: $1 = (MdbColumn *) 0x0 (gdb) print col->col_type If col is NULL or contains some other bad value, this will fail something like this: Cannot access memory at address 0x20 After a quick look at the code, it seems that if you pass in "-H" then col is used before it is initialised. I am not one of the developers of mdbtools, but try this: Insert the following line: col=g_ptr_array_index(table->columns,0); Just before the following line on line 103: if (quote_text && is_text_type(col->col_type)) { so the code reads: [...] while(mdb_fetch_row(table)) { col=g_ptr_array_index(table->columns,0); if (quote_text && is_text_type(col->col_type)) { [...] Actually, after looking at the latest code from CVS, I see that's exactly what it does :) > Just pressing RETURN when asked for the password gave the same result: > kevinz@www:~$ cvs -d:pserver:ano...@cv...:/cvsroot/mdbtools login > Logging in to :pserver:ano...@cv...:2401/cvsroot/mdbtools > CVS password: [Just pressed RETURN here] > cvs [login aborted]: recv() from server cvs.mdbtools.sourceforge.net: Connection reset by peer "Connection reset by peer" means that the server closed the connection. SourceForge's CVS servers have been quite flakey recently. Try that login again until it completes successfully. SourceForge suggests waiting a minute or so and trying again, but there's no guarantee it will work the second time :) You will have the same problem when trying to checkout the sources after logging in. Actually, just skip the cvs login and create a file called /home/kevinz/.cvspass containing the following line: /1 :pserver:ano...@cv...:2401/cvsroot/mdbtools A That's what cvs login does anyway. Maybe Brian or someone else could provide CVS snapshots occasionally? (I didn't see any available for download.) > kevinz@www:~$ cvs -z3 -d:pserver:ano...@cv...:/cvsroot/mdbtools co mdbtools > cvs checkout: failed to open /home/kevinz/.cvspass for reading: No such file or directory > cvs [checkout aborted]: recv() from server cvs.mdbtools.sourceforge.net: EOF This is because you have not yet logged in successfully. See the error message about there being no .cvspass file? This file is created/updated by cvs login. -- Michael Wood <mw...@it...> |