Project

General

Profile

Actions

Bug #2193

closed

WTimer::singleShot broken with boost::signals2

Added by Anonymous over 11 years ago. Updated about 11 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Target version:
Start date:
09/08/2013
Due date:
% Done:

0%

Estimated time:

Description

Hello!

Just trying Wt 3.3.1 both on my desktop (with boost 1.54) and my test server (boost 1.53), and I noticed that WTimer::singleShot seems to be broken when using boost 1.54 new signals2.

Attached there's a sample application to demonstrate the issue: when running it on my desktop, I can see only the non singleshot timer updates, while on my test server I can see all of them.

Thanks

Marco


Files

signals2bug.cpp (1.01 KB) signals2bug.cpp Anonymous, 09/08/2013 03:35 PM
Actions #1

Updated by Marco Gulino over 11 years ago

I Just noticed I wasn't logged in, that's my report anyway.

Thanks

Actions #2

Updated by Koen Deforche over 11 years ago

  • Status changed from New to InProgress
  • Assignee set to Wim Dumon
  • Target version set to 3.3.1
Actions #3

Updated by Wim Dumon over 11 years ago

This may be a bug in signals2.

The problem is: a static single shot WTimer internally connects a listener to the timeout signal, which eventually calls 'delete this'. Through the implementation of WTimer, this slot is executed before the other slots, so the signal is deleted while it's calling its members.

In boost.signals, this worked. Signals2 documents that this should work. So I filed a bug report.

https://svn.boost.org/trac/boost/ticket/9103

I think the following is a valid workaround: in WTimer, at the end of the file, switch timer~~start() and timer~~>timeout.connect(f), which causes the handler to be called before the WTimer is deleted.

BR,

Wim.

Actions #4

Updated by Wim Dumon about 11 years ago

  • Status changed from InProgress to Resolved

Fix expected in boost 1.56.

Work-around for this case will be in next Wt release.

BR,

Wim.

Actions #5

Updated by Koen Deforche about 11 years ago

  • Status changed from Resolved to Closed
Actions

Also available in: Atom PDF