Initial surface size not decided by shell, but guessed by qtmir

Bug #1352845 reported by Gerry Boland
22
This bug affects 5 people
Affects Status Importance Assigned to Milestone
QtMir
In Progress
High
Gerry Boland
qtmir (Ubuntu)
In Progress
High
Gerry Boland
unity-api (Ubuntu)
In Progress
High
Gerry Boland
unity8 (Ubuntu)
In Progress
High
Gerry Boland

Bug Description

When a client connects to Mir and requests a surface with particular geometry, qtmir overrides the requested initial geometry with the width/height of the display. Once the surface has been drawn to, shell finally is notified of the surface and resizes it again.

These multiple resizes are bad. Shell should decide the initial geometry, instead of qtmir guessing it.

Related branches

Gerry Boland (gerboland)
Changed in qtmir:
status: New → Confirmed
importance: Undecided → High
assignee: nobody → Gerry Boland (gerboland)
Revision history for this message
Florian Boucault (fboucault) wrote :

The worst offenders are from best to worst: sudoku app, music app, shorts app.

Gerry Boland (gerboland)
Changed in qtmir:
status: Confirmed → In Progress
Revision history for this message
Michał Sawicz (saviq) wrote :
Download full text (3.8 KiB)

We had to pull this, unfortunately there's a seldom, but still, deadlock when using this approach:

Thread 9 (Thread 0xaebff450 (LWP 15260)):
#0 0xb603f554 in __libc_do_syscall () from /lib/arm-linux-gnueabihf/libpthread.so.0
#1 0xb603b192 in pthread_cond_wait@@GLIBC_2.4 () from /lib/arm-linux-gnueabihf/libpthread.so.0
#2 0xb63b3794 in QWaitCondition::wait(QMutex*, unsigned long) ()
   from /usr/lib/arm-linux-gnueabihf/libQt5Core.so.5
#3 0xb63aed2e in QSemaphore::acquire(int) () from /usr/lib/arm-linux-gnueabihf/libQt5Core.so.5
#4 0xb6525436 in QMetaObject::activate(QObject*, int, int, void**) ()
   from /usr/lib/arm-linux-gnueabihf/libQt5Core.so.5
#5 0xb4001384 in MirPlacementStrategy::sessionAboutToCreateSurface(mir::scene::Session const&, QSize&) ()
   from /usr/lib/arm-linux-gnueabihf/qt5/plugins/platforms/libqpa-mirserver.so
#6 0xb3ff239e in MirPlacementStrategy::place(mir::scene::Session const&, mir::scene::SurfaceCreationParameters const&) () from /usr/lib/arm-linux-gnueabihf/qt5/plugins/platforms/libqpa-mirserver.so
#7 0xb3e96f3e in mir::scene::SurfaceController::add_surface(mir::scene::SurfaceCreationParameters const&, mir::scene::Session*) () from /usr/lib/arm-linux-gnueabihf/libmirserver.so.24
#8 0xb3e81646 in mir::scene::ApplicationSession::create_surface(mir::scene::SurfaceCreationParameters const&)
    () from /usr/lib/arm-linux-gnueabihf/libmirserver.so.24
#9 0xb3eb2a5c in mir::frontend::SessionMediator::create_surface(google::protobuf::RpcController*, mir::protobuf::SurfaceParameters const*, mir::protobuf::Surface*, google::protobuf::Closure*) ()
   from /usr/lib/arm-linux-gnueabihf/libmirserver.so.24
#10 0xb3eb6228 in void mir::frontend::detail::invoke<mir::frontend::detail::ProtobufMessageProcessor, mir::frontend::detail::DisplayServer, mir::protobuf::DisplayServer, mir::protobuf::SurfaceParameters, mir::protobuf::Surface>(mir::frontend::detail::ProtobufMessageProcessor*, mir::frontend::detail::DisplayServer*, void (mir::protobuf::DisplayServer::*)(google::protobuf::RpcController*, mir::protobuf::SurfaceParameters const*, mir::protobuf::Surface*, google::protobuf::Closure*), mir::frontend::detail::Invocation const&) ()
   from /usr/lib/arm-linux-gnueabihf/libmirserver.so.24
#11 0xb3eb4f6a in mir::frontend::detail::ProtobufMessageProcessor::dispatch(mir::frontend::detail::Invocation const&) () from /usr/lib/arm-linux-gnueabihf/libmirserver.so.24
#12 0xb3ebb44c in mir::frontend::detail::SocketConnection::on_new_message(boost::system::error_code const&) ()
   from /usr/lib/arm-linux-gnueabihf/libmirserver.so.24
#13 0xb3ebb732 in mir::frontend::detail::SocketConnection::on_read_size(boost::system::error_code const&) ()
   from /usr/lib/arm-linux-gnueabihf/libmirserver.so.24
#14 0xb3ebd75a in boost::asio::detail::reactive_socket_recv_op<boost::asio::mutable_buffers_1, boost::asio::detail::read_op<boost::asio::basic_stream_socket<boost::asio::local::stream_protocol, boost::asio::stream_socket_service<boost::asio::local::stream_protocol> >, boost::asio::mutable_buffers_1, boost::asio::detail::transfer_exactly_t, std::function<void (boost::system::error_code const&, unsigned int)> > >::do_complete(boost::asio::detail::tas...

Read more...

kevin gunn (kgunn72)
Changed in unity-api (Ubuntu):
assignee: nobody → Gerry Boland (gerboland)
Changed in unity8 (Ubuntu):
assignee: nobody → Gerry Boland (gerboland)
Changed in qtmir (Ubuntu):
assignee: nobody → Gerry Boland (gerboland)
status: New → In Progress
Changed in unity8 (Ubuntu):
status: New → In Progress
Changed in unity-api (Ubuntu):
status: New → In Progress
Changed in qtmir (Ubuntu):
importance: Undecided → High
Changed in unity8 (Ubuntu):
importance: Undecided → High
Changed in unity-api (Ubuntu):
importance: Undecided → High
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.