dbTalk Databases Forums  

Follow up to "seg fault as soon as i try to get a Result Set"

mailing.database.mysql-plusplus mailing.database.mysql-plusplus


Discuss Follow up to "seg fault as soon as i try to get a Result Set" in the mailing.database.mysql-plusplus forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Chris Gagnon
 
Posts: n/a

Default Follow up to "seg fault as soon as i try to get a Result Set" - 02-24-2005 , 10:25 PM






------=_NextPart_000_0003_01C51AC8.196DE120
Content-Type: text/plain;
charset="us-ascii"
Content-Transfer-Encoding: 7bit

Sorry, couldn't actually reply to that thread.



I did a backtrace on the seg fault which gives me:

Program received signal SIGSEGV, Segmentation fault.

0x280b6c8c in MysqlConnection::store () from /usr/local/lib/libsqlplus.so.1

(gdb) bt

#0 0x280b6c8c in MysqlConnection::store () from
/usr/local/lib/libsqlplus.so.1

#1 0x805a25d in MysqlConnection::store ()

at /usr/include/g++/stl_construct.h:43

#2 0x8058543 in MysqlQuery::store () at /usr/include/g++/stl_construct.h:43

#3 0x8057149 in MysqlQuery::store () at /usr/include/g++/stl_construct.h:43

#4 0x80550f4 in EOSUniverse::LoadUniverse ()

at /usr/include/g++/stl_construct.h:43

#5 0x804e9f1 in EOSServer::Initialize ()

#6 0x804e634 in EOSServer::run ()

#7 0x80602d1 in main () at main.cpp:144



As for some of the comments I changed the creation to be on the stack, and
removed the multi level exception handling which didn't seen to fix the
problem.



On another note I wrote a test program that retrieves a result set no
problem.



If needed I can post my new code. to give an idea of what I have now

-Chris


------=_NextPart_000_0003_01C51AC8.196DE120--


Reply With Quote
  #2  
Old   
Warren Young
 
Posts: n/a

Default Re: Follow up to "seg fault as soon as i try to get a Result Set" - 02-25-2005 , 12:37 AM






Chris Gagnon wrote:

Quote:
On another note I wrote a test program that retrieves a result set no
problem.
Is it the same result set, from the same database? In that case, I
would suspect that you might have a memory problem, and that the MySQL++
faults are only secondary damage.

If you are retrieving something different, I'm not sure that your test
proves anything beyond what the MySQL++ examples do.

--
MySQL++ Mailing List
For list archives: http://lists.mysql.com/plusplus
To unsubscribe: http://lists.mysql.com/plusplus?unsu...ie.nctu.edu.tw



Reply With Quote
  #3  
Old   
Chris Gagnon
 
Posts: n/a

Default RE: Follow up to "seg fault as soon as i try to get a Result Set" - 02-27-2005 , 11:57 AM



I'm and trying to use both mysql++ and raknet in my project but as soon as i
include certain raknet headers mysql++ starts Seg Faulting when attempting
to get a result set.

I'm hoping to luck out and someone knows about the raknet library as well,
It's a game networking library ( www.rakkarsoft.com )

In anycase heres some info, suggestions on how to fix or even how to go
about locating the issue would be great as I'm unsure on how to debug a
cross library issue like this.

These are what i was including from the Raknet library
The two commented lines when included (both or either) the seg fault occurs
#include "PacketEnumerations.h"
#include "RakNetworkFactory.h"
//#include "RakServerInterface.h"
//#include "NetworkTypes.h"
#include "BitStream.h"

If it's any help here is a back trace of the seg fault
Program received signal SIGSEGV, Segmentation fault.
0x28098c8c in MysqlConnection::store () from /usr/local/lib/libsqlplus.so.1
(gdb) bt
#0 0x28098c8c in MysqlConnection::store () from
/usr/local/lib/libsqlplus.so.1
#1 0x8057ad1 in MysqlConnection::store (this=0x807b008, str=@0xbfbff63c)
at /usr/local/include/mysql/connection1.hh:92
#2 0x80566d7 in MysqlQuery::store (this=0xbfbff868, p=@0xbfbff8fc,
r=RESET_QUERY) at /usr/local/include/mysql/query2.hh:39
#3 0x80556f5 in MysqlQuery::store (this=0xbfbff868, r=RESET_QUERY)
at /usr/local/include/mysql/query1.hh:74
#4 0x8054680 in EOSUniverse::LoadUniverse (this=0x806c050, dbCon=@0x807b008)
at EOSUniverse.cpp:35
#5 0x804df7d in EOSServer::Initialize (this=0x807b000) at EOSServer.cpp:118
#6 0x804ddae in EOSServer::run (this=0x807b000, terminationFlag=@0x8067820)
at EOSServer.cpp:37
#7 0x805e95d in main () at main.cpp:144

If there is any information i can give you that helps let me know!

Cause i'm stumped

-----Original Message-----
From: Warren Young [mailto:mysqlpp (AT) etr-usa (DOT) com]
Sent: Friday, February 25, 2005 1:38 AM
To: MySQL++ Mailing List
Subject: Re: Follow up to "seg fault as soon as i try to get a Result Set"

Chris Gagnon wrote:

Quote:
On another note I wrote a test program that retrieves a result set no
problem.
Is it the same result set, from the same database? In that case, I
would suspect that you might have a memory problem, and that the MySQL++
faults are only secondary damage.

If you are retrieving something different, I'm not sure that your test
proves anything beyond what the MySQL++ examples do.

--
MySQL++ Mailing List
For list archives: http://lists.mysql.com/plusplus
To unsubscribe:
http://lists.mysql.com/plusplus?unsu...gers (DOT) com


--
MySQL++ Mailing List
For list archives: http://lists.mysql.com/plusplus
To unsubscribe: http://lists.mysql.com/plusplus?unsu...ie.nctu.edu.tw



Reply With Quote
  #4  
Old   
Warren Young
 
Posts: n/a

Default Re: Follow up to "seg fault as soon as i try to get a Result Set" - 02-28-2005 , 05:29 PM



Chris Gagnon wrote:
Quote:
query << "select * from eos_world";
How many records is that?

Quote:
Result res = query.store(); // SEG FAULTS HERE
I asked because you're storing them all on the stack here.

--
MySQL++ Mailing List
For list archives: http://lists.mysql.com/plusplus
To unsubscribe: http://lists.mysql.com/plusplus?unsu...ie.nctu.edu.tw



Reply With Quote
  #5  
Old   
Warren Young
 
Posts: n/a

Default Re: Follow up to "seg fault as soon as i try to get a Result Set" - 02-28-2005 , 05:32 PM



Chris Gagnon wrote:
Quote:
#2 0x80566d7 in MysqlQuery::store (this=0xbfbff868, p=@0xbfbff8fc,
r=RESET_QUERY) at /usr/local/include/mysql/query2.hh:39
You can't possibly be using anything newer than 1.7.20, from the
evidence in that backtrace line. You're not going to get much more help
if you won't use the current version. (1.7.28) No one wants to roll
back their library just to help some random guy out.

--
MySQL++ Mailing List
For list archives: http://lists.mysql.com/plusplus
To unsubscribe: http://lists.mysql.com/plusplus?unsu...ie.nctu.edu.tw



Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.