Bug #939

WTableView::closeEditors() cause "no active transaction" error when run under transaction

Added by User Starius almost 2 years ago. Updated over 1 year ago.

Status:ClosedStart date:08/08/2011
Priority:NormalDue date:
Assignee:Koen Deforche% Done:

0%

Category:-
Target version:3.2.0

Description

This code works:

view_->closeEditors();
dbo::Transaction t(session());
session().flush();
t.commit();

while this fails:

dbo::Transaction t(session());
view_->closeEditors();
session().flush();
t.commit();

Maybe it is related not with WTableView but with session().flush().

History

#1 Updated by Koen Deforche almost 2 years ago

  • Status changed from New to Feedback

Hey,

Can you provide some more information on steps to reproduce?
I assume your table is linked to a Dbo::QueryModel ?

Also, it would be great if you can run under the debugger to see indeed whether the error is thrown from flush() or from somewhere in closeEditors().

The bug is intriguing since it sounds like a fundamental problem with nested transaction blocks.

Regards,
koen

#2 Updated by User Starius almost 2 years ago

Hello!

Yes, the table is linked to a QueryModel.
The error is thrown from flush()

#0  0x00007ffff5f4fa00 in __cxa_throw () from /usr/lib/x86_64-linux-gnu/libstdc++.so.6
#1  0x0000000000436383 in Wt::Dbo::Session::implSave<facts::Fact> (this=0x7fffe80060a8, dbo=...)
    at /usr/include/Wt/Dbo/Session_impl.h:253
#2  0x0000000000435239 in Wt::Dbo::MetaDbo<facts::Fact>::flush (this=0x7fffe801b150) at /usr/include/Wt/Dbo/ptr_impl.h:58
#3  0x00007ffff661b6f5 in Wt::Dbo::Session::flush (this=0x7fffe80060a8) at /build/buildd/witty-3.1.10/src/Wt/Dbo/Session.C:882

#3 Updated by Koen Deforche over 1 year ago

  • Assignee set to Koen Deforche
  • Target version set to 3.2.0

#4 Updated by Koen Deforche over 1 year ago

Hey,

I would appreciate a test case that reproduces this. I can't imagine a reason of why this goes wrong.

Regards,
koen

#5 Updated by Koen Deforche over 1 year ago

  • Status changed from Feedback to Closed

due to lack of test case, feedback

Also available in: Atom PDF