[odb-users] Bad allocation exception thrown when executing query

bxt161230 at utdallas.edu bxt161230 at utdallas.edu
Mon Jul 10 16:16:33 EDT 2017


Hi

I need am facing exceptions, both in release and debug, with exceptions thrown while executing a query.

This is the query I try to execute :

result r(db->query<borrower>(query::bname.like(ss.str())));

The exception is

Exception thrown at 0x00007FFE2B033C58 in test1.exe: Microsoft C++ exception: std::bad_alloc at memory location 0x000000EA3C4FE9B0.
Exception thrown at 0x00007FFE2B033C58 in test1.exe: Microsoft C++ exception: std::bad_alloc at memory location 0x000000EA3C4FC3B0.
Exception thrown at 0x00007FFE2B033C58 in test1.exe: Microsoft C++ exception: [rethrow] at memory location 0x0000000000000000.
Exception thrown at 0x00007FFE2B033C58 in test1.exe: Microsoft C++ exception: std::bad_alloc at memory location 0x000000EA3C4FC3B0.

Sometimes I also get a read access violation as below

Exception thrown: read access violation.
std::_Tree<std::_Tmap_traits<type_info const * __ptr64,odb::details::shared_ptr<odb::mysql::statements_base>,odb::details::type_info_comparator,std::allocator<std::pair<type_info const * __ptr64 const,odb::details::shared_ptr<odb::mysql::statements_base> > >,0> >::_Root(...) returned 0x8.

Is this behavior because my table has 10000 entries and there is not enough memory to store this data? I have been trying to play with sessions and caches, but I think my premature knowledge of ODB takes me nowhere.

Could you please help me with this problem?

Regards
Bipul


More information about the odb-users mailing list