[odb-users] Segfault after adding relations
Boris Kolpackov
boris at codesynthesis.com
Wed Sep 28 07:45:15 EDT 2011
Hi Michal,
kontakt at msnoch.pl <kontakt at msnoch.pl> writes:
> I'm wondering why i have segmentation fault in code like this:
>
> transaction t(db->begin());
> result start(db->query<Stop>(query::name == p_from || query::street ==
> p_from));
>
> for(result::iterator i(start.begin()); i!= start.end(); ++i)
> {
> cout << "Found " << i->getStreet().toStdString() << endl;
> }
>
> t.commit();
>
> everything was fine until I started using relations. Stop have shared_ptr
> to other class, and other class have weak_ptr to Stop.
It's hard to say without looking at the code and I don't see anything
suspicious in what you have shown. Would you be able to create a small
but complete test case that reproduces this problem?
Boris
More information about the odb-users
mailing list