← Back to team overview

touch-packages team mailing list archive

[Bug 1394873] Re: mir_connection_create_surface callback is sometimes called twice on error

 

mir (0.10.0+15.04.20150107.2-0ubuntu1) vivid; urgency=medium


** Also affects: mir (Ubuntu)
   Importance: Undecided
       Status: New

** Changed in: mir (Ubuntu)
   Importance: Undecided => Medium

** Changed in: mir (Ubuntu)
       Status: New => Fix Released

-- 
You received this bug notification because you are a member of Ubuntu
Touch seeded packages, which is subscribed to mir in Ubuntu.
https://bugs.launchpad.net/bugs/1394873

Title:
  mir_connection_create_surface callback is sometimes called twice on
  error

Status in Mir:
  Fix Released
Status in mir package in Ubuntu:
  Fix Released

Bug description:
  I've just run into some fun behaviour.  In mir_surface.cpp, in the
  surface constructor, if:

  server.create_surface(0, &message, &surface, gp::NewCallback(this,
  &MirSurface::created, callback, context));

  throws (such as if the RPC mechanism detects a connection break) then
  the created callback is called on the partially constructed MirSurface
  that's just about to be destructed. mir_connection_create_surface
  catches this exception and then calls the callback *again*, with an
  newly constructed error MirSurface.

  This is likely to confuse API users :)

To manage notifications about this bug go to:
https://bugs.launchpad.net/mir/+bug/1394873/+subscriptions