Page 1 of 1
"Unexpected Exception" error when connecting USB device
Posted: 3. Jan 2015, 01:23
by Monomeeth
Hello
I am trialling Virtual Box to see if it'll meet my needs. I've installed it on an iMac running OSX 10.9.5. This machine has 12GB of RAM.
I've installed Windows 7 and have successfully installed some software I need to communicate with a Windows-only USB-connected weather station. However, whenever I connect the weather station I get the following error message:
Unexpected Exception
Exception: Value cannot be null.
Parameter name: SafeHandle cannot be null.
Module: Hid
Method: SafeHandleAddRef
The only option is to click OK, but if I do another duplicate error message appears over the first one and this just continues every time I click OK (so I have a screen full of error messages!)
I am also trialling Parallels and VMware Fusion, and the weather station connects just fine in either of those environments. The software and Windows 7 installation is the same in Parallels and Fusion, so I'm hoping that there's a solution for this to work in Virtual Box. Basically this is the only reason I need the virtual machine, so would prefer not to fork out the money for one of the commercial products.
Any help would be greatly appreciated!

Re: "Unexpected Exception" error when connecting USB device
Posted: 3. Jan 2015, 12:36
by mpack
With the VM shut down, right click the VM in the GUI. Select "Show Log". Save "VBox.log" to a file. Compress that file and attach it to a message here.
Re: "Unexpected Exception" error when connecting USB device
Posted: 3. Jan 2015, 14:54
by Monomeeth
Hi mpack
Thank you so much for the tip and your offer of assistance. I followed your steps and found I had three VBox logs, so have saved them all and compressed them into a single .zip file. This is attached below:
I hope that's what you wanted.
Thanks again for your help!

Re: "Unexpected Exception" error when connecting USB device
Posted: 3. Jan 2015, 15:35
by loukingjr
Just so you know for the future, the plain "vbox.log" is always the latest and the only one needed. The others are previous logs.
As far as your problem, you probably need to set up a USB filter for the device. Also, if the device happens to be USB 3.0, VirtualBox doesn't support USB 3.0 yet.
Re: "Unexpected Exception" error when connecting USB device
Posted: 3. Jan 2015, 16:32
by Monomeeth
Hi, thanks for explaining how the "vbox.log" works.
I doubt the device is USB 3, as it's a weather station and I can't imagine there'd be any point to using USB 3 for that, but I will double check.
As for creating a USB filter for the device, I had already done that. Here is a screenshot:

- USB Filter.png (93.72 KiB) Viewed 3296 times
Perhaps I haven't done it right?

Re: "Unexpected Exception" error when connecting USB device
Posted: 3. Jan 2015, 16:43
by loukingjr
I don't use USB filters a lot but I have read in the past on the forum that leaving all but the Vendor and Product ID blank can help.
sorry, I left out a word.
Re: "Unexpected Exception" error when connecting USB device
Posted: 3. Jan 2015, 17:22
by Monomeeth
Ok, sounds like an easy thing to try. Will do that now.
By the way, checked and all the specs/system requirements documented for the unit only specify USB. Since the software/hardware are compatible with older Windows XP machines I assume that it's almost certainly not USB 3.0.
Re: "Unexpected Exception" error when connecting USB device
Posted: 3. Jan 2015, 17:36
by Monomeeth
Ok, tried editing the USB filter, but no joy. The exact same problem. I did notice, however, that the error seems to actually appear when the weather station software starts communicating with the hardware, as opposed to when the hardware is physically connected. So maybe it's an issue with how the software is using the USB port in Virtual Box?
The exact same software works fine in Parallels and Fusion, so I'm just trying to narrow down the problem.

Re: "Unexpected Exception" error when connecting USB device
Posted: 3. Jan 2015, 18:01
by mpack
This disturbs me :-
VBox.log wrote:
00:00:00.704445 File system of '/Users/Joe/Downloads/Xtorrent Downloads/Windows 7.ULTIMATE.SP1.ALL.EDITIONS.32-64.bit/Windows.7.SP1.ENG.x86-x64.MAFIAA.iso' (DVD) is hfs
Where did you get this Win7 ISO?
Re: "Unexpected Exception" error when connecting USB device
Posted: 4. Jan 2015, 02:11
by Monomeeth
Hi mpack
Not as bad as it looks. I needed a Windows 7 install to test the VMs out (as I'm trialling Parallels, Fusion and VBox) but when I tried to purchase a copy the only one I could get was what Microsoft called an OEM version that I could only buy if I was going to install it on a new computer I was building to sell. Had the whole debate about virtual machines etc, but no go. Even asked them what if I wanted to build VMs to sell already set up, but still no go (plus they knew that wasn't my intention anyway). Have since found a software vendor who will sell it to me for $107 but only if I purchase some sort of other hardware in the same transaction (e.g. motherboard, PCI card, network card, etc).
Anyway, my intention is that if I can get this to work okay on Virtual Box then I'll buy Win 7 and some hardware I can use (just so I can get the OEM version as there is no other version sold here). If I can't get it to work on Virtual Box then I have also come across some 3rd party software that will supposedly run on Windows XP and connect with my weather station. I have two legitimate copies of Windows XP I can use.
So, in a nutshell, I downloaded a Win7 torrent to test the virtual machines out because I couldn't buy a copy anywhere, but have since found somewhere I can buy a copy from for $107. This will be my goal if I can get it to work on VBox, as I'd prefer to use the official weather station software which requires Win7 as a minimum. But if I can't get it to work, then I'll try the 3rd party software and Windows XP first, because maybe that will work on VBox and if not then I can buy either Parallels or Fusion and not have to pay for Win7 at all (so the overall cost won't be so bad).
I know it sounds like a bit of a story, but I'm not one to torrent things usually. (I'm no saint, I used to download a lot of pirated software in the late 1990s and early 2000s, but haven't in over ten years). Not that I have to explain myself to you, but if I was going to torrent I would have just torrented Parallels or Fusion, rather than downloading VBox and spending all this time trying to get this to work with it.

Re: "Unexpected Exception" error when connecting USB device
Posted: 4. Jan 2015, 12:27
by mpack
Well, legal issues aside the problem is that, regardless of your intentions, we have no idea what is in the torrent. We could all run around in circles for ages, and it could turn out to be some kind of legacy support that one hacker deleted because he didn't think he needed it.
But of course we can't put legal issues aside. If I understand you correctly, you do not currently have a Win7 license. Oracle can't be seen helping you breach copyright. Come to us when you have a license, if you still have the problem.
p.s. I regularly buy OEM Windows for use in a VM, I just don't ask Microsoft for their opinion on the matter. Microsoft considers a VM to be a separate PC for the purpose of requiring an additional license, so IMHO they can't very well claim it isn't a PC for the purpose of deciding if it qualifies for a PC builder's OEM license. OEM licenses are easily found on Amazon (don't buy any of the second hand Dell/HP/etc branded install disks).
Re: "Unexpected Exception" error when connecting USB device
Posted: 4. Jan 2015, 12:54
by loukingjr
Just to add something, I have a Windows license for 7 and 8.1. However, if someone on here has issues with XP or Vista I will download the 30 day trial versions. I don't bother with the current DAs. Once I'm done seeing if I can assist a user they get deleted. I suppose if the 30 day trials dry up I will no longer do that because I really don't want to own out of date software. Not that XP can't be useful for some.
Re: "Unexpected Exception" error when connecting USB device
Posted: 4. Jan 2015, 13:22
by Monomeeth
mpack wrote:Well, legal issues aside the problem is that, regardless of your intentions, we have no idea what is in the torrent. We could all run around in circles for ages, and it could turn out to be some kind of legacy support that one hacker deleted because he didn't think he needed it.
Well, this is true, although I'm only having the issue in VBox not in Parallels or Fusion.
mpack wrote:But of course we can't put legal issues aside. If I understand you correctly, you do not currently have a Win7 license. Oracle can't be seen helping you breach copyright. Come to us when you have a license, if you still have the problem.
Yes, that is correct, I don't currently own a licence for Win7. And I totally understand and respect your position on this.
mpack wrote:p.s. I regularly buy OEM Windows for use in a VM, I just don't ask Microsoft for their opinion on the matter. Microsoft considers a VM to be a separate PC for the purpose of requiring an additional license, so IMHO they can't very well claim it isn't a PC for the purpose of deciding if it qualifies for a PC builder's OEM license. OEM licenses are easily found on Amazon (don't buy any of the second hand Dell/HP/etc branded install disks).
Thanks, I hadn't considered Amazon. Nevertheless, I've now found a retailer who will sell me a copy (along with some hardware - anything will do!), so that's the route I'm likely to take if I need Win7.
Re: "Unexpected Exception" error when connecting USB device
Posted: 4. Jan 2015, 13:23
by Monomeeth
loukingjr wrote:Just to add something, I have a Windows license for 7 and 8.1. However, if someone on here has issues with XP or Vista I will download the 30 day trial versions. I don't bother with the current DAs. Once I'm done seeing if I can assist a user they get deleted. I suppose if the 30 day trials dry up I will no longer do that because I really don't want to own out of date software. Not that XP can't be useful for some.
Wow, didn't even consider you could download a 30 day trial. So is this still an option for Win7?
I'll go and investigate that now. Thanks for the tip!
Re: "Unexpected Exception" error when connecting USB device
Posted: 4. Jan 2015, 13:30
by loukingjr