Bug #3881
Unexpected "Reentrant statement use is not yet implemented"
0%
Description
I upgraded Wt today, and I get a new issue that I didn't have before
(From git://github.com/kdeforche/wt
7023b38..43ce974 master -> origin/master)
In the handleRequest of the WResource used to get the cover art of tracks, I have this:
{
Wt::Dbo::Transaction transaction(_db.getSession());
Database::Track::pointer track = Database::Track::getById(_db.getSession(), trackId);
covers = CoverArt::Grabber::getFromTrack(track);
}
In the Track class:
typedef Wt::Dbo::ptr pointer;
Track::pointer
Track::getById(Wt::Dbo::Session& session, id_type id)
{
return session.find().where("id = ?").bind(id);
}
The browser seems to fetch several covers at the same time, I end up with this exception:
(gdb) bt
#0 0x00007ffff2ef6dbd in __cxa_throw () from /usr/lib/x86_64-linux-gnu/libstdc.so.6
#1 0x00007ffff704c26d in Wt::Dbo::SqlConnection::getStatement (this=,
id="select \"id\", \"version\", \"track_number\", \"disc_number\", \"name\", \"artist_name\", \"release_name\", \"duration\", \"date\", \"original_date\", \"genre_list\", \"path\", \"last_write\", \"checksum\", \"has_cover\\" from \"tra"...) at /storage/emeric/MesProgs/wt/wt/src/Wt/Dbo/SqlConnection.C:57
#2 0x00007ffff703f3a1 in Wt::Dbo::Session::getOrPrepareStatement (this=0x7fffd80c0d20,
sql="select \"id\", \"version\", \"track_number\", \"disc_number\", \"name\", \"artist_name\", \"release_name\", \"duration\", \"date\", \"original_date\", \"genre_list\", \"path\", \"last_write\", \"checksum\", \"has_cover\\" from \"tra"...) at /storage/emeric/MesProgs/wt/wt/src/Wt/Dbo/Session.C:1118
#3 0x000000000051d150 in Wt::Dbo::Impl::QueryBase<Wt::Dbo::ptrDatabase::Track >::statements (this=this@entry=0x7fffe3ffbf90, where="(id = ?)", groupBy="", orderBy="", limit=--1,
offset=--1) at /usr/include/Wt/Dbo/Query_impl.h:137
#4 0x000000000051d40d in Wt::Dbo::Query<Wt::Dbo::ptrDatabase::Track, Wt::Dbo::DynamicBinding>::resultList (this=this@entry=0x7fffe3ffbf90) at /usr/include/Wt/Dbo/Query_impl.h:483
#5 0x0000000000527894 in Wt::Dbo::Query<Wt::Dbo::ptrDatabase::Track, Wt::Dbo::DynamicBinding>::resultValue (this=this@entry=0x7fffe3ffbf90) at /usr/include/Wt/Dbo/Query_impl.h:469
#6 0x0000000000515b28 in operator Wt::Dbo::ptrDatabase::Track (this=) at /usr/include/Wt/Dbo/Query_impl.h:494
#7 Database::Track::getById (session=..., id=3575) at ../../src/database/Track.cpp:165
#8 0x00000000005f92b2 in UserInterface::CoverResource::handleRequest (this=0x7fffc805c0e0, request=..., response=...) at ../../src/ui/resource/CoverResource.cpp:91
#9 0x00007ffff77a4c18 in Wt::WResource::handle (this=this@entry=0x7fffc805c0e0, webRequest=webRequest@entry=0x7fffd00025d0, webResponse=webResponse@entry=0x7fffd00025d0,
continuation=...) at /storage/emeric/MesProgs/wt/wt/src/Wt/WResource.C:216
#10 0x00007ffff79cb41a in Wt::WebSession::notify (this=0x7fffd84d1a20, event=...) at /storage/emeric/MesProgs/wt/wt/src/web/WebSession.C:2212
#11 0x00007ffff79c4f58 in Wt::WebSession::handleRequest (this=0x7fffd84d1a20, handler=...) at /storage/emeric/MesProgs/wt/wt/src/web/WebSession.C:1619
#12 0x00007ffff79b6267 in Wt::WebController::handleRequest (this=0xadf170, request=0x7fffd00025d0) at /storage/emeric/MesProgs/wt/wt/src/web/WebController.C:713
#13 0x00007ffff6b2d6ef in operator() (a1=0x7fffd00025d0, p=0xadf170, this=) at /usr/include/boost/bind/mem_fn_template.hpp:165
#14 operator()<boost::_mfi::mf1<void, Wt::WebController, Wt::WebRequest*>, boost::_bi::list0> (a=, f=, this=)
at /usr/include/boost/bind/bind.hpp:313
#15 operator() (this=) at /usr/include/boost/bind/bind_template.hpp:20
-> ~/MesProgs/wt/wt/src/Wt/Dbo/SqlConnection.C:57-> throw Exception("A collection for '" + id + "' is already in use." \" Reentrant statement use is not yet implemented.\");
What do you think ?