[vbox-dev] Floating point exception
Klaus Espenlaub
Klaus.Espenlaub at Sun.COM
Fri Oct 24 05:15:38 PDT 2008
James Lucas wrote:
> Occasionally I get a Floating point exception from VBoxManage showvminfo
> when it trys to render the value of VRDPThroughputSend. This is on VBox
> 1.6.6 however the current SVN sources have the same line.
>
> The line in VBoxManage.cpp is RTPrintf("VRDPThroughputSend=%llu\n",
> (BytesSent * 1000) / (EndTime - BeginTime) );
>
> VRDPLastStartTime="2008/10/24 00:39:24 UTC"
> VRDPLastEndTime="2008/10/24 00:39:24 UTC"
> VRDPBytesSent=0
> Floating point exception
> (Exit code 136)
>
> I guess this is caused because BytesSent = 0 and both EndTime &
> BeginTime are equal (ie 0 div 0). I've only seen this happening when
> external VRDP authentication is turned on and I assume it happens when a
> user enters invalid credentials (server will close client connection
> straight away).
>
> Should this case be checked for? There is at least one other line like
> this which could cause a divide by zero error.
Thanks for spotting this - this went unnoticed for quite some time. Of
course this needs to be checked for. I've fixed this internally, and the
changed code should appear in the OSE svn whenever we next update that.
The next major release will also contain the fix.
Klaus
More information about the vbox-dev
mailing list