[odb-users] segfault in query in Fedora 24

Matt Walker leafless.matt at gmail.com
Thu Sep 29 09:34:50 EDT 2016


Hi.

I may be trying to get a little too bleeding edge here, but I thought I
would try ;-)

I'm attempting to integrate odb into a gtkmm3 application, no luck so far.
I modified a snippet in the odb examples code, and and played around with
things on a few different platforms to see where it was happy. I got it to
run successfully on Centos 7, building libodb and libodb-mysql from source,
with the packaged gcc 4.x.

On Fedora 24, the odb dnf packages are available, and i installed libodb
and libodb-mysql that way, but odb wanted a g++ downgrade (the default dnf
version is 6.2.1), so I just grabbed the binary from code synthesis.

I tried compiling in both C++11 and c++03 mode, it still seg faults on
instantiating the query template object. I have attached the abrt backtrace
to this email.

void DataAccess::findAppUsers(string loginUser)
{
    try
    {

    typedef odb::query<AppUser> query;
    typedef odb::result<AppUser> result;

    {

    transaction t (db->begin ());

    db->query<AppUser>(query::ssoId == loginUser);
    result r (db->query<AppUser>(query::ssoId == loginUser));
      for (result::iterator i (r.begin ()); i != r.end (); ++i)
      {
        cout << "Hello, " << i->getFirstName() << "!" << endl;
      }

      t.commit ();
    }
  }
  catch (const odb::exception& e)
  {
    cerr << "odb query is unhappy: " << e.what () << endl;
  }
}

The kernel version is 4.7.4-200. Any ideas?

Thanks,

Matt Walker
-------------- next part --------------
A non-text attachment was scrubbed...
Name: core_backtrace
Type: application/octet-stream
Size: 5371 bytes
Desc: not available
Url : http://codesynthesis.com/pipermail/odb-users/attachments/20160929/1cb3cefe/core_backtrace.obj


More information about the odb-users mailing list