Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 15 Mar 2010 13:19:39 +0300
From:      "Alexander Zagrebin" <alexz@visp.ru>
To:        "'Bernhard Froehlich'" <decke@bluelife.at>
Cc:        freebsd-emulation@freebsd.org
Subject:   RE: Call for testers: VirtualBox 3.1.4 update
Message-ID:  <2DFB65D67E9140B6B82B1608007C5200@vosz.local>
In-Reply-To: <b125726c2b23907bc4a2dc547ca8e091@bluelife.at>
References:  <b125726c2b23907bc4a2dc547ca8e091@bluelife.at>

next in thread | previous in thread | raw e-mail | index | archive | help

[-- Attachment #1 --]
VirtualBox still crashes when saving state in the headless mode.

Try these commands to reproduce the bug (may be the VirtualBox needs
to be compiled without X11):

$ VBoxHeadless -s Test &
$ VBoxManage controlvm Test savestate
Sun VirtualBox Command Line Management Interface Version 3.1.4_OSE
(C) 2005-2010 Sun Microsystems, Inc.
All rights reserved.

0%...10%...20%...
Error: failed to save machine state. No error message available!

The reason is an arithmetic exception (division by zero) in the
displayMakeThumbnail (src/VBox/Main/DisplayImpl.cpp, line 161)
due to cx and cy are set to 0.

cxThumbnail = (kMaxSizeThumbnail * cx) / cy;

The one of possible solutions - don't make the thumbnail (see attached patches) 

-- 
Alexander Zagrebin
 

> -----Original Message-----
> From: owner-freebsd-emulation@freebsd.org 
> [mailto:owner-freebsd-emulation@freebsd.org] On Behalf Of 
> Bernhard Froehlich
> Sent: Friday, March 12, 2010 1:21 PM
> To: freebsd-emulation@FreeBSD.org
> Subject: Call for testers: VirtualBox 3.1.4 update
> 
> Grias di,
> 
> we are preparing the VirtualBox 3.1.4 update to fix the 
> vtophys problems
> with the current port on 9-CURRENT and STABLE kernels and need some
> feedback for this. Many thanks to all developers and testers 
> that helped
> to track this issue down and Alexander Eichner for all the work and
> fixing it.
> 
> 
> Changelog from VirtualBox is available here:
> http://www.virtualbox.org/wiki/Changelog
> 
> Changes in the port:
>   - VirtualBox and Guest Additions updated to 3.1.4
>   - Add UNIQUENAME to fix options file clashes between the virtualbox
>     ports [0]
>   - Fixed vtophys problems on CURRENT and STABLE kernes newer than
>     January 23th [1]
>   - Fixed page double wiring issue in rtR0MemObjNativeAllocPage [2]
> 
> PR: ports/143361 [0]
> Submitted by: Martin Birgmeier <martin.birgmeier AT aon.at> [0]
>               Alexander Eichner <Alexander.Eichner AT Sun.COM> [1]
> Thanks To: All testers on emulation@ and current@ [1]
>            Giovanni Trematerra <giovanni.trematerra AT gmail.com> [1]
>            Ian Freislich <ianf AT clue.co.za> [1]
> Reported by: Alan Cox <alc AT cs dot rice dot edu> [2]
> 
> 
> How to upgrade:
>   - Fetch the new ports:
>     # fetch 
> http://svn.bluelife.at/nightlies/virtualbox-port-r758.tar.gz
>     # tar xf virtualbox-port-r758.tar.gz
> 
>   - Build the new ports:
>     # cd virtualbox-ose-kmod && make
>     # cd ../virtualbox-ose && make
> 
>   - If build was ok, deinstall old port
>     # pkg_delete virtualbox-\*
> 
>   - Install new ports:
>     # cd ../virtualbox-ose-kmod && make install clean
>     # cd ../virtualbox-ose && make install clean
> 
> For FreeBSD guests within VirtualBox please use the
> emulators/virtualbox-ose-additions port from the FreeBSD ports tree.
> 
> 
> Check the wiki page for known problems: 
> http://wiki.freebsd.org/VirtualBox
> 
> Please report any functionality which was working with 
> previous versions
> of VirtualBox and no longer working with 3.1.4 or any build failure.
> 
> Many thanks to the VirtualBox developers, all testers and 
> patch submitters
> and the whole vbox@ team.
> 
> 
> Happy Testing!
> 
> - - Bernhard (decke) on behalf of the FreeBSD Vbox Team
> 
> -- 
> Bernhard Frцhlich
> http://www.bluelife.at/
> _______________________________________________
> freebsd-emulation@freebsd.org mailing list
> http://lists.freebsd.org/mailman/listinfo/freebsd-emulation
> To unsubscribe, send any mail to 
> "freebsd-emulation-unsubscribe@freebsd.org"
> 
> 
> !DSPAM:1,4b9a15a910826779316940!
> 

[-- Attachment #2 --]
--- src/VBox/Main/DisplayImpl.cpp.orig	2010-02-12 22:49:23.000000000 +0300
+++ src/VBox/Main/DisplayImpl.cpp	2010-03-15 10:17:24.303396897 +0300
@@ -432,9 +432,11 @@
 
         if (RT_SUCCESS(rc))
         {
+	    if (cx && cy) {
             /* Prepare a small thumbnail and a PNG screenshot. */
             displayMakeThumbnail(pu8Data, cx, cy, &pu8Thumbnail, &cbThumbnail, &cxThumbnail, &cyThumbnail);
             displayMakePNG(pu8Data, cx, cy, &pu8PNG, &cbPNG, &cxPNG, &cyPNG);
+            }
 
             /* This can be called from any thread. */
             that->mpDrv->pUpPort->pfnFreeScreenshot (that->mpDrv->pUpPort, pu8Data);

[-- Attachment #3 --]
--- src/VBox/Devices/Graphics/DevVGA.cpp.orig	2010-02-12 22:48:12.000000000 +0300
+++ src/VBox/Devices/Graphics/DevVGA.cpp	2010-03-15 10:43:10.189226010 +0300
@@ -4973,6 +4973,8 @@
      */
     updateDisplayAll(pThis);
 
+    if (pThis->last_scr_width && pThis->last_scr_height)
+    {
     /*
      * The display connector interface is temporarily replaced with the fake one.
      */
@@ -5038,10 +5040,19 @@
             *pcy = Connector.cy;
         }
     }
+    }
+    else
+    {
+        rc = VINF_SUCCESS;
+        *ppu8Data = NULL;
+        *pcbData = 0;
+        *pcx = 0;
+        *pcy = 0;
+    }
 
     PDMCritSectLeave(&pThis->lock);
 
-    LogFlow(("vgaPortTakeScreenshot: returns %Rrc (cbData=%d cx=%d cy=%d)\n", rc, cbRequired, Connector.cx, Connector.cy));
+    LogFlow(("vgaPortTakeScreenshot: returns %Rrc (cbData=%d cx=%d cy=%d)\n", rc, *pcbData, *pcx, *pcy));
     return rc;
 }
 

Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?2DFB65D67E9140B6B82B1608007C5200>