Resize scratch window, it doesn't update, goes black, and shrinks to a vertical strip in Unity-3D.

Bug #1025013 reported by Alan Pope 🍺🐧🐱 πŸ¦„
122
This bug affects 22 people
Affects Status Importance Assigned to Milestone
Compiz
Undecided
Unassigned
Squeak
Undecided
Unassigned
Unity
Invalid
Undecided
Unassigned
compiz (Ubuntu)
Precise
Undecided
Unassigned
Quantal
Undecided
Unassigned
scratch (Baltix)
Undecided
Unassigned
scratch (Ubuntu)
Medium
Curtis
Precise
Medium
Unassigned
Quantal
Medium
Unassigned
squeak-vm (Ubuntu)
Undecided
Unassigned
Precise
Undecided
Unassigned
Quantal
Undecided
Unassigned

Bug Description

Open scratch in a unity-3D session
Maximise the window
Observe the window goes black and the app is unusable.
Unmaximize the window
The window shrinks to a small strip.

Only happen when run in unity 3D.
Does not happen when the image file is manually opened with squeak.
Does not happen when the -xshm switch is removed

See screenshots.
Video: http://youtu.be/bpTX7O3NDy4

ProblemType: Bug
DistroRelease: Ubuntu 12.04
Package: scratch 1.4.0.6~dfsg1-2~ubuntu12.04.1
ProcVersionSignature: Ubuntu 3.2.0-26.41-generic 3.2.19
Uname: Linux 3.2.0-26-generic x86_64
ApportVersion: 2.0.1-0ubuntu8
Architecture: amd64
Date: Sun Jul 15 19:38:13 2012
EcryptfsInUse: Yes
InstallationMedia: Ubuntu 12.04 LTS "Precise Pangolin" - Release amd64 (20120425)
PackageArchitecture: all
SourcePackage: scratch
UpgradeStatus: No upgrade log present (probably fresh install)

Revision history for this message
Alan Pope 🍺🐧🐱 πŸ¦„ (popey) wrote :
Revision history for this message
Alan Pope 🍺🐧🐱 πŸ¦„ (popey) wrote :
Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in scratch (Ubuntu):
status: New → Confirmed
Revision history for this message
linux-man (caldas-lopes) wrote :

Stranger than that: After resizing, non-maximized black scratch window start "shrinking" horizontally until turns to a vertical line!
Updated Ubuntu 12.04 64 using revamped Unity

Revision history for this message
Greemod (gree-w) wrote :

I did some troubleshooting and found that if I right-click on the .image file and click open-with squeak there are no problems resizing the window, but full screen mode does not work. I was able to save the image in a proper windows size.

Greemod (gree-w)
summary: - Resize scratch window, it doesn't update, goes black.
+ Resize scratch window, it doesn't update, goes black, and shrinks to a
+ vertical strip.
Revision history for this message
Amos Blanton (lightnin9) wrote : Re: Resize scratch window, it doesn't update, goes black, and shrinks to a vertical strip.

We did some testing and found that this bug does not happen when running in 2d mode.

Greemod (gree-w)
description: updated
Greemod (gree-w)
description: updated
Revision history for this message
Greemod (gree-w) wrote :

This bug does not happen when run in a GNOME session. Seems to only happen in unity-3D

Changed in unity:
status: New → Incomplete
status: Incomplete → Confirmed
summary: Resize scratch window, it doesn't update, goes black, and shrinks to a
- vertical strip.
+ vertical strip in Unity-3D.
description: updated
Revision history for this message
Greemod (gree-w) wrote :

I figured it out! I removed the vm option -xshm and now it resizes fine.

Revision history for this message
Ubuntu Foundations Team Bug Bot (crichton) wrote :

The attachment "black_screen.patch" of this bug report has been identified as being a patch. The ubuntu-reviewers team has been subscribed to the bug report so that they can review the patch. In the event that this is in fact not a patch you can resolve this situation by removing the tag 'patch' from the bug report and editing the attachment so that it is not flagged as a patch. Additionally, if you are member of the ubuntu-reviewers team please also unsubscribe the team from this bug report.

[This is an automated message performed by a Launchpad user owned by Brian Murray. Please contact him regarding any issues with the action taken in this bug report.]

tags: added: patch
Revision history for this message
Amos Blanton (lightnin9) wrote :

That's great! Here's the functionality of that command line switch:
"-xshm
enables the use of the X Shared Memory extension on servers that support it. This can dramatically improve display performance, but works only when Squeak is running on the server."

http://www.squeakvm.org/unix/doc/squeak.html

So we should verify that there's no performance loss as a result of removing that switch. I'll try to do some testing soon.

Revision history for this message
Amos Blanton (lightnin9) wrote :

Awesome - I can confirm that removal of the switch mentioned above does make window resizing work properly in 3d mode. And after testing several projects, performance does not appear to be affected. :)

Anyone have any insight into why the removal of that switch makes things work?

Greemod (gree-w)
description: updated
affects: unity → compiz
Changed in compiz:
milestone: none → 0.9.8.0
Changed in compiz (Ubuntu):
status: New → Confirmed
Revision history for this message
Greemod (gree-w) wrote :

When will a new version with this fixed be released?

Greemod (gree-w)
Changed in squeak:
status: New → Confirmed
Changed in squeak-vm (Ubuntu):
status: New → Confirmed
Changed in unity:
status: New → Confirmed
Changed in compiz:
milestone: 0.9.8.0 → 0.9.8.1
Changed in compiz:
milestone: 0.9.8.2 → 0.9.8.4
Revision history for this message
David G. Johnson (n-david-johnson) wrote :

Please forgive the neophyte question, but is it possible for me to apply Greemod's patch to my current Scratch installation on Ubuntu Ubuntu 12.04?

Revision history for this message
Daniel van Vugt (vanvugt) wrote :

Greemod:

Please propose your fix for merging into lp:scratch.

Changed in scratch:
status: New → In Progress
assignee: nobody → Greemod (gree-w)
Changed in compiz:
status: Confirmed → Invalid
milestone: 0.9.8.4 → none
Changed in unity:
status: Confirmed → Invalid
Changed in compiz (Ubuntu):
status: Confirmed → Invalid
Revision history for this message
Mario Guerriero (mefrio-g) wrote :

Greemod follow Daniel's suggestion and I will merge your patch in lp:scratch.

Changed in scratch:
importance: Undecided → Low
importance: Low → Medium
milestone: none → 1.2
Revision history for this message
Amos Blanton (lightnin9) wrote :

Hi David:

Here's a fix. In a terminal, type:

sudo gedit /usr/bin/scratch

You'll see a line that starts with VMOPTIONS. Remove the -xshm from that line, so it looks like this:

VMOPTIONS="-encoding UTF-8 -vm-display-x11 -plugins /usr/lib/scratch/plugins/:$SQ_DIR/"

Save the file. Scratch should no longer have this bug.

Revision history for this message
Amos Blanton (lightnin9) wrote :

I've made an edit to the debian scratch repository, here:

https://alioth.debian.org/projects/pkg-squeak/

After some testing, they should submit an update containing this and other fixes soon.

Greemod (gree-w)
Changed in scratch:
status: In Progress → Invalid
assignee: Greemod (gree-w) → nobody
Revision history for this message
j.schirmacher (j-schirmacher) wrote :

The same Problem on a new installed Ubuntu 12.10 system with Unity standard.

Some more hints: wrong window size and wrong launcher items (Squeak instead of scratch)

Revision history for this message
Bruce Pieterse (octoquad) wrote :

I can confirm that removing the -xshm option from /usr/bin/scratch resolves the problem. The switch -xshm seems to work fine in 3D mode (unity) on a secondary screen though. See attachment in bug #1072309

no longer affects: scratch
Revision history for this message
Alex Eftimie (alexeftimie) wrote :

This is still a problem, please merge that patch.

I'm teaching a course for kids using Scratch, and I have to apply the patch manually on every ubuntu installation - or else, no window resize is posible.

Revision history for this message
Jeremy Bicha (jbicha) wrote :

scratch (1.4.0.6~dfsg1-3) unstable; urgency=low

  [ Miriam Ruiz ]
  * Added support for help in starting script. Thanks to Alec Clews.
  * Changed my email to <email address hidden>

  [ Amos Blanton ]
  * Prefer pulse plugin if pulse is present, because pulse ALSA emulation
    fails when user records sounds.
  * Remove -xshm switch to squeakvm to prevent Ubuntu Bug 1025013.

no longer affects: compiz (Ubuntu)
Changed in scratch (Ubuntu):
importance: Undecided → Medium
Changed in scratch (Ubuntu Precise):
importance: Undecided → Medium
status: New → Triaged
Changed in scratch (Ubuntu Quantal):
importance: Undecided → Medium
status: New → Triaged
Changed in scratch (Ubuntu):
status: Confirmed → Fix Released
Revision history for this message
Rolf Leggewie (r0lf) wrote :

quantal has seen the end of its life and is no longer receiving any updates. Marking the quantal task for this ticket as "Won't Fix".

Changed in scratch (Ubuntu Quantal):
status: Triaged → Won't Fix
Rolf Leggewie (r0lf)
Changed in compiz (Ubuntu Quantal):
status: New → Won't Fix
Changed in squeak-vm (Ubuntu Quantal):
status: New → Won't Fix
Curtis (curtiscasha)
Changed in scratch (Ubuntu):
assignee: nobody → Curtis (curtiscasha)
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers