Terminal creates a new surface when selecting text

Bug #1488588 reported by Dominik
24
This bug affects 4 people
Affects Status Importance Assigned to Milestone
Canonical System Image
Fix Released
High
Alan Pope 🍺🐧🐱 🦄
Ubuntu Terminal App
Fix Released
Undecided
Stefano Verzegnassi

Bug Description

To reproduce:

1. Open terminal
2. Hold finger over screen until pop-up menu appears, select "Select" (or whatever it is in English, not copy or paste)
3. Drag finger to select text
4. Once again drag finger to select text
5. Terminal disappears. After a bit, Unity restarts.

I'm attaching the log that was generated /var/crash at the moment the crash occured.

The terminal seems to continue working: the icon is still there with the little triangle next to it and it can be switched to/from using the app switcher, but it simply shows the app that's underneath it.

Related branches

Revision history for this message
Dominik (dominalien) wrote :
Revision history for this message
Niklas Wenzel (nikwen) wrote :

Here's the log output from the terminal app when that happens: http://paste.ubuntu.com/12193927/

Changed in ubuntu-terminal-app:
status: New → Confirmed
Changed in canonical-devices-system-image:
assignee: nobody → Michał Sawicz (saviq)
importance: Undecided → High
status: New → Confirmed
Revision history for this message
Michał Sawicz (saviq) wrote :

It's not looking great:

#0 0x00000000 in ()
#1 0xffffffff in QSGOpaqueTextureMaterialShader::updateState(QSGMaterialShader::RenderState const&, QSGMaterial*, QSGMaterial*) ()
    at /usr/lib/arm-linux-gnueabihf/libQt5Quick.so.5
#2 0xffffffff in QSGBatchRenderer::Renderer::renderMergedBatch(QSGBatchRenderer::Batch const*) ()
    at /usr/lib/arm-linux-gnueabihf/libQt5Quick.so.5
#3 0xffffffff in QSGBatchRenderer::Renderer::renderBatches() () at /usr/lib/arm-linux-gnueabihf/libQt5Quick.so.5
#4 0x029bee84 in ()

Changed in ubuntu-terminal-app:
status: Confirmed → Invalid
Revision history for this message
Michał Sawicz (saviq) wrote :

It doesn't seem to be a terminal app issue.

Changed in unity8 (Ubuntu):
status: New → Triaged
importance: Undecided → High
assignee: nobody → Gerry Boland (gerboland)
Changed in canonical-devices-system-image:
milestone: none → ww46-2015
Revision history for this message
Gerry Boland (gerboland) wrote :

It appears the terminal is trying to create another surface while you are selecting. This is the output just before the crash:

qtmir.mir: MirWindowManagerImpl::add_surface(): size requested ( 0 , -26 ) and placed ( 1366 , 768 )
qtmir.mir: SessionListener::surface_created - this= SessionListener(0x7fbda015bec0) session= 0x7fbd84007710 surface= 0x7fbd8400d350
qtmir.applications: ApplicationManager::onSessionCreatedSurface - sessionName= terminal
qtmir.surfaces: MirSurfaceManager::onSessionCreatedSurface - mirSession= 0x7fbd84007710 surface= 0x7fbd8400d350 surface.name= Window 1
qtmir.sessions: Session::setSurface - session= "terminal" surface= qtmir::MirSurface(0x1698080)

This crash is a known issue.

Changed in qtmir:
status: New → Triaged
importance: Undecided → High
Revision history for this message
Gerry Boland (gerboland) wrote :

The solution to https://bugs.launchpad.net/qtmir/+bug/1417655 will at least prevent the crash

Revision history for this message
Gerry Boland (gerboland) wrote :

but the Terminal app should never be trying to open a second surface while on phone/tablet. Reopening Terminal app's bug.

Changed in ubuntu-terminal-app:
status: Invalid → New
Revision history for this message
Michał Sawicz (saviq) wrote :

Removed the unity8 and qtmir tasks to not duplicate the status.

Changed in ubuntu-terminal-app:
status: New → Confirmed
summary: - Terminal crashes on selecting text, takes Unity with it
+ Terminal creates a new surface when selecting text
no longer affects: qtmir
no longer affects: unity8 (Ubuntu)
Changed in canonical-devices-system-image:
assignee: Michał Sawicz (saviq) → Alan Pope  (popey)
milestone: ww46-2015 → backlog
Revision history for this message
Stefano Verzegnassi (verzegnassi-stefano) wrote :

I had a look at this.

It looks like the terminal-app recognises the second drag as a drag&drop gesture. It has nothing to do with selection.
See my comment at: https://bugs.launchpad.net/ubuntu-terminal-app/+bug/1556010/comments/1

Even if we (terminal-app devs) surely have to improve the drag behaviour, the second surface seems to be created by Mir when a drag event (activated through standard Qt C++ APIs) is requested.

Therefore I'd say that the platform should, at least, prevent apps to enable drag&drop events through different windows/apps, if you want to support multiple surfaces only in desktop mode.

But, anyway, this is something that it's going to be supported on e.g. Android: http://www.theverge.com/2016/3/10/11195766/android-n-drag-and-drop-text

Revision history for this message
Gerry Boland (gerboland) wrote :

Couple of thoughts:
1. is strange that touch gesture would set off a drag & drop event. Drag & drop being more a mouse-gesture.
2. Mir does not creates surfaces for clients, Mir just does what clients ask for.

Drag & drop support for Mir is still on the TODO list. Can you disable it for now, until we get that implemented?
Thanks
-G

Changed in ubuntu-terminal-app:
assignee: nobody → Stefano Verzegnassi (verzegnassi-stefano)
status: Confirmed → In Progress
Revision history for this message
Jenkins Bot (ubuntu-core-apps-jenkins-bot) wrote :

Fix committed into lp:ubuntu-terminal-app at revision 194, scheduled for release in ubuntu-terminal-app, milestone 2014-12-11

Changed in ubuntu-terminal-app:
status: In Progress → Fix Committed
Changed in ubuntu-terminal-app:
status: Fix Committed → Fix Released
Changed in canonical-devices-system-image:
status: Confirmed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

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