Hey Daniel,

2010/1/29 Koen Deforche <k...@emweb.be>:
> Hey Daniel,
>
> 2010/1/28 Ginsburg, Daniel <daniel.ginsb...@childrens.harvard.edu>:
>> I am trying to integrate Qt into my Wt application.  I got the wtwithqt 
>> example to build and run no problem and I integrated the libwtwithqt.a into 
>> my project.  I changed my application to inherit WQApplication and attempted 
>> to create a simple QtObject (like the one in the sample) in the virtual 
>> MyApplication::create() method.  The problem I am having is that I am 
>> getting an exception:
>
>> [2010-Jan-28 14:41:11.606307] 22371 [/ PmOcWEt6qjPLXZVP] [error] "Exception 
>> while streaming resourceboost::lock_error"
>
> It seems that it may have to do with using a WResource, and I can see
> what might be a small problem in that case because of the thread
> switching magic going on in the background. To be investigated !

I found the problem, and pushed a fix to public git. The following is
a patch which you could also apply on 3.1.0.

Regards,
koen

diff --git a/src/Wt/WResource.C b/src/Wt/WResource.C
index c960b25..df8876e 100644
--- a/src/Wt/WResource.C
+++ b/src/Wt/WResource.C
@@ -86,7 +86,7 @@ void WResource::handle(WebRequest *webRequest,
WebResponse *webResponse,
   // lock
   if (!continuation) {
     WebSession::Handler *h = WebSession::Handler::instance();
-    if (h)
+    if (h && h->lock().owns_lock())
       h->lock().unlock();
   }
 #endif // WT_THREADED

------------------------------------------------------------------------------
The Planet: dedicated and managed hosting, cloud storage, colocation
Stay online with enterprise data centers and the best network in the business
Choose flexible plans and management services without long-term contracts
Personal 24x7 support from experience hosting pros just a phone call away.
http://p.sf.net/sfu/theplanet-com
_______________________________________________
witty-interest mailing list
witty-interest@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/witty-interest

Reply via email to