VirtualBox

Opened 11 years ago

Last modified 5 years ago

#11758 reopened defect

"Take Screenshot" just makes black PNG ==> Fixed in SVN

Reported by: Aren Cambre Owned by:
Component: 3D support Version: VirtualBox 4.2.12
Keywords: Cc: aren@…
Guest type: Linux Host type: Windows

Description

If I hit Take Screenshot, all I get is a black PNG. I've attached the PNG. I've also attached a user-generated screenshot, created from hitting PrtScn while VirtualBox does not have the focus (and later cropped with GIMP).

System state:

  • guest is Ubuntu 13.04, fresh install
  • Guest Additions installed, has been rebooted
  • host is Windows 8 x64

If you look at the manually-taken screenshot, you'll notice a problem with z-order on the windows: even though Chromium is below gedit, Chromoium's chrome web store content is displaying above gedit. I'm filing a separate issue with Ubuntu over this, but that should not affect VirtualBox's ability to take a screenshot, as it really should just be slicing off a copy of the final rendered output.

Attachments (6)

VBox.log (87.7 KB ) - added by Aren Cambre 11 years ago.
VBox.log.1 (111.2 KB ) - added by Aren Cambre 11 years ago.
Ubuntu 13.png (4.7 KB ) - added by Aren Cambre 11 years ago.
user-generated screenshot (resized).png (430.8 KB ) - added by Aren Cambre 11 years ago.
VBox.2.log (101.1 KB ) - added by snoopy1978 10 years ago.
VBox.log of taking black screenshot
Ubuntu-2016-07-24-22-15-10.log (179.7 KB ) - added by coder0xff 8 years ago.

Download all attachments as: .zip

Change History (38)

by Aren Cambre, 11 years ago

Attachment: VBox.log added

by Aren Cambre, 11 years ago

Attachment: VBox.log.1 added

by Aren Cambre, 11 years ago

Attachment: Ubuntu 13.png added

by Aren Cambre, 11 years ago

comment:1 by fpn, 11 years ago

Same here on:

  • Guest: Ubuntu 12.10
  • Guest Additions installed 4.2.12_84980
  • Host: OS X 10.8.3
  • VirtualBox: 4.2.12_84980

Specifically I can't take screenshots inside the VM e.g. run gimp on Ubuntu and capture screen.

comment:2 by Frank Mehnert, 11 years ago

Component: other3D support

Most likely 3D-related. If you would disable 3D, creating a screenshot would work.

comment:3 by Aren Cambre, 11 years ago

Strangely, I can no longer reproduce. Regardless of whether I have 3D turned on, I can now get screenshots.

comment:4 by Vort, 10 years ago

Same problem for Linux Mint 15 (or 16) Cinnamon 64-bit: screenshots are black

  • VirtualBox: 4.3.2
  • Host: Windows 7
  • Guest: Linux Mint 15 Cinnamon 64-bit
  • 3D acceleration is enabled

comment:5 by fpn, 10 years ago

Yep, problem also persists for me:

  • Guest: Ubuntu 12.10
  • Guest Additions installed 4.3.0_89960
  • Host: OS X 10.8.5
  • VirtualBox: 4.3.0_89960

comment:6 by misha, 10 years ago

This issue should be now fixed.
Please give a try to the following test build that has the fix included, and let me know whether it works for you:

Last edited 10 years ago by Frank Mehnert (previous) (diff)

comment:7 by misha, 10 years ago

Summary: "Take Screenshot" just makes black PNG"Take Screenshot" just makes black PNG ==> Fixed in SVN

comment:8 by RoteAdler, 10 years ago

4.3.7-92195 solves the following issues for me:

  • #11758 "Take Screenshot" just makes black PNG (this issue)
  • #7953 Just desktop background in preview
  • #other Video capturing still image

In fact, my issue was: when using 3D the preview freezes and "take screenshot" or "video capture" uses the preview image; maybe not the same physical image, but time coincident.

Now, this didn't solve #12306. That seems related, because the image was once again "the same". Anyway, there are other problems that make the mini toolbar a poor solution, see #12344.

comment:9 by Frank Mehnert, 10 years ago

Could you test VBox 4.3.8 RC1?

comment:10 by RoteAdler, 10 years ago

  • 4.3.8_RC1-92386 tested with windows7 host
  • windows7, windows8.1, ubuntu13.10, and other guest
  • 3d disabled and enabled where applicable:

screenshot, preview and video capture working as expected, thank you :)

comment:11 by Frank Mehnert, 10 years ago

Resolution: fixed
Status: newclosed

Fix is part of VBox 4.3.8.

comment:12 by snoopy1978, 10 years ago

Resolution: fixed
Status: closedreopened

In this constellation exactly this problem occurs (again):

  • Host: Windows 7 x64
  • VirtualBox 4.3.10
  • Guest: Ubuntu 14.04, GuestAdditions installed

comment:13 by Aren Cambre, 10 years ago

It's working for me. My only difference is the host is Windows 8.1 x64.

comment:14 by Frank Mehnert, 10 years ago

snoopy1978, please attach a VBox.log file of such a VM session.

by snoopy1978, 10 years ago

Attachment: VBox.2.log added

VBox.log of taking black screenshot

comment:15 by snoopy1978, 10 years ago

sorry for the delay, just noticed the answers today.

I attached a VBox.log from this session:

1) Start VM with Ubuntu Guest
2) Login to Ubuntu Guest
3) Take a screenshot which was black

comment:16 by snoopy1978, 10 years ago

Just made a short screen capture in VirtualBox, you can see it here:

https://www.dropbox.com/l/BDTacT2kFDkxwlJMblMrWq?

comment:17 by jonathan naguin, 10 years ago

This problem occurs with:

  • Windows 7 x64
  • VirtualBox 4.3.12r93733
  • Guest: Ubuntu 12.04 LTS

If I disable the 3D Acceleration (correctly enabled in Ubuntu) it works as expected.

Last edited 10 years ago by jonathan naguin (previous) (diff)

comment:18 by Andy Sayler, 10 years ago

I'm also seeing this on:

  • Host: Ubuntu 14.04 x64
  • VirtualBox: 4.3.10_Ubuntu r93010
  • Guest: Ubuntu 14.04 x64 (Guest extensions installed from Ubuntu repos)

Screenshots are black when 3D Acceleration is enabled, but fine when it is disabled.

Last edited 10 years ago by Andy Sayler (previous) (diff)

comment:19 by Aren Cambre, 9 years ago

Still a problem with 3D acceleration enabled on:

  • Host: Windows 8.1 x64
  • VirtualBox: 4.3.18 r96516
  • Guest: Ubuntu 14.14 x64 (Guest Additions installed via VirtualBox, not Ubuntu)

comment:20 by snowch, 9 years ago

This problem happens with 3D acceleration on:

  • Host: Mac OS X Yosemite 10.10.4
  • Guest: Ubuntu 15.04 x64
  • Virtualbox guest additions: installed via Virtualbox
  • Virtualbox version: 5.0.0r101573

Screenshots work fine with 3D acceleration disabled.

comment:21 by alexsch, 8 years ago

The issue also affects java.awt.Robot.createScreenCapture(rectangle) method in JDK.

For more details see issue JDK-8138759 Robot.createScreenCapture() does not work on VirtualBox with installed GuestAdditions

https://bugs.openjdk.java.net/browse/JDK-8138759

The Robot.createScreenCapture(rectangle) uses "GdkPixbuf *gdk_pixbuf_get_from_drawable ()" method in GTK and and it just returns a screenshot with background or with some dark rectangles on VirtualBox with GuestAdditions installed and the 3D Acceleration option enabled.

Last edited 8 years ago by alexsch (previous) (diff)

comment:22 by rje, 8 years ago

Same for me.

VirtualBox: 5.0.18 Host: Windows 10 Guest: Linux Mint Cinnamon 17.3 (running guest additions 16 because 18 is completely broken) 3D enabled

by coder0xff, 8 years ago

comment:23 by coder0xff, 8 years ago

Me too.

comment:24 by SELIX, 7 years ago

Come on guys, this is a 3 year old bug and still not fixed? I can confirm the black screenshots on Linux Mint 18c "Sarah" LTS. Any suggestions for a work-around?

in reply to:  24 ; comment:25 by cravenf, 7 years ago

Replying to SELIX:

Come on guys, this is a 3 year old bug and still not fixed? I can confirm the black screenshots on Linux Mint 18c "Sarah" LTS. Any suggestions for a work-around?

Disabling 3D acceleration (VB/Settings/Display) worked for me. I am using VB 5.1.12 in Windows 10 host running Ubuntu 16.04 guest.

in reply to:  25 comment:26 by Doug Carman, 7 years ago

Replying to cravenf:

Replying to SELIX:

Come on guys, this is a 3 year old bug and still not fixed? I can confirm the black screenshots on Linux Mint 18c "Sarah" LTS. Any suggestions for a work-around?

Disabling 3D acceleration (VB/Settings/Display) worked for me. I am using VB 5.1.12 in Windows 10 host running Ubuntu 16.04 guest.

Disabling 3D acceleration really isn't a workaround if you need it for the application you are trying to capture an image of. The regression of this bug has occurred enough times that testing for it ought to be considered for a standard part of the release process. I can confirm it exists with VBox 5.1.10 r112026 and an up to date installation of Linux Mint 18. It's really annoying.

comment:27 by cgrs, 7 years ago

I got the same error with this specs:

  • Ubuntu 16.04.2
    • Unity 7.4.0
    • Gnome Shell 3.18.4
    • gnome-screenshot 3.18.0

Note: on Gnome Shell, gnome-screenshot works, but suddenly leaves the machine so slow it becomes unresponsive.

Working scenarios:

  • Arch Linux
    • Gnome Shell 3.24.1
    • gnome-screenshot 3.23.0
  • Debian 8.8
    • Gnome Shell 3.14.4
    • gnome-screenshot 3.14.0

All machines run Guest Additions 5.1.22 (r115126), have 3D acceleration enabled and are 64-bit machines.

VirtualBox 5.1.22 (r115126)

comment:28 by tutubarao, 6 years ago

Same error here

Host specs:

  • windows 10 home single language x64
  • version 1703
  • build 15063.674

Virtualbox specs:

Guest specs:

Last edited 6 years ago by tutubarao (previous) (diff)

comment:29 by quiettime, 6 years ago

I have this problem. Windows 7 64-bit host and Debian type 64-bit guest live cd. If I go to View > Virtual Screen 1 and switch any resolution other than the one it started at then the screenshots are no longer blank. It is not a specific resolution, it's just changing the resolution that way seems to do something that causes the screenshots to become normal.

In other words:

Start at 1024x768 then those screenshots are blank unless switching to another like 1152x864.

Start at 1152x864 then those screenshots are blank unless switching to another like 1024x768.

So I think something in VirtualBox signals something that only happens on the resolution switch but isn't taking place at start. I have 2D and 3D acceleration disabled.

Version 5.2.0 r118431 (Qt5.6.2), Windows 7 x64 Host.


Guest stuff:


cat /usr/share/gnome/gnome-version.xml

<gnome-version>
 <platform>3</platform>
 <minor>22</minor>
 <micro>2</micro>
 <distributor>Debian</distributor>

lsmod | grep -i vbox

vboxvideo              36864  3
ttm                    94208  1 vboxvideo
drm_kms_helper        151552  1 vboxvideo
drm                   348160  6 vboxvideo,ttm,drm_kms_helper
vboxguest             270336  3

sudo lsmod | grep -io vboxguest | xargs sudo modinfo | grep -iw version

version:        5.2.0_Debian r118415

sudo lsmod | grep -io vboxvideo | xargs sudo modinfo | grep -iw version

version:        5.2.0_Debian r118415
version:        5.2.0_Debian r118415
version:        5.2.0_Debian r118415
version:        5.2.0_Debian r118415

sudo modinfo vboxguest

filename:       /lib/modules/4.13.0-1-amd64/updates/vboxguest.ko
version:        5.2.0_Debian r118415
license:        GPL
description:    Oracle VM VirtualBox Guest Additions for Linux Module
author:         Oracle Corporation
srcversion:     0085534D5A985B442B8AC79
alias:          pci:v000080EEd0000CAFEsv00000000sd00000000bc*sc*i*
depends:        
name:           vboxguest
vermagic:       4.13.0-1-amd64 SMP mod_unload modversions

sudo modinfo vboxvideo

filename:       /lib/modules/4.13.0-1-amd64/updates/vboxvideo.ko
version:        5.2.0_Debian r118415
license:        GPL and additional rights
description:    Oracle VM VirtualBox Graphics Card
author:         Oracle Corporation
srcversion:     491F8EFEADFEF16D46B013C
alias:          pci:v000080EEd0000BEEFsv*sd*bc*sc*i*
depends:        drm,drm_kms_helper,ttm
name:           vboxvideo
vermagic:       4.13.0-1-amd64 SMP mod_unload modversions 
parm:           modeset:Disable/Enable modesetting (int)
Last edited 6 years ago by quiettime (previous) (diff)

comment:30 by Hutber, 6 years ago

I can also confirm I am getting the same error, running in iOS with Version 5.2.10 r122088 (Qt5.6.3) inside linux mint 18.3.

comment:31 by Socratis, 6 years ago

@Hutber

iOS? On a Linux Mint? And you're asking for support? For something that 1) is not supported, and 2) is not allowed by Apple's license? You're asking for help/support for a Hackintosh?

comment:32 by te7, 5 years ago

Same in Linux Mint 19 Cinnamon. Disabling 3D Acceleration fixes it.

Note: See TracTickets for help on using tickets.

© 2023 Oracle
ContactPrivacy policyTerms of Use