[odb-users] Query problem
Davide Anastasia
Davide.Anastasia at qualitycapital.com
Fri Sep 28 08:36:28 EDT 2012
This is my backtrace:
#0 0x00000038ca8328a5 in raise () from /lib64/libc.so.6
#1 0x00000038ca834085 in abort () from /lib64/libc.so.6
#2 0x00000038ca82ba1e in __assert_fail_base () from /lib64/libc.so.6
#3 0x00000038ca82bae0 in __assert_fail () from /lib64/libc.so.6
#4 0x0000000000468813 in boost::shared_ptr<QCM::ODB::Quote>::operator*
(this=0x6c4128) at /usr/include/boost/smart_ptr/shared_ptr.hpp:412
#5 0x0000000000467fd9 in
odb::pointer_traits<boost::shared_ptr<QCM::ODB::Quote> >::get_ref
(p=...) at /opt/odb/include/odb/boost/smart-ptr/pointer-traits.hxx:45
#6 0x0000000000467307 in odb::result_iterator<QCM::ODB::Quote,
(odb::class_kind)0>::operator* (this=0x7fffffffd920) at
/opt/odb/include/odb/object-result.hxx:98
#7 0x000000000046673d in QCM::reader::OdbReaderImpl::next
(this=0x6b8e80, outputTick=...) at
/home/davide/DatabasePerfToolTickData/trunk/include/reader/OdbReader.cpp
:102
#8 0x0000000000466803 in QCM::reader::OdbReaderImpl::next
(this=0x6b8e80, outputTick=...) at
/home/davide/DatabasePerfToolTickData/trunk/include/reader/OdbReader.cpp
:112
#9 0x00000000004657ef in QCM::reader::OdbReader::next
(this=0x7fffffffdbb0, outputTick=...) at
/home/davide/DatabasePerfToolTickData/trunk/include/reader/OdbReader.cpp
:198
#10 0x000000000044fb3a in TestOdbReader_CheckOrdering_Test::TestBody
(this=0x6aec00) at
/home/davide/DatabasePerfToolTickData/trunk/test/TestOdbReader.cpp:160
I am currently using ODB 2.2.0.
Best,
Davide
-----Original Message-----
From: Boris Kolpackov [mailto:boris at codesynthesis.com]
Sent: 28 September 2012 11:45
To: Davide Anastasia
Cc: odb-users at codesynthesis.com
Subject: Re: [odb-users] Query problem
Hi Davide,
Davide Anastasia <Davide.Anastasia at qualitycapital.com> writes:
> I have a query statement, that runs fine: the tracer reports the
> correct query. I can run it on the pgadmin3 interface without problems
> and it gives the expected output. If I ask the size of the iterator,
> it will report the right number, but as soon as I deference the
> iterator with operator*, I get an segmentation fault (traced to
boost::shared_ptr).
Seeing a stack trace would be helpful. Without any further information,
my guess would be you have a relationship cycle which requires a session
to load. So the first thing I would try is add a session and see if it
helps.
BTW, ODB 2.0.0 and later detect this problem and throw the
session_required exception.
Boris
More information about the odb-users
mailing list