List:MySQL++« Previous MessageNext Message »
From:Daniel Kolbo Date:June 19 2008 5:10am
Subject:Re: dbdriver sigsegv errors.
View as plain text  
Hello,

answering my own question here...

So I spent about 5 hours figuring out that I was using an old version of 
mysqlpp.dll in my system32 folder.  When upgrading to mysql6 i decided 
to rebuild the mysql++ dll against the mysql6 headers, but i forgot to 
update the system32 folder!  No wonder it compiled but didn't run well...

So that is my, "don't be stupid like me" post.

Daniel Kolbo wrote:
> Hello,
>
> I am using mysql6.  mysql++ seems to be 'working' and 'installed' 
> correctly; however, at the end of the execution of my programs i am 
> receiving SIGSEGV errors.
> When I installed mysql++ simple1 was built.  This version of simple1 
> does NOT produce the error.  However, when I copy the code and try to 
> build it myself I receive the error at the end of the file when 
> running the application.  I am able to compile, but when I run the 
> program it has to abort, and when i debug I get the SIGSEGV error at 
> end of the file.
>
> Here is the commands codeblocks used to compile my project titled 
> 'temp' that contains the exact same code as simple1.cpp.
>
> mingw32-g++.exe -Wall -fexceptions  -g    
> -IE:\mysql++-3.0.3\include_mysql++ -IE:\mysql++-3.0.3\include_mysql6  
> -c E:\C++\codeblocks\Practice\temp\main.cpp -o obj\Debug\main.o
> mingw32-g++.exe -Wall -fexceptions  -g    
> -IE:\mysql++-3.0.3\include_mysql++ -IE:\mysql++-3.0.3\include_mysql6  
> -c E:\C++\codeblocks\Practice\temp\printdata.cpp -o obj\Debug\printdata.o
> mingw32-g++.exe  -o bin\Debug\temp.exe obj\Debug\main.o 
> obj\Debug\printdata.o obj\Debug\cmdline.o    
> E:\mysql++-3.0.3\include_lib_a_def\libmysqlpp.a
> Output size is 1.92 MB
> Process terminated with status 0 (0 minutes, 9 seconds)
> 0 errors, 0 warnings
>
> "E:\mysql++-3.0.3\include_mysql6" contains the exact contents of 
> C:\Program Files\MySQL\MySQL Server 6.0\include
> "E:\mysql++-3.0.3\include_mysql++" contains all the mysql++ header 
> files (the same as the contents of the "include" folder when running 
> the default install.bat)
>
> In codeblocks' debugger I get a SIGSEGV.  This occurs at the end of 
> the file, right around the return 0 in my int main() c++ console 
> application.  I think the error is occuring when the connection 
> destructor is being called.  Here is the backtrace.
> #0 6B3C5834    mysqlpp::DBDriver::~DBDriver(this=0x3e3f80) 
> (lib/dbdriver.cpp:67)
> #1 6B3C21B7    mysqlpp::Connection::~Connection(this=0x22ff30) 
> (lib/connection.cpp:67)
> #2 0040185A    main(argc=1, argv=0x3e3f60) 
> (E:/C++/codeblocks/Practice/temp/main.cpp:68)
>
> Here is the code for the destructor for dbdriver
> DBDriver::~DBDriver()
> {
>    if (connected()) {
>        disconnect();
>    }
>
>    OptionList::const_iterator it;
>    for (it = applied_options_.begin(); it != applied_options_.end(); 
> ++it) {
>        delete *it;//THIS IS LINE 67 where the SIGSEGV occurs
>    }
> }
>
> I don't think this has to do with mysql6, b/c the default build of 
> simple1 does not create the error whereas mine does create the error.  
> Hopefully, this means there is a solution.
> What is going on here? Did I link the project correctly?
> Thanks,
>
>

Thread
dbdriver sigsegv errors.Daniel Kolbo19 Jun
  • Re: dbdriver sigsegv errors.Daniel Kolbo19 Jun