This is a forwarded message From: Dani P. <[EMAIL PROTECTED]> To: "Pavel Tsekov" <[EMAIL PROTECTED]> Date: Monday, February 18, 2002, 9:45:51 PM Subject: Core dumped just only with strcat!
===8<==============Original message text=============== I've trying lots of things and after 1 day with it, I've achieved to work part of the code. What I did? I just declared my array before a MYSQL_RES variable. I had: MYSQL_RES * result; char petition[500]; And I changed to: char petition[500]; MYSQL_RES * result; And also I did all the string work before the mysql stuff (connection call, query call,...). And, don't ask me why, it worked! (now it crashes in other function, in a mysql_query call). I have not a reasonable answer for this behaviour... I'm quite lost. I've asked this same question to the mysql-win32 list, and it seems not to be a mysql problem (according to this list). I have attached the code (it's in mysql_procs.c, but I have attached all the files involved-- In order to compile and run, you need Gtk-win32 library), but you must pardon me because it has been written in Spanish and so, variables and comments may bore you. The problem I related you was among the first lines of the code, but the last problem I told you was among the last lines. Finally, could I ask you for forward this message to the cygwin list? After the answers which claim that the error could be caused by mysql, I unsuscribed from cywgin list, and by now, I'm not suscribed (yet). Thanks, Dani P. ----- Original Message ----- From: Pavel Tsekov <[EMAIL PROTECTED]> To: Dani P. <[EMAIL PROTECTED]> Cc: <[EMAIL PROTECTED]> Sent: Monday, February 18, 2002 9:57 AM Subject: Re: Core dumped just only with strcat! > Just tried it - it doesn't dump core here. Is this snippet taken > from a larger source ? If so maybe it would be usefull to paste it > all. Maybe the core happens somewhere else... > > Still you can try to debug this by yourself - compile with -g > option and launch gdb. Then come back to the list if you suspect > a bug in cygwin and not your code :) > > Dani P. wrote: > > > Sorry, in my last posting there's an error in the piece of code: > > > > > >>char request[500]; > >>request[0]=3D'\0'; <------ "3D" should not be here > >>strcat(request,"SELECT * FROM data"); > >> > > > > I meant that this piece of code dumps a core, not the last posting. > > > > Thanks, > > > > Dani > > > > > > ----- Original Message ----- > > From: Dani P. <[EMAIL PROTECTED]> > > To: <[EMAIL PROTECTED]> > > Sent: Saturday, February 16, 2002 10:57 AM > > Subject: Core dumped just only with strcat! > > > > > > > >>I have installed recently cygwin in order to compile a piece of code > >>which compiled an d worked fine in Linux, using Gtk and MySQL libraries. > >>It compiles fine, but it dumps a core just only with a "strcat". I do the > >>following: > >> > >>char request[500]; > >>request[0]=3D'\0'; > >>strcat(request,"SELECT * FROM data"); > >> > >>And in that last instruction, it dumps a core. > >> > >>Could you help me? > >> > >>Thanks, > >> > >>Dani P. > >> > >> > >>-- > >>Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple > >>Bug reporting: http://cygwin.com/bugs.html > >>Documentation: http://cygwin.com/docs.html > >>FAQ: http://cygwin.com/faq/ > >> > >> > >> > > > > > > -- > > Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple > > Bug reporting: http://cygwin.com/bugs.html > > Documentation: http://cygwin.com/docs.html > > FAQ: http://cygwin.com/faq/ > > > > > > > > > > > ===8<===========End of original message text===========
gui.h
Description: Binary data
gui.c
Description: Binary data
mysql_procs.c
Description: Binary data
mysql_procs.h
Description: Binary data
-- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Bug reporting: http://cygwin.com/bugs.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/